is ccache working?

Michael Zanetti michael_zanetti at
Sun Aug 1 12:27:03 BST 2010

On Sunday 01 August 2010 13:16:05 fabio de francesco wrote:
> On Sunday 01 August 2010 11:42:29 Andreas Pakulat wrote:
> > On 01.08.10 11:19:19, fabio de francesco wrote:
> > > Hi all,
> > > 
> > > I have the line "export CCACHE_DIR=/home/kdevel/var/tmp/ccache" in my
> > > /home/kdevel/.bashrc but I don't find any file in that directory. Did I
> > > miss something needed to make ccache properly working?
> > 
> > This doesn't really have anything to do with KDE, you need to make sure
> > that gcc/g++/... are pointing to ccache and not the real compiler.
> > Usually this is done by setting up apropriate symlinks called gcc/g++
> > somewhere in a directory and putting that directory first in PATH.
> > 
> > Andreas
> I see that /usr/bin/gcc is not a symbolic link to ccache, anyway ccache is
> working system wide and it regularly writes caches to /var/tmp/ccache. By
> using "find /var/tmp/ccache -cmin 60" I see that these files are regularly
> updated when I compile programs with Gentoo's "emerge world". Because of
> ccache working with system updates I wouldn't make links that can break
> things as they are now.
> Therefore I've made both /home/kdevel/bin/g++ and /home/kdevel/bin/gcc
> symbolic links to /usr/bin/ccache. The /home/kdevel/bin directory is the
> first listed in $PATH for the kdevel user. After doing this I re-compiled
> kdelibs as kdevel user and then I checked /home/kdevel/var/tmp/ccache, but
> the directory is still empty.
> I think this problem is KDE related because the advice to export CCACHE_DIR
> in ~/.bashrc is taken from the tutorial in developing KDE from the
> site.
> Please, what am I missing?

It's been a while since I last used gentoo, but IIRC you need to enable ccache 
in your PATH to be used system-wide. Enabling it in make.conf only enables it 
for portage.

The handbook seems to confirm that:

Hope that helps,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list