Installing it from the source seems to have following drawbacks:
- you cannot remove it later using a package manager (checkinstall can be used to circumvent this up to a point)
- without specifying a path to ./configure, it won't go to where the previous version was
- the most important one: links in /usr/lib/ccache will not get created
At least for me, the most working solution was to use updated package from a newer version of ubuntu, Wily. Doing like this:
- Download the package from http://packages.ubuntu.com/wily/amd64/ccache/download (assuming you're on amd64 architecture)
- Installing it:
sudo dpkg -i ccache_3.2.3-1_amd64.deb
Will have everything working like I wanted to:
$ ccache -V
ccache version 3.2.3
Copyright (C) 2002-2007 Andrew Tridgell
Copyright (C) 2009-2015 Joel Rosdahl
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
$ ls -trla /usr/lib/ccache
total 16
drwxr-xr-x 86 root root 12288 Jan 27 17:55 ..
lrwxrwxrwx 1 root root 16 Jan 27 17:55 x86_64-linux-gnu-gcc-4.8 -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 x86_64-linux-gnu-gcc -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 x86_64-linux-gnu-g++-4.8 -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 x86_64-linux-gnu-g++ -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 gcc-4.8 -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 gcc -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 g++-4.8 -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 g++ -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 cc -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 c99-gcc -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 c89-gcc -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 c++ -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 arm-none-eabi-gcc-4.8.2 -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 arm-none-eabi-gcc -> ../../bin/ccache
lrwxrwxrwx 1 root root 16 Jan 27 17:55 arm-none-eabi-g++ -> ../../bin/ccache
drwxr-xr-x 2 root root 4096 Jan 27 17:55 .
$ which ccache
/usr/bin/ccache
$ apt-cache policy ccache
ccache:
Installed: 3.2.3-1
Candidate: 3.2.3-1
Version table:
*** 3.2.3-1 0
100 /var/lib/dpkg/status
3.1.9-1 0
500 http://fi.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
$