Hello, i tried to check my program for leaks and ran into a problem, when I try to run valgrind I get this error.
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-x86-64.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux-x86-64.so.2
valgrind:
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. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Note that if you are debugging a 32 bit process on a
valgrind: 64 bit system, you will need a corresponding 32 bit debuginfo
valgrind: package (e.g. libc6-dbg:i386).
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
I’m running into the exact same issue. Unfortunately, I have no idea why it’s not working.
For documentation’s sake, the Arch forum thread you’re referring to is here. From my installation, $DEBUGINFOD is getting set correctly, automatically. So I’m guessing it’s something to do with how valgrind is trying to interface with debuginfod.
If you figure out a solution, please let me (and anyone else who finds this) know!
Workaround: downgrade to glibc-2.35-3. You’ll need to set $DOWNGRADE_FROM_ALA=1 to allow it to down grade straight from Arch Archives. This did correctly allow me to run valgrind like normal.
For anybody else seeing this, it’s not a permanent solution, just a workaround. To my understanding, it’s just bypassing debuginfod which is the long term solution for this.
I got exactly the same problem. From installation, $DEBUGINFOD does not set automatically even though /etc/debuginfod was set correctly. After export $DEBUGINFOD_URLS=https://debuginfod.archlinux.org, still no help.
Though I’ll reiterate that this is not a full solution; It’s simply bypassing something that should be working in the first place. Looks like this topic is set to close “3 days after the last reply”, though I think maybe it shouldn’t. Or maybe discussion for the “correct” solution can/should be moved to a new thread.
Update
I’ll throw this here since the thread is closed. This now works fine with glibc 2.35-6