FreeBSD ccache port is wonderfiul!

Jens Schweikhardt schweikh at
Thu Nov 24 18:31:40 GMT 2005

On Mon, Nov 21, 2005 at 07:25:15PM +0300, Andrew P. wrote:
# Beware, ccache brings bad luck in quite a few cases.
# Start using it for /usr/src and first effects will be visible
# in a few weeks.

This is almost certainly a pilot error. The problem is invariably
one of not understanding how ccache finds the real compiler in
conjunction with not knowing the internals of a 'make buildworld',
especially when CC and CXX are set. (Note to Tridge: buildworld
compiles a cc, installs a complete temporary build environment and
uses that environment's compiler and headers from that point on.
The interesting problem is how to make ccache find the same cc's.
There are ways, but they're not entirely obvious).

The effect of "It works for several days/weeks to build the world, but
then suddenly breaks" is caused by using the /usr/bin/cc compiler in
stages 4.1 and later, when instead /usr/obj/usr/src/tmp/usr/bin/cc must
be used. This stage has headers that differ from the ones /usr/bin/cc
finds in /usr/include. So whenever a macro is added to one of the
headers and that macro used anywhere else the (pilot errored) build
breaks from that moment on.

# IMHO, ccache has still some way to
# go in order into production.

It is ready for production and has been for as long as I use it (1yr).
Please see the thread "Using ccache for build{world, kernel}" on the
current@ mailing list (only two weeks ago).


Jens Schweikhardt
SIGSIG -- signature too long (core dumped)

More information about the freebsd-ports mailing list