[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dynamic library lookup on HP-UX
From: |
Martin Frydl |
Subject: |
Dynamic library lookup on HP-UX |
Date: |
Wed, 26 Mar 2003 13:09:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827 |
I have problems with hardcoded paths to shared libraries on HP-UX. When
libtool creates executable or shared library, it hardcodes paths to any
dependency libraries into it and disable dynamic lookup according to
SHLIB_PATH shell variable. Now when I move the library to different
directory, dynamic linker is unable to find it (unless I use chatr
utility to allow SHLIB_PATH lookup).
In fact my problem is little different. I have two libraries (OpenSSL),
one dependent on another: libssl needs libcrypto. However, libssl does
not have hardcoded path to libcrypto (both are in the same directory).
When I create executable using both libraries, libtool hardcodes paths
to these libraries into it. So far it looks good. However, when I run
the executable, dynamic linker complains about libssl - it says it
cannot find dependency library libcrypto. I think the problem here is
that dynamic linker "thinks" libcrypto referenced from executable is
different library than libcrypto referenced from libssl.
The solution here is to either pass +s linker flag or perform post-build
step - "chatr +s enable" - for the executable (and any shared libraries
which use OpenSSL and can be dlopened). I remember the discussions about
this last year but I'm not sure about their result (chatr is not used in
libtool). What is the right way to allow SHLIB_PATH lookup? Should this
be solved by libtool or should I solve it manually (i.e. pass
LDFLAGS=-Wl,+s)?
I use autoconf 2.57, automake 1.7.1 and CVS libtool:
ltmain.sh (GNU libtool) 1.4e (1.1210 2003/03/25 23:53:38)
-- Martin
References:
http://mail.gnu.org/archive/html/libtool/2002-05/msg00054.html
http://mail.gnu.org/archive/html/automake/2002-09/msg00148.html
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Dynamic library lookup on HP-UX,
Martin Frydl <=