Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] valgrind doesn't work (Read 5368 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[SOLVED] valgrind doesn't work

whenever i try to run valgrind, this is what i get:
Code: [Select]
==1342== Memcheck, a memory error detector
==1342== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==1342== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==1342== Command: ./bin/yed
==1342==

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've got debuginfod

Re: valgrind doesn't work

Reply #1
Reboot, there is some environment variable that is set at boot, it doesn't get set on installation.


Re: valgrind doesn't work

Reply #3
You can check if it's set like this:
Code: [Select]
$ env |grep debug
DEBUGINFOD_URLS=https://debuginfod.artixlinux.org
You might need to be fully updated too so all the versions match with all this separate debug symbols stuff. If I try:
Code: [Select]
$ valgrind ls
it works OK here, anyway, although that is not to say there might be a problem for others of course.

Re: valgrind doesn't work

Reply #4
It is supposed to "just work" now since we have a debuginfod. Maybe double check and make sure all of your packages are up to date and from Artix repos?

Re: valgrind doesn't work

Reply #5
It is supposed to "just work" now since we have a debuginfod. Maybe double check and make sure all of your packages are up to date and from Artix repos?
just updated and still same problem

edit: rebooted, no change

Re: valgrind doesn't work

Reply #6
You can check if it's set like this:
Code: [Select]
$ env |grep debug
DEBUGINFOD_URLS=https://debuginfod.artixlinux.org
You might need to be fully updated too so all the versions match with all this separate debug symbols stuff. If I try:
Code: [Select]
$ valgrind ls
it works OK here, anyway, although that is not to say there might be a problem for others of course.

it is set,
Code: [Select]
[yeti:~/dev/cc/yed] env | grep debug
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
[yeti:~/dev/cc/yed]

Code: [Select]
valgrind ls
also fails

Re: valgrind doesn't work

Reply #7
Your output of DEBUGINFOD_URLS says archlinux. That's wrong. It should be artixlinux.

Re: valgrind doesn't work

Reply #8
Your output of DEBUGINFOD_URLS says archlinux. That's wrong. It should be artixlinux.
fixed that,
Code: [Select]
[yeti:~] env | grep debug
DEBUGINFOD_URLS=https://debuginfod.artixlinux.org
[yeti:~]

valgrind still doesn't work, same output as before

Re: valgrind doesn't work

Reply #9
What's the output of "pacman -Qi debuginfod"?

Re: valgrind doesn't work

Reply #10
What's the output of "pacman -Qi debuginfod"?
Code: [Select]
Name            : debuginfod
Version         : 0.187-2
Description     : Handle ELF object files and DWARF debugging information (debuginfod)
Architecture    : x86_64
URL             : https://sourceware.org/elfutils/
Licenses        : LGPL3  GPL3
Groups          : None
Provides        : None
Depends On      : gcc-libs  glibc  libarchive.so=13-64  libelf=0.187  libmicrohttpd.so=12-64  sqlite
Optional Deps   : elfutils=0.187: for translations
Required By     : valgrind
Optional For    : binutils
Conflicts With  : None
Replaces        : None
Installed Size  : 337.89 KiB
Packager        : Artix Build Bot <[email protected]>
Build Date      : Tue 02 Aug 2022 09:23:56 BST
Install Date    : Sat 17 Sep 2022 16:30:41 BST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

Re: valgrind doesn't work

Reply #11
Yeah that looks right. What about "pacman -Qi valgrind"?

Re: valgrind doesn't work

Reply #12
Yeah that looks right. What about "pacman -Qi valgrind"?
Code: [Select]
Name            : valgrind
Version         : 3.19.0-5
Description     : Tool to help find memory-management problems in programs
Architecture    : x86_64
URL             : http://valgrind.org/
Licenses        : GPL
Groups          : None
Provides        : valgrind-multilib
Depends On      : glibc  perl  debuginfod
Optional Deps   : lib32-glibc: 32-bit ABI support [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : valgrind-multilib
Installed Size  : 86.28 MiB
Packager        : Artix Build Bot <[email protected]>
Build Date      : Tue 02 Aug 2022 09:20:50 BST
Install Date    : Sat 17 Sep 2022 16:30:41 BST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Re: valgrind doesn't work

Reply #13
Unfortunately I'm out of ideas here. No clue why it's not working for you. Hopefully someone else has an idea.

Re: valgrind doesn't work

Reply #14
I just installed valgrind , it is working

Try like this
Code: [Select]
DEBUGINFOD_URLS=https://debuginfod.artixlinux.org valgrind ls
Create problems which don't have solution