|
From: Karl <kh...@tr...> - 2004-10-13 09:49:00
|
On 2004-10-13 11:10:16 +0200, Karl Hasselström wrote:
> On 2004-10-12 19:05:39 +0100, Tom Hughes wrote:
>
> > In message <20041012172514.GA11829@malin>
> > kha...@he... wrote:
> >
> > > I get the following error from valgrind:
> > >
> > > ==13322== Valgrind detected that your program requires
> > > ==13322== the following unimplemented functionality:
> > > ==13322== clone(): not supported by Valgrind.
> > > We do now support programs linked against
> > > libpthread.so, though. Re-run with -v and ensure that
> > > you are picking up Valgrind's implementation of libpthread.so.
> > >
> > > Rerunning with -v shows that I am indeed not getting valgrind's
> > > libpthread, but /lib/tls/libpthread-0.61.so. How do I get it to
> > > use the correct library?
> >
> > It should use it automatically. One thing that might cause a problem
> > is having an rpath set in your executable - what does "objdump -p"
> > say about your program?
>
> RPATH /home/kha/local/lara.hq.vtech/lib:/home/kha/local/generic/lib:/usr/X11R6/lib:/usr/lib:/lib:/usr/local/lib
>
> which is exactly the same as my $LD_LIBRARY_PATH. Valgrind is
> installed in /home/kha/local/lara.hq.vtech, which means that the
> full path to the library is
> /home/kha/local/lara.hq.vtech/lib/valgrind/libpthread.so.
I stripped those first two paths (/home/kha/local/lara.hq.vtech/lib
and /home/kha/local/generic/lib) from my LD_LIBRARY_PATH, LIBRARY_PATH
and LD_RUN_PATH, rebuilt everything, and got an RPATH of
/usr/X11R6/lib:/usr/lib:/lib:/usr/local/lib. For some unfathomable
reason, this caused the program to use /lib/i686/libpthread-0.10.so
instead of /lib/tls/libpthread-0.61.so, and valgrind worked. It still
doesn't use valgrind's libpthread.so, but apparently
/lib/i686/libpthread-0.10 is nice enough.
--
Karl Hasselström, kh...@tr...
www.treskal.com/kalle
|