Build for Raspberry Pi issue on latest main branch

With the public testnet coming the current documentation in https://github.com/dantrevino/cross-compiling-stacks-blockchain is not working anymore.

cross build works. However, the instructions to launch the testnet do not work. The signature of blockstack-core has changed. Using something like blockstack-core bitcoin testnet /tmp/testnet could maybe work but fails with an error:

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `43497fd7f826957108f4a30fd9cec3aeba79972084e90ead01ea330900000000`,
 right: `06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f`', src/burnchains/bitcoin/spv.rs:219:9

cross building testnet binary like this cross build --manifest-path testnet/Cargo.toml --target arm-unknown-linux-gnueabihf fails on Ubuntu with :

error: failed to run custom build command for `openssl-sys v0.9.55`

Caused by:
  process didn't exit successfully: `/target/debug/build/openssl-sys-e8cd711d05c7237c/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=ARM_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_LIB_DIR
ARM_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=ARM_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_INCLUDE_DIR
ARM_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=ARM_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_DIR
ARM_UNKNOWN_LINUX_GNUEABIHF_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
run pkg_config fail: "Cross compilation detected. Use PKG_CONFIG_ALLOW_CROSS=1 to override"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.

@hank is this one you could help with?

Sorry, I’m not sure! This would be a question for the Blockchain team.

Hey folks the issue here is that the cross project has removed support for openssl. As a workaround, you can cargo install --version 0.1.16 cross and then run the command @friedger specifies.

Unfortunately relying on an old version of cross is not a long term solution, but it works for now.

References:


1 Like

For those coming late, I should point out that while ARM is not offiicially supported, Blockstack is now making binaries available as part of their build process. You can find them here (you must be logged into github to access):

1 Like