Introduction to Valgrind

Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile programs in detail. Valgrind can also be used to build new tools.

This package is known to build and work properly using an LFS-7.8 platform.

Package Information

  • Download (HTTP):

  • Download MD5 sum: 60ddae962bc79e7c95cfc4667245707f

  • Download size: 10.5 MB

  • Estimated disk space required: 401 MB and an additional 20 MB for tests

  • Estimated build time: 1.1 SBU and an additional 4.7 SBU for tests

Valgrind Dependencies


Boost-1.59.0, LLVM-3.7.0 (with Clang), GDB-7.10 (for tests), and OpenMP

Optional for regenerating the documentation

libxslt-1.1.28 and texlive-20150521 (or install-tl-unx)

User Notes:

Installation of Valgrind

Install Valgrind by running the following commands:

sed -e 's#|3.\*#&|4.\*#'     \
    -e 's/-mt//g'            \
    -e 's/2\.20)/2.2[0-9])/' \
    -i configure             &&
sed -i 's|/doc/valgrind||' docs/ &&

./configure --prefix=/usr \
            --datadir=/usr/share/doc/valgrind-3.10.1 &&

To test the results, issue: make regtest. The tests may hang forever if GDB-7.10 is not installed.

Now, as the root user:

make install

Command Explanations

sed -e ... configure: The first expression fixes an issue that prevents Valgrind from compiling on systems with a linux-4.x based kernel, the second expression fixes the configure script to find newer versions of Boost, and the last one fixes an issue that prevents compilation with glibc versions greater than 2.20.

sed -i ... docs/ : This sed provides for installing the documentation in a versioned directory.


Installed Programs: callgrind_annotate, callgrind_control, cg_annotate, cg_diff, cg_merge, ms_print, valgrind, valgrind-di-server, valgrind-listener, and vgdb
Installed Library: libcoregrind-<Arch>-linux.a, libreplacemalloc_toolpreload-<Arch>-linux.a, libvex-<Arch>-linux.a, vgpreload_core-<Arch>, vgpreload_drd-<Arch>, vgpreload_exp-dhat-<Arch>, vgpreload_exp-sgcheck-<Arch>, vgpreload_helgrind-<Arch>, vgpreload_massif-<Arch>, and vgpreload_memcheck-<Arch>, where <Arch>=x86, amd64
Installed Directories: /usr/lib/valgrind, /usr/include/valgrind, and /usr/share/doc/valgrind-3.10.1

Short Descriptions


is a program for debugging and profiling Linux executables.


takes an output file produced by the Valgrind tool Callgrind and prints the information in an easy-to-read form.


controls programs being run by the Valgrind tool Callgrind.


is a post-processing tool for the Valgrind tool Cachegrind.


compares two Cachegrind output files.


merges multiple Cachegrind output files into one.


takes an output file produced by the Valgrind tool Massif and prints the information in an easy-to-read form.


is a server that reads debuginfo from objects stored on a different machine.


listens on a socket for Valgrind commentary.


is an intermediary between Valgrind and GDB or a shell.

Last updated on 2015-09-10 15:50:27 -0500