|
From: Karl <kh...@tr...> - 2004-10-13 10:28:35
|
On 2004-10-13 10:45:48 +0100, Tom Hughes wrote:
> The RPATH is your problem - you have /lib in there so the libpthread
> in /lib will be found via the RPATH before LD_LIBRARY_PATH is
> searched which is what would locate the valgrind version.
>
> The way things are supposed to work is that valgrind adds it's own
> library directory to LD_LIBRARY_PATH before starting the client
> program so that the valgrind pthread library is found. Unfortunately
> because RPATH takes priority over LD_LIBRARY_PATH (see man ld.so for
> the search rules) the system one is being found first.
>
> It's highly unusual to add the system library directories to the
> RPATH in that way - normally you just add any special directories
> that your program needs and let the system do it's default stuff to
> find the system libraries.
>
> I would suggest that you either drop the system libraries from
> RPATH, use RUNPATH instead of RPATH, or add the valgrind library
> directory to the RPATH so that valgrind pthread library is found.
Yes, it works now! Thanks a lot!
What I did was I dropped /usr/lib and /lib from my LD_LIBRARY_PATH,
LIBRARY_PATH and LD_RUN_PATH. Now all I have to do is figure out
exactly which of them is being used for RPATH by the build system . . .
but I won't bore you with that problem. Thanks again!
--
Karl Hasselström, kh...@tr...
www.treskal.com/kalle
|