9

I have downloaded the sources from the Valgrind trunk and built it for using on an embedded Linux system(Montavista Linux) powered by an ARM926(ARMv5t architecture). Everything went well until I tried to run it to check some application I've made; Valgrind tells me:

"valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory".

Trying to run any other tool gives the same message. For make install I used the --prefix option pointing to the embedded system's filesystem which is mounted through NFS(e.g. --prefix=/home/NFS_mounted/opt/valgrind). I checked the installation location and the lib directory there contains the proper tools; I also checked the corresponding pkgconfig file for Valgrind and it seems to be OK so I'm kind of clueless right now and can't figure out what's going wrong. 2 questions:

  1. Is it correct to use/install a cross-compiled Valgrind like that? Maybe I'm doing something wrong regarding the setup, or maybe there is something involving the host system that I'm missing(gdb/gdbserver like).
  2. Has anyone tried running it on ARM architectures? I'm aware that the support is fairly recent so I'm wondering if I could get decent results.
13

Run this command in your target device

export VALGRIND_LIB=~/valgrind/lib/valgrind/

where ./valgrind is installed directory path (given in ./configure)

4

The problem is that 'valgrind' is looking for a different executable to run the real checking. It uses the install path you specified when you configured it, which is not the same path as on the target.

You should be able to confirm this by creating a symlink /home/NFS_mounted on your target that points to '/'.

  • How does it look for that path? The pkgconfig contains the correct target path so from where does it try to take it? – celavek Sep 6 '10 at 22:23
  • I think it's compiled in. The ./configure script generates a config.h header file, which should contain the prefix path. – Kristof Provost Sep 7 '10 at 8:23
2

Put in VALGRIND_LIB the parent directory of amd64-linux directory. E.g.:

export VALGRIND_LIB=/u/gallinar/downloaded/valgrind-3.2.3/.in_place

it worked for me today :).

  • I'm missing the .in_place in the folder. – ArmenB Apr 22 '14 at 21:14
0

VALGRIND_LIB needs to be pointing to the folder that has memcheck tool and other dependent x compiled libs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.