1. download the latest valgrind from http://valgrind.org/
2. After pressurization, you can view the README file and follow the instructions in readme to perform the following operations:
1). Run./configure, with some options if you wish. The only interesting
One is the usual -- prefix =/where/you/want/IT/installed.
2). Run "make ".
3). Run "make install", possibly as root if the destination Permissions
Require that .---Ubuntu requires the root permission, that is, run: sudo make install
4). See if it works. Try "valgrind LS-L". Either this works, or it
Bombs out with some complaint. In that case, please let us know
(See www.valgrind.org ).
The following errors may occur:
Valgrind: Fatal error at startup: A function redirectionvalgrind: which is mandatory for this platform-tool combinationvalgrind: cannot be set up. details of the redirection are: valgrind: A must-be-redirected functionvalgrind: Whose name matches the pattern: indexvalgrind: In an object with soname matching: ld-linux.so.2valgrind: was not found whilst processingvalgrind: symbols from the object with soname: ld-linux.so.2valgrind: valgrind: possible fixes: (1, short term): Install glibc's debuginfovalgrind: Package on this machine. (2, longer term): Ask the packagersvalgrind: For your Linux distribution to please in future ship a non-valgrind: Stripped lD. so (or whatever the dynamic linker. so is called) valgrind: that exports the above-named function using the standardvalgrind: calling conventions for this platform. the package you needvalgrind: to install for fix (1) is calledvalgrind: valgrind: On Debian, Ubuntu: libc6-dbgvalgrind: On Suse, opensuse, fedora, RHEL: Glibc-debuginfovalgrind: valgrind: cannot continue -- exiting now. sorry.
The above error is because a Lib: libc6-dbg is also required under Ubuntu
Run: sudo apt-Get install libc6-dbg to install libc6-dbg
Run valgrind LS-l again.
You can use it as follows:
Valgrind -- tool = memcheck -- leak-check = full./Hellworld