- a developer's blog

Valgrind installation on Linux Kernel 3.0 +

Valgrind is an excellent open source instrumentation framework for building dynamic analysis tools.

The Valgrind distribution includes the debugging and profiling tools like Memcheck, Cachegrind, Callgrind, Massif, Helgrind, DRD and Other Tools

All combined these offer great tools for a memory management & error detection, thread error detectors, a cache and branch-prediction profiler, a call-graph generating cache and branch-prediction profiler, and a heap profiler.

However Valgrind valgrind-3.6.1 was not compatible with Linux kernel versions.(3.0.0-+) . Trying to install valgrind-3.6.1 on Linux 3 + gave the follwoing error message: Look at the following location for compatible patches for Linux kernel versions.(3.0.0-+)

configure: error: Valgrind works on kernels 2.4, 2.6.

Come valgrind-3.7.0.tar.bz2 and you have a linux 3.0 + compatible valgrind.

To configure & install valgrind-3.7.0.tar.bz2 on Linux kernel 3.0.follow the steps below:

1 Download valgrind-3.7.0.tar.bz2 (using curl or wget)

curl -O



2 use md5sum to make sure it matches the one on the site
md5sum valgrind-3.7.0.tar.bz2

3 Unpack it.
tar -xjvf valgrind-3.7.0.tar.bz2

4 change directory into the newly created directory

cd valgrind-3.7.0.tar.bz2

5 configure it

6 make it

7 install it (need root)

sudo make install

Congratualtions, you are now empowered to use the best dynamic analysis tool for debugging your code.

4 comments on “Valgrind installation on Linux Kernel 3.0 +

  1. Bhaskar

    Linux distributions like Ubuntu 11.10 VM come with valgrind, so if you do not want to compile your own –

    sudo apt-get install valgrind

    This will handle all dependencies and install lidbc-dbg automatically

  2. Raechel

    trying to compile this way – i get the folllowing error:

    valgrind: Fatal error at startup: a function redirection
    which is mandatory for this platform-tool combination
    cannot be set up. Details of the redirection are:

    valgrind: A must-be-redirected function
    valgrind: whose name matches the pattern: strlen
    valgrind: in an object with soname matching:
    valgrind: was not found whilst processing
    valgrind: symbols from the object with soname:
    valgrind: Possible fixes: (1, short term): install glibc’s debuginfo
    valgrind: package on this machine. (2, longer term): ask the packagers
    valgrind: for your Linux distribution to please in future ship a non-
    valgrind: stripped (or whatever the dynamic linker .so is called)
    valgrind: that exports the above-named function using the standard
    valgrind: calling conventions for this platform. The package you need
    valgrind: to install for fix (1) is called
    valgrind: On Debian, Ubuntu: libc6-dbg
    valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
    valgrind: Cannot continue — exiting now. Sorry.

    1. Bhaskar

      Check your internet connection.. this error maakes me suspect connectivity issues at the time of installation

Comments are closed.