Saturday, June 15, 2013

How to compile Valgrind on Ubuntu 13.04

The current stable Valgrind release is version 3.8.1 which doesn't officially support glibc 2.17 used in Ubuntu 13.04. To compile successfully, you'll need to make some changes to configure by adding the following:

 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5
$as_echo "2.17 family" >&6; }

$as_echo "#define GLIBC_2_17 1" >>confdefs.h

 DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
 DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
 DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"

You'll need to look for a similar block of code and add this in. Save changes then retry compiling. It should work now. There's a patch to do the same available which should make it into the next Valgrind release.

~/valgrind-3.8.1$ ./configure
~/valgrind-3.8.1$ make
~/valgrind-3.8.1$ sudo make install

The above commands should compile and install valgrind properly.

Valgrind needs libc-dbg to run so install it if you haven't already.

~$ sudo apt-get install libc-dbg

That should be it.

No comments:

Post a Comment