From 23a13f00804ea4a3784d77c2f3cda7b59263e025 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 26 Jul 2024 09:00:36 +0100 Subject: [PATCH] CI: Use LD_RUN_PATH during the httpd build to embed the path to OpenSSL in httpd binaries, but unset it after so that it doesn't affect running e.g. php-fpm or perl later. Should fix warning from logs when php-fpm is executed -- [26-Jul-2024 07:43:34] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/lib/php/20210902/curl.so (/lib/x86_64-linux-gnu/libcurl.so.4: undefined symbol: ENGINE_init, version OPENSSL_3.0.0), /usr/lib/php/20210902/curl.so.so (/usr/lib/php/20210902/curl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 --- test/travis_run_linux.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index 89b2cd8e6f0..e817dddf2b1 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -61,7 +61,9 @@ fi if test -v TEST_OPENSSL3; then CONFIG="$CONFIG --with-ssl=$HOME/root/openssl3" - export LD_LIBRARY_PATH=$HOME/root/openssl3/lib:$HOME/root/openssl3/lib64 + # Temporarily set LD_RUN_PATH so that httpd/mod_ssl binaries pick + # up the custom OpenSSL build + export LD_RUN_PATH=$HOME/root/openssl3/lib:$HOME/root/openssl3/lib64 export PATH=$HOME/root/openssl3/bin:$PATH openssl version fi @@ -78,6 +80,14 @@ builddir=$PWD $srcdir/configure --prefix=$PREFIX $CONFIG make $MFLAGS +if test -v TEST_OPENSSL3 + # Clear the library/run paths so that anything else run during + # testing is not forced to use the custom OpenSSL build; e.g. perl, + # php-fpm, ... + unset LD_LIBRARY_PATH + unset LD_RUN_PATH +fi + if test -v TEST_INSTALL; then make install pushd $PREFIX