Blockstream / esplora

Explorer for Bitcoin and Liquid
MIT License
998 stars 397 forks source link

Unable to build electrs on Odroid HC2 #61

Open justinmoon opened 5 years ago

justinmoon commented 5 years ago

This issue is a problem I encountered with your electrs fork -- but that repo doesn't accept issues so I'm posting here.

I get an error when I run the build command described in the directions:

$  cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.bitcoin
  Downloaded cc v1.0.25
    ...
   Compiling crossbeam-utils v0.6.1
   Compiling rayon-core v1.4.1
error: failed to run custom build command for `rayon-core v1.4.1`
could not execute process `/mnt/hdd2/electrs/target/release/build/rayon-core-ce94679caf3f5155/build-script-build` (never executed)
warning: build failed, waiting for other jobs to finish...
error: build failed

I can run the same command from the base romanz/electrs project and it builds successfully.

So I don't believe it's an upstream problem. But I lack the rust chops to debug exactly what is failing ...

romanz commented 5 years ago

Thanks for reporting this issue! Could you please check if the /mnt/hdd2/electrs/target/release/build/rayon-core-ce94679caf3f5155/build-script-build file exist? Also, could you please re-build with more verbose settings (e.g. cargo build --release -vvv), so we could see the context of the failing build step?

justinmoon commented 5 years ago

1) /mnt/hdd2/electrs/target/release/build/rayon-core-ce94679caf3f5155/build-script-build does exist 2) Logs of cargo build --release -vvv cargo.log attached

romanz commented 5 years ago

Unfortunately, the log show the same error, without more details:

     Running `CARGO_PKG_REPOSITORY='https://github.com/reem/rust-unreachable.git' CARGO=/home/bitcoin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/bin/cargo LD_LIBRARY_PATH='/mnt/hdd2/electrs/target/release/deps:/home/bitcoin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib:/home/bitcoin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib' CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_AUTHORS='Jonathan Reem <jonathan.reem@gmail.com>' CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_PRE= CARGO_PKG_VERSION=1.0.0 CARGO_PKG_DESCRIPTION='An unreachable code optimization hint in stable rust.' CARGO_MANIFEST_DIR=/home/bitcoin/.cargo/registry/src/github.com-1ecc6299db9ec823/unreachable-1.0.0 CARGO_PKG_NAME=unreachable CARGO_PKG_HOMEPAGE= CARGO_PKG_VERSION_MINOR=0 rustc --crate-name unreachable /home/bitcoin/.cargo/registry/src/github.com-1ecc6299db9ec823/unreachable-1.0.0/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=1e360c3213f496a3 -C extra-filename=-1e360c3213f496a3 --out-dir /mnt/hdd2/electrs/target/release/deps -L dependency=/mnt/hdd2/electrs/target/release/deps --extern void=/mnt/hdd2/electrs/target/release/deps/libvoid-f6bac71407180dad.rlib --cap-lints warn`
     Running `/mnt/hdd2/electrs/target/release/build/rayon-core-ce94679caf3f5155/build-script-build`
error: failed to run custom build command for `rayon-core v1.4.1`
could not execute process `/mnt/hdd2/electrs/target/release/build/rayon-core-ce94679caf3f5155/build-script-build` (never executed)

Could you try to build the https://github.com/romanz/build-rayon-demo repository? It should depend on the rayon-core crate, so hopefully it could reproduce the issue.

Also, could you please to attach the OS & Rust details/versions?

justinmoon commented 5 years ago

The build (cargo build --release -vvv) was successful (attached log)

OS / Rust info:

$ cargo --version
cargo 1.33.0 (f099fe94b 2019-02-12)
$ rustc --version
rustc 1.33.0 (2aa4c46cf 2019-02-28)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:   xenial

build.txt

romanz commented 5 years ago

I am not sure what may cause this issue :/

Is it possible to run /mnt/hdd2/electrs/target/release/build/rayon-core-ce94679caf3f5155/build-script-build? When it runs on my machine, it outputs:

$ ls -l build-script-build 
-rwxrwxr-x 2 roman roman 2415608 Mar 28 14:10 build-script-build
$ file build-script-build 
build-script-build: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=9005447c191b63e3ffcb26daf2448fd2223bbc89, with debug_info, not stripped
G
$ ./build-script-build 
cargo:rerun-if-changed=build.rs

Could you please try rebuild with cargo build --release --jobs=1 (in case there is an issue with concurrent build, e.g. the build takes too much memory when running on all cores)?

romanz commented 5 years ago

CC: @sangaman @openoms (who were running electrs on similar hardware)

shesek commented 5 years ago

Were you able to resolve this?

shesek commented 5 years ago

Ping @justinmoon, I'm really interested knowing if this works on the HC2 :)

justinmoon commented 5 years ago

Hey sorry for the delay. I will try again shortly. I gave up earlier but will try again.