-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Error building Open Ethereum for MIPS using Cross on macOS failed to run custom build command for ring v0.16.9
#11549
Comments
Did you try building |
open-ethereum currently doesn't support big-endian platforms https://github.com/OpenEthereum/open-ethereum/blob/3ccfe735aa579f89a1f8de192a7625084a6f530f/ethash/src/compute.rs#L265-L268 we also might have problems with parity-common crates paritytech/parity-common#27 |
failed to run custom build command for ring v0.16.9
failed to run custom build command for ring v0.16.9
I was reading through the "ring" README file, and they mention
They also say in BUILD.md of the "ring" repo:
I'm not sure what's using "ring" as a dependency, but it's using version |
@dvdplm I tried building ring-0.16.11 from source and it builds successfully with the latest Rust stable version But when I try to build the older ring-0.16.9 from source when using the latest Rust stable version
So I had a look at Open Ethereum's cargo.lock file, and the following dependencies are using "ring":
And the following dependency uses "webpki" and "rustls" (where "rustls" uses "sct"):
And "hyper-rustls" is in a Cargo.toml file, so perhaps if we update that to its latest stable version then the other dependencies (i.e. "webpki", "rustls" (which replaced "openssl" library, see here), and "sct") will also use their latest versions, and then it's just a matter of making updates to Open Ethereum codebase to make it build with the latest versions. And I can't find any Open Ethereum Issues that mention there being a requirement to update "hyper-rustls". Should a new issue be added to update Open Ethereum to use the latest stable version of "hyper-rustls"? Then it occurred to me that perhaps doing that already an existing Open Ethereum Issue... So first I found the following Issue that appears to indicate the repo is due for an update to the "ring" dependency #11544 And then I found this issue #7915. @tomaka are you still going to use "ring" to resolve this issue even though it's a "problematic library"? And I also found this issue which appears to have been caused by "rustls-native-certs", which is a dependency of "hyper-rustls" #11515 |
I've since tried reverting to an older version ring-0.16.5 (with rustc 1.36.0) unsuccessfully. |
Great, thanks It would be great if you could create another tracking issue/rename this one which summaries what need to be done in order to get |
@niklasad1 I've created a tracking issue here https://github.com/openethereum/openethereum/issues/11563 |
Hey, this branch https://github.com/knarz/ring/tree/bigendian has a patch that makes ring work on the s360 arch and is applied to the Edit: Not s360, but s390x, sorry |
@knarz i tried forking https://github.com/knarz/ring and then cloning the fork and fetching the 'bigendian' branch ls @ ~/code/src/ltfschoen/ring - [bigendian] $ RUST_BACKTRACE=1 QEMU_STRACE=1 cross build --target s390x-unknown-linux-gnu --release info: downloading component 'rust-std' for 's390x-unknown-linux-gnu' 19.5 MiB / 19.5 MiB (100 %) 4.1 MiB/s in 5s ETA: 0s info: installing component 'rust-std' for 's390x-unknown-linux-gnu' Unable to find image 'rustembedded/cross:s390x-unknown-linux-gnu-0.2.0' locally s390x-unknown-linux-gnu-0.2.0: Pulling from rustembedded/cross fe703b657a32: Already exists f9df1fafd224: Already exists a645a4b887f9: Already exists 57db7fe0b522: Already exists fd5eb1dae638: Pull complete b737b1aa458a: Pull complete ebe922695700: Pull complete 25f818714196: Pull complete 51846252d77b: Pull complete 33501c307ac6: Pull complete 45f447272a84: Pull complete b4cfcdce639c: Pull complete cc1ce785c1b0: Pull complete d4b535e6cdc5: Pull complete 76878529c2cc: Pull complete b8fe6886ab5e: Pull complete a7e971cfb355: Pull complete 3261ee26d2d9: Pull complete Digest: sha256:8840442382fa84b947087cec646f81802c28a425c365ce3c32b51bf5bf924e19 Status: Downloaded newer image for rustembedded/cross:s390x-unknown-linux-gnu-0.2.0 Compiling untrusted v0.7.0 Compiling lazy_static v1.4.0 Compiling libc v0.2.68 warning: lint `legacy_directory_ownership` has been removed: `converted into hard error, see https://github.com/rust-lang/rust/issues/37872` --> build.rs:20:5 | 20 | legacy_directory_ownership, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(renamed_and_removed_lints)]` on by default I also forked 'sct.rs', 'webpki', and 'rustls'. The plan was to update Cargo.toml in each of them as follows:
Then lastly to update 'open-ethereum' (my fork) dependencies to use my forks, as follows, when they are ready:
|
as an alternative to the above, i'm in the process of getting access to a IBM Z mainframe via VM by registering for community access at https://linuxone.cloud.marist.edu/cloud/#/register?flag=vm (instead of running on macOS) |
Hey, I made a mistake. Of course it's s390x and not s360. [patch.crates-io]
ring = { path = "../ring"} That should replace all |
I published some forks, that allow the client to be built on the https://github.com/knarz/parity-common/tree/bigendian The above openethereum fork will expect With these patches, starting the client once works but shutting it down and restarting again fails.
With a PoA demo setup (as per https://wiki.parity.io/Demo-PoA-tutorial.html) I get a strange error I haven't been able to track down yet:
|
version Parity-Ethereum/v2.8.0-nightly-6c0134f2e-20200304/x86_64-apple-darwin/rustc1.43.0-nightly
uname -a
returnsDarwin 18.7.0 Darwin Kernel Version 18.7.0; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
)expected
I was expecting (hoping) it would compile successfully.
actual
I've attempted to try to use Linux in a Docker Container to build Open Ethereum to MIPS (big endian hardware) using Cross, however I'm currently encountered this issue docker/for-linux#951, which is a progression from my initial issue cross-rs/cross#385. All the code and detailed steps that I've taken are included in this WIP PR in my fork ltfschoen#1.
So whilst I was waiting for help I've tried to just try building Open Ethereum to MIPS using Cross directly on my macOS local machine.
However, after installing relevant dependencies for Parity Ethereum on macOS by running my script dependencies_mac.sh,
Then cloning Open Ethereum with:
Then usually I'd run
cargo build --release --features final
and it would build successfully.However I want to use
cross
https://github.com/rust-embedded/cross (instead ofcargo
) to build to a MIPS (big endian hardware) release target (instead of little endian hardware), but I get the error shown below:The text was updated successfully, but these errors were encountered: