-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Before we were filtering out OpenSSL/1.1 (cfr. #256), the installation of Rust-1.52.1-GCCcore-10.3.0.eb (a build dependency for Python-3.9.5-GCCcore-10.3.0.eb) was failing with errors like:
/tmp/easybuild/build/Rust/1.52.1/GCCcore-10.3.0/rustc-1.52.1-src/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-linux-gnu/release/deps/liblibssh2_sys-7661e85ab2ef197a.rlib(openssl.o):openssl.c:function _libssh2_pub_priv_keyfilememory: error: undefined reference to 'EVP_PKEY_id'
collect2: error: ld returned 1 exit status
error: aborting due to previous error
error: could not compile `cargo`
It seems like that's caused by some mismatch between the OpenSSL/1.1 dependency, and the OpenSSL 3.0.x in the 2023.04 compat layer - perhaps the headers of OpenSSL 1.1 are picked up, but the actual linking is done against OpenSSL 3.0.x.
When using OpenSSL in filter-deps in the EasyBuild configuration, the error changes to:
The following warnings were emitted during compilation:
warning: build/expando.c:4:24: error: pasting "RUST_VERSION_OPENSSL_" and "(" does not give a valid preprocessing token
warning: 4 | #define VERSION2(n, v) RUST_VERSION_##n##_##v
warning: | ^~~~~~~~~~~~~
warning: build/expando.c:5:23: note: in expansion of macro VERSION2
warning: 5 | #define VERSION(n, v) VERSION2(n, v)
warning: | ^~~~~~~~
warning: build/expando.c:10:1: note: in expansion of macro VERSION
warning: 10 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER)
warning: | ^~~~~~~
error: failed to run custom build command for `openssl-sys v0.9.58`
...
Failed to find OpenSSL development headers.
You can try fixing this setting the `OPENSSL_DIR` environment variable
pointing to your OpenSSL installation or installing OpenSSL headers package
specific to your distribution:
...
See rust-openssl README for more information:
https://github.com/sfackler/rust-openssl#linux
This is a good indication that the openssl-sys crate being installed is not compatible yet with OpenSSL 3.0.x.
This is confirmed by https://github.com/sfackler/rust-openssl/blob/master/openssl-sys/CHANGELOG.md#v0964---2021-06-18, which shows that support for OpenSSL 3.0.x was only added in openssl-sys v0.9.64.