Discussion:
[Valgrind-users] problems running valgrind
Daniel
2008-07-23 20:07:00 UTC
Permalink
Greetings, all.

I just installed valgrind, and I am getting the following message when
I attempt to run it:

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

But, memcheck exists and is in the path. (I added /usr/local/lib/
valgrind/amd64-linux to the path after first seeing this error, in an
attempt to resolve it.)
% valgrind --version
valgrind: failed to start tool 'memcheck' for platform 'amd64-
linux': No such file or directory
% valgrind /bin/ls
valgrind: failed to start tool 'memcheck' for platform 'amd64-
linux': No such file or directory
% ls -l /usr/local/lib/valgrind/amd64-linux/memcheck
-rwxr-xr-x 1 root root 5536161 2008-07-23 14:34 /usr/local/lib/
valgrind/amd64-linux/memcheck
OS is SLES10, on AMD 64-bit.

I have searched the documentation, the FAQ, the archives, and Google
for anything related this error. It's very possible that I have
missed something, but all I have been able to find is other users who
are having the same problem, but who are directed to this list for
help - I have yet to find a solution.

I will greatly appreciate any advice or guidance you can give.

Thanks.

Daniel
Dan Kegel
2008-07-23 20:09:02 UTC
Permalink
Post by Daniel
I just installed valgrind, and I am getting the following message when
No such file or directory
strace might be illuminating...
Daniel
2008-07-23 20:21:35 UTC
Permalink
Post by Dan Kegel
Post by Daniel
I just installed valgrind, and I am getting the following message when
valgrind: failed to start tool 'memcheck' for platform 'amd64-
No such file or directory
strace might be illuminating...
readlink("/proc/self/exe", "/usr/local/bin/valgrind", 4096) = 23
brk(0) = 0x504000
brk(0x525000) = 0x525000
execve("/usr/local/valgrind-3.3/lib/valgrind/amd64-linux/memcheck",
["valgrind"], [/* 71 vars */]) = -1 ENOENT (No such file or directory)
write(2, "valgrind: failed to start tool \'"..., 96valgrind: failed
to start tool 'memcheck' for platform 'amd64-linux': No such file or
directory
But, hmm, since I installed with a prefix of /usr/local, and since I
didn't move anything after installation, I'm not sure why valgrind is
looking in /usr/local/valgrind-3.3/lib. Either way, that's definitely
the problem - the argument to execve in fact does not exist.

Thanks.

Daniel
Dan Kegel
2008-07-23 20:28:42 UTC
Permalink
Post by Daniel
Post by Dan Kegel
readlink("/proc/self/exe", "/usr/local/bin/valgrind", 4096) = 23
execve("/usr/local/valgrind-3.3/lib/valgrind/amd64-linux/memcheck",
["valgrind"], [/* 71 vars */]) = -1 ENOENT (No such file or directory)
write(2, "valgrind: failed to start tool \'"..., 96valgrind: failed
to start tool 'memcheck' for platform 'amd64-linux': No such file or
directory
But, hmm, since I installed with a prefix of /usr/local
Did you really run configure with --prefix=/usr/local,
or did you just override it at make install time?
The two are not identical...
Daniel
2008-07-23 20:33:07 UTC
Permalink
Post by Dan Kegel
Post by Daniel
Post by Dan Kegel
readlink("/proc/self/exe", "/usr/local/bin/valgrind", 4096) = 23
execve("/usr/local/valgrind-3.3/lib/valgrind/amd64-linux/memcheck",
["valgrind"], [/* 71 vars */]) = -1 ENOENT (No such file or
directory)
write(2, "valgrind: failed to start tool \'"..., 96valgrind: failed
to start tool 'memcheck' for platform 'amd64-linux': No such file or
directory
But, hmm, since I installed with a prefix of /usr/local
Did you really run configure with --prefix=/usr/local,
or did you just override it at make install time?
The two are not identical...
I ran configure with --prefix=/usr/local. I did see the warnings that
valgrind must not be moved after installation, and I heeded those
warnings.

I think at one point we might have had an install in /usr/local/
valgrind-3.3.0, but I did a "make distclean" before doing a "./
configure --prefix=/usr/local" for the most recent build, so that
should not be affecting the current installation.

Daniel
Tom Hughes
2008-07-23 21:10:49 UTC
Permalink
Post by Daniel
I ran configure with --prefix=/usr/local. I did see the warnings that
valgrind must not be moved after installation, and I heeded those
warnings.
I think at one point we might have had an install in /usr/local/
valgrind-3.3.0, but I did a "make distclean" before doing a "./
configure --prefix=/usr/local" for the most recent build, so that
should not be affecting the current installation.
Are you sure you're not picking up an old valgrind binary from the
previous install that has the old path compiled in?

Tom
--
Tom Hughes (***@compton.nu)
http://www.compton.nu/
Daniel
2008-07-23 21:14:35 UTC
Permalink
Post by Tom Hughes
Post by Daniel
I ran configure with --prefix=/usr/local. I did see the warnings
that valgrind must not be moved after installation, and I heeded
those warnings.
I think at one point we might have had an install in /usr/local/
valgrind-3.3.0, but I did a "make distclean" before doing a "./
configure --prefix=/usr/local" for the most recent build, so that
should not be affecting the current installation.
Are you sure you're not picking up an old valgrind binary from the
previous install that has the old path compiled in?
Yes, the old one is no longer on the system.

Either way, I'm not sure what changed, but it's working now. I hate
it when that happens - I don't like inexplicable changes on the
system. (Incidentally, before all this mess, valgrind worked; the
whole reason I was reinstalling was to get it to work again. I still
have no idea why it stopped working and started generating that error.)

Thanks, all.

Daniel

Tom Hughes
2008-07-23 20:13:51 UTC
Permalink
Post by Daniel
I just installed valgrind, and I am getting the following message when
No such file or directory
But, memcheck exists and is in the path. (I added /usr/local/lib/
valgrind/amd64-linux to the path after first seeing this error, in an
attempt to resolve it.)
Altering the path will do nothing - the path used to load the tools is
fixed at build time so you must put them in the location specified when
valgrind was configured (ie in $prefix/lib/valgrind typically).

Tom
--
Tom Hughes (***@compton.nu)
http://www.compton.nu/
Continue reading on narkive:
Loading...