6

I am trying to upgrade from Valgrind 3.7.0 to Valgrind 3.10.0 on Ubuntu 12.04.

I have run sudo apt-get update and sudo apt-get upgrade but when I try

sudo apt-get install valgrind

it returns

valgrind is already the newest version.

But Valgrind remains at version 3.7.0.

Zanna
  • 72,312
Joey
  • 61

2 Answers2

14

You can upgrade valgrind as follows:

wget http://valgrind.org/downloads/valgrind-3.10.1.tar.bz2
tar -xjf valgrind-3.10.1.tar.bz2
cd valgrind-3.10.1
./configure --prefix=/usr/local
make
sudo make install
ccache --clear
aviggiano
  • 133
freehuni
  • 141
0

You could also try to back-port the valgrind package from Trusty to Precise:

  1. Download the source files and extract them:

    wget http://archive.ubuntu.com/ubuntu/pool/main/v/valgrind/valgrind_3.10~20140411.orig.tar.gz http://archive.ubuntu.com/ubuntu/pool/main/v/valgrind/valgrind_3.10~20140411-0ubuntu1.debian.tar.gz
    tar -xf valgrind_3.10~20140411.orig.tar.gz
    cd valgrind-3.10~20140411
    tar -xf ../valgrind_3.10~20140411-0ubuntu1.debian.tar.gz
    
  2. Install build dependencies:

    sudo apt-get install build-essential devscripts debhelper autotools-dev dh-autoreconf bash-completion gdb docbook docbook-xsl docbook-xml xsltproc
    sudo apt-get install gcc-multilib libc6-dev-i386 # only if you're on amd64
    
  3. Add a changelog entry and compile:

    debchange -l~local 'Backport to Precise'
    nice debuild -b -j$(getconf _NPROCESSORS_ONLN)
    
  4. Install the newly built package:

    sudo dpkg -i ../valgrind_1:3.10~20140411-0ubuntu1~local1_*.deb
    

There's also Valgrind 3.10.1 in trusty-updates that can be built with the same recipe.

David Foerster
  • 36,890
  • 56
  • 97
  • 151