From bb16b38505972d244b70fc8ff14e0279cb7a0449 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 26 Jul 2024 09:18:36 +0100 Subject: [PATCH] CI: Build OpenSSL itself with RPATH set so .../bin/openssl doesn't require correct LD_LIBRARY_PATH. --- test/travis_before_linux.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index c3a29d33fed..8fb4b4565d2 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -113,6 +113,11 @@ fi if test -v TEST_OPENSSL3; then # Build the requested version of OpenSSL if it's not already # installed in the cached ~/root + + ### temporarily clear cache + rm -rf $HOME/root/openssl-is-${TEST_OPENSSL3} + ### end + if ! test -f $HOME/root/openssl-is-${TEST_OPENSSL3}; then # Remove any previous install. rm -rf $HOME/root/openssl3 @@ -122,7 +127,10 @@ if test -v TEST_OPENSSL3; then curl -L "https://github.com/openssl/openssl/releases/download/openssl-${TEST_OPENSSL3}/openssl-${TEST_OPENSSL3}.tar.gz" | tar -xzf - cd openssl-${TEST_OPENSSL3} - ./Configure --prefix=$HOME/root/openssl3 shared no-tests ${OPENSSL_CONFIG} + # Build with RPATH so ./bin/openssl doesn't require $LD_LIBRARY_PATH + ./Configure --prefix=$HOME/root/openssl3 \ + shared no-tests ${OPENSSL_CONFIG} \ + '-Wl,-rpath=$(LIBRPATH)' make $MFLAGS make install_sw touch $HOME/root/openssl-is-${TEST_OPENSSL3}