|
From: Julian S. <js...@ac...> - 2003-04-05 09:32:41
|
On Saturday 05 April 2003 9:25 am, you wrote:
> HI:
> I've been using valgrind for just few days, and it's done well in
> one-thread environment,but when I used it in mutil-threads condition,i got
> some problem.Maybe i use it wrongly,but i don't get where it is. in this
> case,when i link programme with librt.so and libpthread.so and use valgrind
> to find memory leak, i could always get some error message like followed:
> error: /lib/librt.so.1: symbol __pthread_clock_settime, version
> GLIBC_PRIVATE not defined in file libpthread.so.0 with link time reference
> I have modifed the LD_PRELOAD var in /usr/local/bin/valgrind shell file,and
> make sure ld load our modified libphread.so first. valgrind version: 1.9.4
> My compiler: g++ 2.96.
> LD_PRELOAD in /usr/local/bin/valgind:
It's a problem which is not easy to fix. Really the problem is that
/lib/librt.so.1 refers to some symbols __pthread_clock_settime and
__pthread_clock_gettime in /lib/libpthread.so which are not intended
to be exported, ie they are private.
Best solution is to ensure your program does not use /lib/librt.so.1.
You might be able to fix it by playing around with coregrind/vg_libpthread.vs.
Things to try:
Remove this
GLIBC_PRIVATE {
__pthread_clock_gettime;
__pthread_clock_settime;
};
or maybe remove this
GLIBC_2.2.3 {
__pthread_clock_gettime;
__pthread_clock_settime;
} GLIBC_2.2;
or maybe add this
GLIBC_2.2.4 {
__pthread_clock_gettime;
__pthread_clock_settime;
} GLIBC_2.2;
GLIBC_2.2.5 {
__pthread_clock_gettime;
__pthread_clock_settime;
} GLIBC_2.2;
or some combination of the above. After each change you need to
delete coregrind/libpthread.so and do make && make install.
I just don't know if any of the above will work. If you can find a solution
which works, I would be interested to hear it.
J
|