rustmakefilemozillarust-cargorhel8

Mozilla syncstorage-rs installation / make fails under RHEL8


I'm currently trying to install Mozilla syncstorage-rs on a RockyLinux machine, and step by step I could reduce the amount of errors, but now I got stuck. I found in Makefile to execute the following command in case of SSL trouble, so I did so cargo build --features grpcio/openssl and this is fine, this finally works:

cargo build --features grpcio/openssl
Compiling syncstorage v0.10.2 (/var/www/html/syncstorage-rs)
Finished dev [unoptimized + debuginfo] target(s) in 35.59s

But when I try to now run either make run or make test or anything else, I just get:

  = note: /usr/bin/ld: /var/www/html/syncstorage-rs/target/debug/deps/libopenssl-dc6f50ea1194640f.rlib(openssl-dc6f50ea1194640f.openssl.9bacb62b-cgu.1.rcgu.o): undefined reference to symbol 'OPENSSL_cipher_name@@OPENSSL_1_1_1'
          //usr/lib64/libssl.so.1.1: error adding symbols: DSO missing from command line
          collect2: error: ld returned 1 exit status
          
  = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `syncstorage` due to previous error
make: *** [Makefile:45: test] Error 101

What am I missing? I thought after building it could be run easily.


Solution

  • So the answer is to use cargo clean before continuing. I don't know why, but there seemed to be some old artifacts even if I hadn't built before. However, after executing cargo clear command, the build openssl runs completely (many lines more than before) and after that, there is one more little step to do:

    python3 -m venv venv # creates a virtual environment named "venv"
    source venv/bin/activate # enters the virtual environment
    python3 -m pip install -r requirements.txt # installs the packages
    

    and finally make run works. For more details, see https://github.com/mozilla-services/syncstorage-rs/issues/1241

    See https://www.youtube.com/watch?v=jdtoyIW4Lec for a step by step instruction.