Hello. I wanted to compile a 32-bit version of client libs. I installed an i386 Debian Sid from mini.iso with packages: openssh, cargo (so rust as dependency), git, curl, make, libssl-dev, pkg-config.
maciek@debsid32:~/safe_client_libs/safe_app$ cargo build --release --features "use-mock-routing" --target=i686-unknown-linux-gnu
Compiling openssl v0.9.24
Compiling num-traits v0.1.43
error: failed to run custom build command for `openssl v0.9.24`
process didn't exit successfully: `/home/maciek/safe_client_libs/target/release/build/openssl-74e276710c5b53dd/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to detect OpenSSL version', /home/maciek/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.9.24/build.rs:16:14
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
@loziniak, I just know that x86 was removed as being Tier-1 platform supported by us, I honestly don’t know if it’s still possible to build it for that architecture or not, perhaps @marcin or @nbaksalyar can give more details
Currently I’ve tried downloading rust_sodium sources, replacing reqwest version with newer one (to bump openssl-sys version to fixed one) in rust_sodium-sys/Cargo.toml and play with patchingCargo.toml files in safe_authenticator, safe_app and safe_core to use downloaded sources instead of crates from crates.io. I also don’t know rust and cargo at all, so all it was just a blind trials with no success. Perhaps now it’s time for workarounds from your links, thanks!
At first, I noticed Compiling openssl v0.9.24 message that filled me with hope, but after some time, I saw that message second time, this time with errors not related to a libssl version, but to a source code:
It’s probably my fault, but I don’t know what I’m doing wrong.
OPENSSL_LIB_DIR="/usr/lib/i386-linux-gnu" doesn’t seem right? I think it should point to an existing directory containing the openssl library. No idea whether that’s causing the issue you’re seeing though.
OPENSSL_INCLUDE_DIR="/usr/include/openssl" should also be OPENSSL_INCLUDE_DIR="/usr/include/openssl-1.0" I think. (Check if they exist.)
I wonder: where is the libssl.so (soft?) link located? I think the OPENSSL_LIB_DIR should refer to the directory that contains that soft link. Seems to be correct on second look.
Woah, success! cargo clean and OPENSSL_LIB_DIR wokaround did the job. I don’t know why the second compilation pass has started the last time… Thank you all!
I’ve had a couple of days looking after my poorly son, so had a crack at getting some SAFENetwork dev work underway again. However, I had some similar problems to this thread.
I am using Ubuntu 18.10 with libssl 1.1.1.
For me, I updated the Cargo.toml to use rust_sodium = "~0.10.1". Then cargo build --release seemed to complete successfully.
I’m not sure whether this has broken other things, but it compiled at least. I’m new to Rust and the code base, so I haven’t tried anything out yet. My plan is just to experiment and hopefully do some Java dev on SAFE Network again.
I think the ‘Rust way’ would be to use cargo update --package rust_sodium so it updates the Cargo.lock file. I used this last week and I couldn’t verify whether this broke the build or didn’t. By the way, which Cargo.toml did you edit? safe_client_libs has multiple crates.