Because -rpath/-R may have been used, our settings of LD_LIBRARY_PATH
authorRichard Levitte <levitte@openssl.org>
Tue, 2 Nov 2004 01:13:02 +0000 (01:13 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 2 Nov 2004 01:13:02 +0000 (01:13 +0000)
and friends may be entirely useless.  In such a case, LD_PRELOAD is
the answer, at least on platforms using LD_LIBRARY_PATH.  There might
be other variables to set on other platforms, please fill us in...

For now, we only do this with the tests, so they won't fail for silly
reasons like getting dynamically linked to older installed libraries
rather than the newly built ones...

PR: 960

test/Makefile

index 28fbd34c5ce02ae8963b787b06729bab470413f9..98e815cbd60a22d80c7ccf1638ee0ed0110854d8 100644 (file)
@@ -129,8 +129,9 @@ SET_SO_PATHS=OSSL_LIBPATH="`cd ..; pwd`"; \
                DYLD_LIBRARY_PATH="$$OSSL_LIBPATH:$$DYLD_LIBRARY_PATH"; \
                SHLIB_PATH="$$OSSL_LIBPATH:$$SHLIB_PATH"; \
                LIBPATH="$$OSSL_LIBPATH:$$LIBPATH"; \
+               LD_PRELOAD="$$OSSL_LIBPATH/libssl.so $$OSSL_LIBPATH/libcrypto.so"; \
                if [ "$(PLATFORM)" = "Cygwin" ]; then PATH="$${LIBPATH}:$$PATH"; fi; \
-               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH
+               export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH PATH LD_PRELOAD
 
 alltests: \
        test_des test_idea test_sha test_md4 test_md5 test_hmac \