Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.
share|improve this question
add comment

2 Answers 2

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 '/'.

share|improve this answer
    
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
add comment

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 :).

share|improve this answer
    
I'm missing the .in_place in the folder. –  Armen B. Apr 22 at 21:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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