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}