Do you know why when I execute `valgrind --tool=helgrind ls` (ls
or other program) I get "ls: symbol lookup error:
/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so: undefined symbol:
pthread_mutexattr_gettype"?
Version:
valgrind-3.13.0-3
ldd /usr/bin/valgrind gives:
- linux-vdso.so1
- libc.so.6
- /lib64/ld-linux-x86-64.so.2
I think it started to fail since I upgrade the system (valgrind and its
dependencies). I wanted to try the latest valgrind version that works
with libc-2.25. But I cannot test it now a previous version because
plenty of programs depends on libc 2.26.
So, I tried in a fast way:
I installed valgrind 3.12.0 (removing the required libc-2.26 dep), and
copied libc-2.25 to /usr/lib. Now, it runs `valgrind --tool=helgrind ls`
without that error, but another binary (the real program that I wanted
to use with valgrind) fails with the same error:
valgrind --tool=helgrind ./build/openclprog
==31334== Helgrind, a thread error detector
==31334== Copyright (C) 2007-2015, and GNU GPL'd, by OpenWorks LLP et al.
==31334== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright
info
==31334== Command: ./build/openclprog
==31334== Selected platform: Intel(R) OpenCL sel_device changed to: 0
(to fit number of devices) Selected device: Intel(R) Core(TM) i5-2300
CPU @ 2.80GHz ./build/openclprog : symbol lookup error:
/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so: undefined symbol:
pthread_mutexattr_gettype
==31334==
==31334== For counts of detected and suppressed errors, rerun with: -v
==31334== Use --history-level=approx or =none to gain increased speed,
at ==31334== the cost of reduced accuracy of conflicting-access information
==31334== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Differences in ldd between ls and openclprog:
/usr/bin/ls:
linux-vdso.so.1 (0x00007ffd9f936000)
libcap.so.2 => /usr/lib/libcap.so.2 (0x00007ff40d2a3000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007ff40ceeb000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2
(0x00007ff40d6d3000)
openclprog:
linux-vdso.so.1 (0x00007ffc78bde000)
libOpenCL.so.1 => /usr/lib/libOpenCL.so.1 (0x00007fc5e5173000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fc5e4deb000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fc5e4a9b000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fc5e4883000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fc5e44cb000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fc5e42c3000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2
(0x00007fc5e55bb000)
I tried to build openclprog in C++11 and C++17 and in both cases fail.
Also, I tried in another computer with a different CPU and GPU (but
still AMD) and gives the same error (valgrind 3.12.0).
Any clue?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users