ShipSoft / shipdist

Recipes to build SHiP software and its dependencies
2 stars 10 forks source link

Update OpenSSL system_check #52

Open ThomasRuf opened 4 years ago

ThomasRuf commented 4 years ago

Don't understand why this check fails. Maybe the check syntax is wrong? I do have the include files. version is: OpenSSL 1.1.1f 31 Mar 2020

WARNING: Package OpenSSL cannot be picked up from the system and will be built by aliBuild. WARNING: This is due to the fact the following script fails: WARNING: WARNING: brew() { true; }; if [ uname = Darwin ]; then test -d brew --prefix openssl || echo /dev/nope || exit 1; fi; echo '#include <openssl/bio.h>' | c++ -x c++ - -Ibrew --prefix openssl/include -c -o /dev/null || exit 1; echo -e "#include <openssl/opensslv.h>\n#if OPENSSL_VERSION_NUMBER >= 0x10100000L\n#error \"System's GCC cannot be used: we need OpenSSL 1.0.x to build XrootD. We are going to compile our own version.\"\n#endif\nint main() { }" | cc -xc++ - -c -o /dev/null || exit 1 WARNING: WARNING: with the following output: WARNING: WARNING: OpenSSL: :3:2: error: #error "System's GCC cannot be used: we need OpenSSL 1.0.x to build XrootD. We are going to compile our own version."

ThomasRuf commented 4 years ago

OpenSSL 1.1.1f 31 Mar 2020

by replacing in above check OPENSSL_VERSION_NUMBER >= 0x10100000L by OPENSSL_VERSION_NUMBER >= 0x20100000L, system version is picked up.

olantwin commented 4 years ago

Shouldn't 0x20100000L >= 0x10100000L ? What is OPENSSL_VERSION_NUMBER?

ThomasRuf commented 4 years ago

see above. installed OpenSSL version is 1.1.1f. script limits #include <openssl/opensslv.h>\n#if OPENSSL_VERSION_NUMBER >= 0x10100000L\n#error \"System's GCC cannot be used: we need OpenSSL 1.0.x to build XrootD.

will trying with system version. XrootD compiled: ==> Building XRootD@v4.8.3 ==> XRootD is being built (use --debug for full output): ok

olantwin commented 4 years ago

If I understand this correctly, it might be a good idea to use OPENSSL_VERSION_{MAJOR,MINOR,PATCH} to do the version check, as it's both easier to understand, and OPENSSL_VERSION_NUMBER is deprecated. Maybe this explains the strange behaviour of the test failure...

Edit: 0x20100000L would correspond to 2.1.0, which doesn't exist.

olantwin commented 4 years ago

Could you assign me to this issue? I'll look into it (and the OPENSSL_VERSION_{MAJOR,MINOR,PATCH} thing), as discussed in the meeting (although not a priority for now).