|
From: <cat...@ch...> - 2008-08-12 19:07:40
|
So after reading all about ... (internet) and going thru the manual. valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory I found one post about trying to test a 32 bit process on a 64 bit machine. which is what I am trying to do. more detailes below, but my question is, can I run valgrind 3.3.1 on a 32 bit process on a 64 bit machine? I tried -valgrind --tool=memcheck --enable-only32bit ./myProgram valgrind --enable-only32bit --tool=memcheck ./myProgram and got same error. do I need to recompile with 32 bit only? Which older valgrind will run on a 64 bit machine and test a 32 bit process? my program, $file /path/to/myProgram : ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped my system. $ uname -r 2.6.9-55.ELsmp $uname -p x86_64 $uname -a Linux yyy.zzz.private.com 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux ValGrind $ valgrind --version valgrind-3.3.1 $ valgrind -v -v --tool=memcheck ./myProgram valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory Verbose (twice) does not result in better/more error msg. I did a test and compiled a test.c on one of the pages I found. $ gcc -o test -g test.c $ file ~/test /home/james/test: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped $ valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./test ==30698== Memcheck, a memory error detector. ==30698== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ... ==30698== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 5 from 1) ==30698== malloc/free: in use at exit: 35 bytes in 2 blocks. I truncated results. but worked fine. same for example, $ valgrind --tool=memcheck ls -la ==5980== Memcheck, a memory error detector. ==5980== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. (truncated by me) any help would be appreciated. Any other Info I can provide, let me know. James |
|
From: Ferro, A. <Ala...@me...> - 2008-08-13 07:37:35
|
James, If you are trying to run Valgrind on a 64-bit OS, but with 32-bit binaries you will need to have installed BOTH 64-bit and 32-bit versions of Valgrind. Therefore you should find: <prefix>/lib/valgrind/x86-linux/memcheck - 32-bit memcheck <prefix>/lib/valgrind/amd64-linux/memcheck - 64-bit memcheck <prefix> is what ever you passed when Valgrind was compiled, but is often /usr/bin. My current RHEL4 box has two different RPMs - one for the 32-bit and one for the 64-bit. I find that generally the 32-bit one isn't installed on a 64-bit installation (along with lots of other 32-bit libraries). BTW, this applies to every version of Valgrind I ever used! I hope this helps, Alasdair -----Original Message----- So after reading all about ... (internet) and going thru the manual. valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory I found one post about trying to test a 32 bit process on a 64 bit machine. which is what I am trying to do. more detailes below, but my question is, can I run valgrind 3.3.1 on a 32 bit process on a 64 bit machine? I tried -valgrind --tool=memcheck --enable-only32bit ./myProgram valgrind --enable-only32bit --tool=memcheck ./myProgram and got same error. do I need to recompile with 32 bit only? Which older valgrind will run on a 64 bit machine and test a 32 bit process? my program, $file /path/to/myProgram : ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped my system. $ uname -r 2.6.9-55.ELsmp $uname -p x86_64 $uname -a Linux yyy.zzz.private.com 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux ValGrind $ valgrind --version valgrind-3.3.1 $ valgrind -v -v --tool=memcheck ./myProgram valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory Verbose (twice) does not result in better/more error msg. I did a test and compiled a test.c on one of the pages I found. $ gcc -o test -g test.c $ file ~/test /home/james/test: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped $ valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./test ==30698== Memcheck, a memory error detector. ==30698== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ... ==30698== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 5 from 1) ==30698== malloc/free: in use at exit: 35 bytes in 2 blocks. I truncated results. but worked fine. same for example, $ valgrind --tool=memcheck ls -la ==5980== Memcheck, a memory error detector. ==5980== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. (truncated by me) any help would be appreciated. Any other Info I can provide, let me know. James |
|
From: Tom H. <to...@co...> - 2008-08-13 07:43:54
|
In message <1A5...@sv...>
Alasdair Ferro <Ala...@me...> wrote:
> If you are trying to run Valgrind on a 64-bit OS, but with 32-bit
> binaries you will need to have installed BOTH 64-bit and 32-bit versions
> of Valgrind.
No you won't, at least not normally. Unless you say otherwise
valgrind will build support for both 32 and 64 bit binaries when
you build it on a 64 bit box so you will only need to build it
once.
> Therefore you should find:
> <prefix>/lib/valgrind/x86-linux/memcheck - 32-bit memcheck
> <prefix>/lib/valgrind/amd64-linux/memcheck - 64-bit memcheck
Correct, but those are all created by the 64 bit build - there
is no need to do a 32 bit build as well.
> <prefix> is what ever you passed when Valgrind was compiled, but is
> often /usr/bin. My current RHEL4 box has two different RPMs - one for
> the 32-bit and one for the 64-bit. I find that generally the 32-bit one
> isn't installed on a 64-bit installation (along with lots of other
> 32-bit libraries).
I bet you don't really need the 32 bit package. Certainly the
rpms I make have both 32 and 64 bit support in them when they are
created on a 64 bit system.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Tom H. <to...@co...> - 2008-08-13 07:45:25
|
In message <20080812150738.S38I7.15874.root@mp19>
cat...@ch... wrote:
> So after reading all about ... (internet) and going thru the manual.
> valgrind: failed to start tool 'memcheck' for platform 'x86-linux': No such file or directory
> I found one post about trying to test a 32 bit process on a 64 bit machine.
> which is what I am trying to do.
Sounds it didn't build 32 bit support - what did configure say when
you ran it?
> more detailes below, but my question is,
> can I run valgrind 3.3.1 on a 32 bit process on a 64 bit machine?
Yes, if it is build and installed correctly.
> I tried -valgrind --tool=memcheck --enable-only32bit ./myProgram
> valgrind --enable-only32bit --tool=memcheck ./myProgram
> and got same error.
The --enable-only32bit flag is a configure flag, not a flag to
valgrind. You shouldn't need it anyway as without that flag it
will build support for both 32 and 64 bit binaries.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|