CCACHE in FreeBSD 10.0-RELEASE

According to /usr/local/share/doc/ccache/ccache-howto-freebsd.txt[0], to make devel/ccache work with ports you just need to add WITH_CCACHE_BUILD=yes to /etc/make.conf[1]. However, it doesn't appear to be working:

ccache -s
Code:
cache directory                     /root/.ccache
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                             0
files in cache                         0
cache size                             0 Kbytes
max cache size                       1.0 Gbytes

That's after building nearly 200 ports with Poudriere, which has ccache enabled:

grep CCACHE /usr/local/etc/poudriere.conf
Code:
CCACHE_DIR=/var/cache/ccache

ls /var/cache/
Code:
pkg

What am I missing? Thanks.


[0] /usr/local/share/doc/ccache/ccache-howto-freebsd.txt
ccache said:
To use ccache for ports, just add WITH_CCACHE_BUILD=yes to
/etc/make.conf. The rest of this guide is for building
/usr/src and other checkouts.

[1] /etc/make.conf
Code:
WITH_CCACHE_BUILD=yes
CCACHE_CPP2=1
 
1. The directory shown in the ccache -s output differs from the one you've specified in poudriere.conf. To see statistics for a cache directory other than the default set CCACHE_DIR accordingly:
Code:
env CCACHE_DIR=/var/cache/ccache  ccache -s

2. /var/cache/ccache does not exist. The wiki suggest to create it:
Code:
mkdir /var/cache/ccache
 
Thanks, @worldi.

env CCACHE_DIR=/var/cache/ccache ccache -s
Code:
cache directory                     /var/cache/ccache
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                             0
files in cache                         0
cache size                             0 Kbytes
max cache size                       1.0 Gbytes

Still no sign of ccache being used.

We'll see if creating the directory works. Perhaps /usr/local/share/doc/ccache/ccache-howto-freebsd.txt should be updated.
 
Last edited by a moderator:
Back
Top