In message <20170517130805.7600d40...@smtp03.mail.de> on Wed, 17 May 2017 
15:08:05 +0200, Hiran Chaudhuri <hiran.chaudh...@mail.de> said:

hiran.chaudhuri> Hi there.
hiran.chaudhuri> I have been building Openssl for quite some time now. Just 
recently I
hiran.chaudhuri> switched to shared mode that will also create shared libraries.
hiran.chaudhuri> What I am wondering about: After configure/make/make install I 
find
hiran.chaudhuri> the expected libraries in the desired output directory. Why 
can ldd
hiran.chaudhuri> not resolve a librarie's dependencies? The target file is just 
in the
hiran.chaudhuri> same directory!
hiran.chaudhuri> user@server:/prefix/openssl/lib> ls
hiran.chaudhuri> engines libcrypto.a libcrypto.so libcrypto.so.1.0.0 libssl.a 
libssl.so
hiran.chaudhuri> libssl.so.1.0.0 pkgconfig
hiran.chaudhuri> user@server:/prefix/openssl/lib> ldd libssl.so.1.0.0
hiran.chaudhuri> linux-vdso.so.1 => (0x00007ffdae1fb000)
hiran.chaudhuri> libcrypto.so.1.0.0 => not found
hiran.chaudhuri> libdl.so.2 => /lib64/libdl.so.2 (0x00007f8173425000)
hiran.chaudhuri> libc.so.6 => /lib64/libc.so.6 (0x00007f81730a9000)
hiran.chaudhuri> /lib64/ld-linux-x86-64.so.2 (0x00007f81738ad000)
hiran.chaudhuri> user@server:/prefix/openssl/lib>
hiran.chaudhuri> Is this normal behaviour? Or is it because I entered a prefix 
that is
hiran.chaudhuri> not part of the system's default lib path?

That last question is the correct guess.  /etc/ld.so.conf will tell
you what your default paths are (and if it includes other files, so
will they).

The are two ways to handle this.  One is with the usual setting of
LD_LIBRARY_PATH:

    $ LD_LIBRARY_PATH=`pwd` ldd libssl.so.1.0.0

The other is, when you compile your application, to use
-Wl,-rpath,/prefix/openssl/lib

Incidently, I think that when you do this, you'll find that it finds
your libraries all right:

    $ ldd /prefix/openssl/bin/openssl

The reason is that the application has been built with said -rpath

A last note: with OpenSSL 1.1.0 and on, rpath isn't automatically
applied to the openssl application, but is a matter of extra
configuration arguments.

Cheers,
Richard

-- 
Richard Levitte         levi...@openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to