is ccache working?
matthew
matthew at mjdsystems.ca
Tue Aug 3 05:48:11 BST 2010
On Sunday 01 August 2010 07: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
> techbase.kde.org site.
>
> Please, what am I missing?
>
> Regards,
>
> fabio
>
One thing to take note of, cmake, when first runs, stores the complete path to gcc in the CMakeCache.txt. It will not update this value normally. Even if the path changes, it remains constant. So adding ccache to your path will *not* make KDE's build use ccache. You either have to manually replace the value (as far as I know, unsupported and dangerous), or recreate your build directory. I seem to remember reading about this behaviour inside of cmake's documentation, so I don't think this is KDE specific.
Hope that helps,
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100803/2964c702/attachment.sig>
More information about the kde-core-devel
mailing list