You are not logged in.
Pages: 1
I've installed valgrind-3.9.0 on linux Slitaz-2.6.37 (32bit) booted on virtualbox but when i try to use it on a C program (any a.out file), i encounter this error:
==29012== Memcheck, a memory error detector
==29012== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Sewrd
==29012== Using Valgrnd-3.9.0 and LibVEX; rerun with -h for copyright info
==29012== Command: a.out
==29012==
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld-linux.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux.so.2
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, long term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standards
valgrind: calling conventions for this platform. The package you need
valgrind: to intall for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSe, openSuSe, Fedora, RHEL: glibc-debuginfo
I'm fairly new to Linux and Valgrind but it seems that i need a specific package. This error does not report after which name the package is labeled on my distro (Slitaz). Slitaz does not have the apt-get command nor it's in my intensions to install it (if possible).
I tried to use, with superuser privileges, the command "tazpkg get-install " with any possible combination of libc6-dbg and glibc... I' ve already searched for a solution on the web without any result. Thanks for your time and attention
Offline
Hey Mr. Hyde,
I ran into the exact same issue that you did. I also saw your post at Stack Exchange. Any luck finding a solution?
I tried to take matters into my own hands, and I royally hosed my system trying to build glibc-2.19 from source (as described here: http://forum.slitaz.org/topic/broken-slitaz-40-bootinit-caused-by-faulty-glibc-or-coreutils-kernel-2637-cooking).
But I'm curious to find out what you've learned.
Offline
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform.
tux@slitaz:~$ file /lib/ld-2.14.1.so
/lib/ld-2.14.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
tux@slitaz:~$
Offline
ship a non-stripped ld.so (or whatever the dynamic linker .so is called)
ld-2.14.1.so - not stripped
http://goo.gl/5XujLi
tux@slitaz:~$ ls -l /lib/ld*
-rwxr-xr-x 1 root root 682804 Jun 25 11:18 /lib/ld-2.14.1.so
-rwxr-xr-x 1 root root 134308 Jun 25 11:17 /lib/ld-2.14.1.so-orig
lrwxrwxrwx 1 root root 12 Jun 25 10:55 /lib/ld-linux.so.2 -> ld-2.14.1.so
tux@slitaz:~$ file /lib/ld-2.14.1.so
/lib/ld-2.14.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
tux@slitaz:~$ valgrind --leak-check=full ./test.a
==2218== Memcheck, a memory error detector
==2218== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==2218== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2218== Command: ./test.a
==2218==
==2218==
==2218== HEAP SUMMARY:
==2218== in use at exit: 0 bytes in 0 blocks
==2218== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==2218==
==2218== All heap blocks were freed -- no leaks are possible
==2218==
==2218== For counts of detected and suppressed errors, rerun with: -v
==2218== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 11 from 6)
Offline
7. README_PACKAGERS
http://valgrind.org/docs/manual/dist.readme-packagers.html
-- Do not ship your Linux distro with a completely stripped /lib/ld.so. At least leave the debugging symbol names on -- line number info isn't necessary.
-- Don't strip the debug info off lib/valgrind/$platform/vgpreload*.so in the installation tree.
-- Don't strip symbols from lib/valgrind/* in the installation tree.
-- Please test the final installation works by running it on something huge.
Offline
I've run into the same problem. I downloaded ld-2.14.1.so from alanyih and changed ld-linux.so.2 so that it pointed to the new library...and my system stopped booting.
ld-linux.so.2 originally pointed to ld-2.13.so. I thought I could replace that with a 2.14 library but seems not....
Any advice? Should I (somehow) try recompiling ld-2.13.so with debug info?
Offline
@new_u
Sorry!
You are right.
slitaz-2.6.37 should be use ld-2.13.so
Please try docker ( boot2docker.iso )
SliTaz Docker support
http://forum.slitaz.org/topic/slitaz-docker-support#post-35008
Offline
Thank for the reply alanyih! I'm not sure how docker is related to the stripped ld issue though?
Offline
wget http://people.slitaz.org/~mojo/stuff/ld-2.13.so
md5sum glibc/install/lib/ld-2.13.so
273e4a455606fa9265e6dacc3d0ea6b1 glibc/install/lib/ld-2.13.so
file glibc/install/lib/ld-2.13.so
glibc/install/lib/ld-2.13.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
Offline
Thanks Mojo!!! Much appreciated 
Offline
Well...I thought this time it would work but if I use the new library Slitaz doesn't boot.
I renamed the original library to ld-2.13.so__ and copied the new library to /lib. That should be it?
(the hash of my downloaded file is OK)
Offline
Slitaz-4.0 full install
Rename existing ld-2.13.so to ld-2.13.so~
wget http://people.slitaz.org/~mojo/stuff/ld-2.13.so
ls -l /lib/ld-2.13.so <=verify permissions 755 root:root
ls -l /lib/ld-linux.so.2 <=verify symlink to /lib/ld-2.13.so
ldconfig <=updates cache
Boots OK.
Offline
Thanks again Mojo! I feel so stupid. The permissions and owner/group were wrong. NOW valgrind works 
(Maybe ld-2.14 also works on Slitaz 4.0)
Offline
Pages: 1
[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.56 MiB (Peak: 1.77 MiB) ]