----- Original Message -----
From: "Olaf Westrik" <weizen_42@...>
Sent: Saturday, January 22, 2011 10:57 PM
Subject: Re: [IPCop-devel] ccache-3 upgrade
> Since the ccache changes building is considerably slower for me.
> I have not yet run comparing tests, but I estimate the build to take
> twice the time it used to.
> Has anyone else noticed the same?
I had the same mind and started to look yesterday.
I think this is at least twice slower than previously using ccache-1.4.
First there has been some changes that invalidate the cache, with hardening
and gcc changes, so you have to rebuild once after all those changes to feed
the cache and another time to have hit from cache. As I changed gcc
compilation rcently to disable mudflap and openmp (as we don't use that),
this is normal that there is new gcc hash value during first compilation but
that should be faster for next compilations. In fact, that does not look to
be the case after toolchain.
I started to look at what is wrong. I should say for now I don't know.
At first glance, looking in preparation.log; CCACHE_COMPILER_CHECK signature
is the same at each build (and even does not vary from machine to machine
except the first from gcc host before gcc pass1 is compiled), so the issue
should not be there.
Looking in log when compilation end, _build_ccache show that hit ratio is
very low (with 3 more miss than hit).
cache hit (direct) 525
cache hit (preprocessed) 7606
cache miss 23158
called for link 3195
multiple source files 22
compile failed 1542
preprocessor error 622
bad compiler arguments 332
unsupported source language 359
autoconf compile/link 9119
unsupported compiler option 5905
no input file 2388
In contrary, for toolchain build, stat look good with 10 more hit than miss
cache hit (direct) 6634
cache hit (preprocessed) 661
cache miss 497
called for link 838
compile failed 571
preprocessor error 162
bad compiler arguments 90
unsupported source language 12
autoconf compile/link 2896
unsupported compiler option 1243
no input file 347
I think I know what happen as I am working on cleaning env creation on
toolchain_make and chroot_make.
In toolchain, we do make -f $* install list-of-var
In later stages, we do
chroot $LFS env -i list-of-var bash -x -c "cd /usr/src/lfs && make -f $*
The difference between variables defined before or after the make is that in
the 'before' case, sub-makefile did not inherit those values unless they are
exported in master script
(and we do not use env -i), CCACHE_DIR is exported in make.sh
During toolchain build, actually CCACHE_DIR exist for lfs files and
During chroot_make, CCACHE_DIR only exist for lfs files and not for
I suppose with ccache-3, we need to have CCACHE_DIR available on
But when I shift CCACHE_DIR to the 'after' make part, it does not look to
work when checking from another shell, looking with
CCACHE_DIR=./ccache build_i486/tools_i486/usr/bin/ccache -s
I am lookink at the log produced when adding
to the variables given to chroot_make to debug what happen after toolchain.