On Thu, Mar 10, 2016 at 12:23 PM, PGNet Dev <pgnet.dev at gmail.com> wrote: > 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? https://wiki.openssl.org/index.php/Compilation_and_Installation#Using_RPATHs Jeff