pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

building with ccache w/gcc4.8



Trying desparately to reduce iterative build times with some behemoths like webkit that kill my poor little quadcore, so I package-installed ccache (3.1.9).

I've never used ccache before so please be kind.

I added/modified the following to my mk.conf:

PKGSRC_COMPILER= ccache gcc
CCACHE_DIR=     ${WRKOBJDIR}/.ccache

where WRKOBJDIR=/var/tmp/pkgsrc

This all on sunos 5.11 with ABI=64 and gcc 4.8.1 installed.

perhaps I'm missing something, but it appears to me that ccache is not operating correctly...

The following is after 40 minutes of build.
richard@devzoneX:~$ CCACHE_DIR=/var/tmp/pkgsrc/.ccache/ ccache -s
cache directory                     /var/tmp/pkgsrc/.ccache/
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                             0
called for link                      176
called for preprocessing            2482
unsupported source language         1373
autoconf compile/link                  2
no input file                          7
files in cache                         0
cache size                             0 Kbytes
max cache size                       8.0 Gbytes

not a single file gets put into the cache.

following the hints of some much earlier posts, I set logging on and here a typical extract:
[2013-08-13T18:20:27.910665 9563 ] === CCACHE STARTED 
=========================================
[2013-08-13T18:20:27.911314 9563 ] Command line: 
/var/tmp/pkgsrc/www/webkit-gtk3/work/.ccache/bin/gcc -c -O2 
-I/var/tmp/pkgsrc/www/webkit-gtk3/work/.buildlink/include
 -I/var/tmp/pkgsrc/www/webkit-gtk3/work/.buildlink/include/gettext 
-I/var/tmp/pkgsrc/www/webkit-gtk3/work/.buildlink/include/freetype2 
-I/var/tmp/pkgsrc/www/webkit-gt
k3/work/.buildlink/include/libdrm -DUSE_SYSTEM_MALLOC conftest.c -specs 
/var/tmp/pkgsrc/www/webkit-gtk3/work/.wrapper/specs.libgcc -m64 
-L/var/tmp/pkgsrc/www/webkit-g
tk3/work/.buildlink/lib
[2013-08-13T18:20:27.911363 9563 ] Hostname: devzoneX
[2013-08-13T18:20:27.911385 9563 ] Working directory: (null)
[2013-08-13T18:20:27.911465 9563 ] Unsupported source extension: 
/var/tmp/pkgsrc/www/webkit-gtk3/work/.wrapper/specs.libgcc
[2013-08-13T18:20:27.911487 9563 ] Failed; falling back to running the real 
compiler
[2013-08-13T18:20:27.911501 9563 ] Executing 
/var/tmp/pkgsrc/www/webkit-gtk3/work/.gcc/bin/gcc -c -O2 
-I/var/tmp/pkgsrc/www/webkit-gtk3/work/.buildlink/include -I/var
/tmp/pkgsrc/www/webkit-gtk3/work/.buildlink/include/gettext 
-I/var/tmp/pkgsrc/www/webkit-gtk3/work/.buildlink/include/freetype2 
-I/var/tmp/pkgsrc/www/webkit-gtk3/work
/.buildlink/include/libdrm -DUSE_SYSTEM_MALLOC conftest.c -specs 
/var/tmp/pkgsrc/www/webkit-gtk3/work/.wrapper/specs.libgcc -m64 
-L/var/tmp/pkgsrc/www/webkit-gtk3/wor
k/.buildlink/lib
[2013-08-13T18:20:27.911635 9563 ] Acquired lock 
/var/tmp/pkgsrc/.ccache/b/stats.lock
[2013-08-13T18:20:27.911877 9563 ] Releasing lock 
/var/tmp/pkgsrc/.ccache/b/stats.lock
[2013-08-13T18:20:27.911894 9563 ] Unlink /var/tmp/pkgsrc/.ccache/b/stats.lock 
(as-tmp)
[2013-08-13T18:20:27.911957 9563 ] Result: unsupported source language

looking at the wrapper:
richard@devzoneX:~$ cat 
/var/tmp/pkgsrc/www/webkit-gtk3/work/.wrapper/specs.libgcc
*link_libgcc:
%D -R/opt/pkg/gcc48/x86_64-sun-solaris2.11/lib/%M

Setting CCACHE_CPP2=yes seems to do nothing even though the problem appears to be related to the "extension".

BTW, just to make sure I tested some simple gcc builds outside of pkgsrc and those seem to work fine (using default patch for CCACHE_DIR in $HOME).

Is anybody using ccache successfully?  any hints would be more than welcome.

cheers



Home | Main Index | Thread Index | Old Index