[openssl-users] openssl 1.0.2g build linking to wrong libs -- 'system' instead of 'own'. How to correct?
PGNet Dev
pgnet.dev at gmail.com
Thu Mar 10 17:23:05 UTC 2016
I'm building 1.0.2g on linux64.
I'm trying to get a self-consistent build, linked to the right libs.
Building
cd ./openssl-1.0.2g
./config \
--openssldir=/home/dev/ssl --libdir=lib64 \
threads shared zlib -D_GNU_SOURCE -DPURIFY -DTERMIO \
-Wa,--noexecstack -Wl,-z,relro,-z,now -Wall -fno-common
make depend
make
make install
Then checking
ldd /home/dev/ssl/lib64/*.so* | egrep "ssl|crypto"
/home/dev/ssl/lib64/libcrypto.so:
/home/dev/ssl/lib64/libcrypto.so.1.0.0:
/home/dev/ssl/lib64/libssl.so:
libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0
(0x00007f6154f37000)
/home/dev/ssl/lib64/libssl.so.1.0.0:
libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0
(0x00007fd60fbbc000)
Why are these libs linked to SYSTEM libs, not the just-built libs, in
the specified $openssldir/$libdir ?
It can be fixed after the fact,
patchelf --set-rpath "/home/dev/ssl/lib64" --force-rpath
/home/dev/ssl/lib64/libssl.so.1.0.0
ldd /home/dev/ssl/lib64/libssl.so | egrep "ssl|crypto"
libcrypto.so.1.0.0 => /home/dev/ssl/lib64/libcrypto.so.1.0.0
(0x00007ff7f06fa000)
but that shouldn't be required.
What's the correct config+build procedure for ending up with
self-consistent linking?
More information about the openssl-users
mailing list