|
From: Ian M. <geo...@gm...> - 2012-03-14 03:47:32
|
Hi, I'm new here. I have some limited experience using Valgrind, but I need help installing it properly. I'm trying to get Valgrind working on a virtual machine running Ubuntu 9.04. The computer is a x86-64 architecture, and the Ubuntu distro of the virtual machine *should* have been x86, and is a basically fresh OS install. To install Valgrind, I used "sudo apt-get install valgrind". However, typing "valgrind ./[my_program]" gives: valgrind: failed to start tool 'memcheck' for platform 'amd64-linux': No such file or directory I've looked all over the web, and it's all people talking about methods of compiling Valgrind. I know nothing about this, because I didn't (directly?) do it. Help? Thanks, Ian Mallett |
|
From: Julian S. <js...@ac...> - 2012-03-15 07:35:05
|
On Wednesday, March 14, 2012, Ian Mallett wrote: > I'm trying to get Valgrind working on a virtual machine running Ubuntu > 9.04. The computer is a x86-64 architecture, and the Ubuntu distro of the > virtual machine *should* have been x86, and is a basically fresh OS > install. To install Valgrind, I used "sudo apt-get install valgrind". > However, typing "valgrind ./[my_program]" gives: > > valgrind: failed to start tool 'memcheck' for platform 'amd64-linux': No > such file or directory Sounds like some kind of installation problem. Does valgrind /bin/ls work? J |
|
From: Ian M. <geo...@gm...> - 2012-03-15 09:09:26
|
2012/3/15 Julian Seward <js...@ac...> > Sounds like some kind of installation problem. Does > valgrind /bin/ls > work? Appears to: ==3345== Memcheck, a memory error detector. ==3345== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al. ==3345== Using LibVEX rev 1884, a library for dynamic binary translation. ==3345== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP. ==3345== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework. ==3345== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al. ==3345== For more details, rerun with: -v ==3345== Desktop examples.desktop Pictures Templates Documents Music Public Videos ==3345== ==3345== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 1) ==3345== malloc/free: in use at exit: 12,978 bytes in 14 blocks. ==3345== malloc/free: 1,450 allocs, 1,436 frees, 85,334 bytes allocated. ==3345== For counts of detected errors, rerun with: -v ==3345== searching for pointers to 14 not-freed blocks. ==3345== checked 98,556 bytes. ==3345== ==3345== LEAK SUMMARY: ==3345== definitely lost: 0 bytes in 0 blocks. ==3345== possibly lost: 0 bytes in 0 blocks. ==3345== still reachable: 12,978 bytes in 14 blocks. ==3345== suppressed: 0 bytes in 0 blocks. ==3345== Rerun with --leak-check=full to see details of leaked memory. Thanks! Ian |
|
From: Ian M. <geo...@gm...> - 2012-03-15 18:02:20
|
Actual terminal output: ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ valgrind /bin/ls ==3359== Memcheck, a memory error detector. ==3359== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al. ==3359== Using LibVEX rev 1884, a library for dynamic binary translation. ==3359== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP. ==3359== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework. ==3359== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al. ==3359== For more details, rerun with: -v ==3359== CMakeCache.txt CMakeFiles cmake_install.cmake glLibC2 libglLibC2Lib.a Makefile ==3359== ==3359== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 1) ==3359== malloc/free: in use at exit: 12,679 bytes in 12 blocks. ==3359== malloc/free: 1,448 allocs, 1,436 frees, 85,035 bytes allocated. ==3359== For counts of detected errors, rerun with: -v ==3359== searching for pointers to 12 not-freed blocks. ==3359== checked 98,280 bytes. ==3359== ==3359== LEAK SUMMARY: ==3359== definitely lost: 0 bytes in 0 blocks. ==3359== possibly lost: 0 bytes in 0 blocks. ==3359== still reachable: 12,679 bytes in 12 blocks. ==3359== suppressed: 0 bytes in 0 blocks. ==3359== Rerun with --leak-check=full to see details of leaked memory. ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ valgrind ./glLibC2 valgrind: failed to start tool 'memcheck' for platform 'amd64-linux': No such file or directory ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ |
|
From: David C. <dcc...@ac...> - 2012-03-15 19:22:37
|
On 3/15/2012 11:01 AM, Ian Mallett wrote:
> Actual terminal output:
>
> ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ valgrind /bin/ls
What does "file /bin/ls" print? Your copy of "ls" may be a 32-bit
executable even if you are running on a 64-bit machine. (On my CentOS
5.5 machine it is a 64-bit executable, but you never know...)
> ==3359== Memcheck, a memory error detector.
> ==3359== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
> ==3359== Using LibVEX rev 1884, a library for dynamic binary translation.
> ==3359== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
> ==3359== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation
> framework.
This is also a pretty old version of valgrind. My CentOS 5.5 machine
has 3.5.0, and the most recent release is 3.7.0.
> ==3359== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
> ==3359== For more details, rerun with: -v
> ==3359==
> CMakeCache.txtCMakeFiles cmake_install.cmake glLibC2
> libglLibC2Lib.a Makefile
> ==3359==
> ==3359== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 1)
> ==3359== malloc/free: in use at exit: 12,679 bytes in 12 blocks.
> ==3359== malloc/free: 1,448 allocs, 1,436 frees, 85,035 bytes allocated.
> ==3359== For counts of detected errors, rerun with: -v
> ==3359== searching for pointers to 12 not-freed blocks.
> ==3359== checked 98,280 bytes.
> ==3359==
> ==3359== LEAK SUMMARY:
> ==3359== definitely lost: 0 bytes in 0 blocks.
> ==3359== possibly lost: 0 bytes in 0 blocks.
> ==3359== still reachable: 12,679 bytes in 12 blocks.
> ==3359== suppressed: 0 bytes in 0 blocks.
> ==3359== Rerun with --leak-check=full to see details of leaked memory.
> ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ valgrind ./glLibC2
> valgrind: failed to start tool 'memcheck' for platform 'amd64-linux':
> No such file or directory
> ian@IanMallettU86:~/Desktop/C++/glLibC2/build$
>
--
David Chapman dcc...@ac...
Chapman Consulting -- San Jose, CA
Software Development Done Right.
www.chapman-consulting-sj.com
|
|
From: Ian M. <geo...@gm...> - 2012-03-15 19:15:15
|
On Thu, Mar 15, 2012 at 12:29 PM, David Chapman <dcc...@ac...> wrote: > On 3/15/2012 11:01 AM, Ian Mallett wrote: > > Actual terminal output: > > ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ valgrind /bin/ls > > > What does "file /bin/ls" print? Your copy of "ls" may be a 32-bit > executable even if you are running on a 64-bit machine. (On my CentOS 5.5 > machine it is a 64-bit executable, but you never know...) > Ah . . . I think that's it; the file I was trying to check was built on a different, 64-bit machine, and this is running on a virtual 32-bit machine. ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ file /bin/ls /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ file ./glLibC2 ./glLibC2: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped So, I don't suppose there's any option to get a Valgrind 64-bit installation for 32-bit that would actually work? I'd have to get a 64-bit OS, then. I need a 64-bit distro of Ubuntu 9.04 . . . hmmmmm. > ==3359== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation > framework. > > Hmmm. Like I said, I sudo apt-get installed that. How else can I get an up-to-date version? Thanks, Ian |
|
From: David C. <dcc...@ac...> - 2012-03-15 20:07:08
|
On 3/15/2012 12:14 PM, Ian Mallett wrote: > On Thu, Mar 15, 2012 at 12:29 PM, David Chapman <dcc...@ac... > <mailto:dcc...@ac...>> wrote: > > On 3/15/2012 11:01 AM, Ian Mallett wrote: >> Actual terminal output: >> >> ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ valgrind /bin/ls > > What does "file /bin/ls" print? Your copy of "ls" may be a 32-bit > executable even if you are running on a 64-bit machine. (On my > CentOS 5.5 machine it is a 64-bit executable, but you never know...) > > Ah . . . I think that's it; the file I was trying to check was built > on a different, 64-bit machine, and this is running on a virtual > 32-bit machine. > > ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ file /bin/ls > /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), > dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped > ian@IanMallettU86:~/Desktop/C++/glLibC2/build$ file ./glLibC2 > ./glLibC2: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), > dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped > > So, I don't suppose there's any option to get a Valgrind 64-bit > installation for 32-bit that would actually work? I'd have to get a > 64-bit OS, then. I need a 64-bit distro of Ubuntu 9.04 . . . hmmmmm. Well, running a 64-bit application under a 32-bit OS is kind of hard. ;-) >> ==3359== Using valgrind-3.4.1-Debian, a dynamic binary >> instrumentation framework. > > Hmmm. Like I said, I sudo apt-get installed that. How else can I get > an up-to-date version? > > Thanks, > Ian valgrind runs as a user executable, so you can download and compile the new version at http://www.valgrind.org/ and install it locally. Of course, if you have root access on your virtual machine you can install it in /usr/local/bin. -- David Chapman dcc...@ac... Chapman Consulting -- San Jose, CA Software Development Done Right. www.chapman-consulting-sj.com |
|
From: Ian M. <geo...@gm...> - 2012-03-15 20:53:14
|
On Thu, Mar 15, 2012 at 2:06 PM, David Chapman <dcc...@ac...> wrote: > Well, running a 64-bit application under a 32-bit OS is kind of hard. ;-) > Mmmm I was thinking it might be possible because it was my understanding that Valgrind is itself a vritual machine. valgrind runs as a user executable, so you can download and compile the new > version at http://www.valgrind.org/ and install it locally. Of course, > if you have root access on your virtual machine you can install it in > /usr/local/bin. > Thanks. I installed a x86-64 bit distro and reinstalled Valgrind. Naturally, this fixed the problem. Thanks for the help! Ian |