Sun Sep 6 16:29:27 MDT 2009
cache across all developers than to set up a single cache for each
subproject team. Also, in the above example, subprojects C and D have
the same configuration and so could actually use the same cache.
My issue is that the real scenario is much more complex, with each
subproject being comprised many components, which in turn are components
etc. So identifying the configurations is not trivial. I suspect that in
reality, each project has some compilation in common with some of the
other projects, but it's hard to tell which. So if ccache can cope with
using a network-shared cache, then having one single (large) cache would
give maximum efficiency across all the projects, as any
cache-partitioning I impose (per-project or per-developer or
I hope that makes sense, but I don't know how ccache actually reads the
cache. In effect, is it safe to use the same shared cache on multiple
machines? If not, then is it safe to run a parallel build (e.g. make -j
2) on a local machine with a local cache, as presumably that has the
same implications wrt. multiple concurrent cache updates.
Thanks for your help!
From: Vincent Dupuis [mailto:vincedupuis at hotmail.com]=20
Sent: 25 September 2009 13:18
To: Dalton, Tom
Cc: ccache at lists.samba.org
Subject: RE: [ccache] Build Safety
Hi, and welcome to ccache!
> Date: Fri, 25 Sep 2009 10:22:14 +0200
> From: tom.dalton at eds.com
> To: ccache at lists.samba.org
> Subject: [ccache] Build Safety
> I think I know the answer to this question, but I want a
> In the past, I have used the Clearcase version control system,
> it's own make system, clearmake. Clearmake provides some build
> functionality (which it terms wink-ins), that allows it to
> build objects from other users views. I have experienced a lot
> problems with this system, because clearcase wouldn't detect
> users were building the same file in a different environment
> external libraries at different versions. This caused me all
That's why it is not very used.
> Is it possible for inconsistent environments between builds to
> ccache to incorrectly use a cached object instead of
> example, different builds of gcc, different external libraries
> circumstances could cause this?
for each compile ccache makes a key with the following
1. the pre-processor output from running the compiler
2. the command line options=20
3. the real compilers size and modification time=20
4. any stderr output generated by the compiler
if something changes then it recompiles and recache the new
so if you use a different external librairies, #1 and maybe #2
> Secondly, if there is not much that can break ccache, is it
> use a shared cache (e.g. on an nfs-shared disk) to allow many
> many hosts to cache build results across several versions of a
> product? (which will mean different gcc versions, libraries,
if each users use different gcc versions, libraries, even
sharing the cache is not useful. It's better to use it locally.
Try to compile
your product from scratch witch ccache and recompile (clean
compare the time. (ie: time make all). Here is my current stats
at this moment:
cache hit 16462
cache miss 11307
called for link 70
compile failed 63
preprocessor error 4
not a C/C++ file 1198
files in cache 8779
cache size 793.5 Mbytes
max cache size 976.6 Mbytes
like you see, I skip compilation of 16462 files locally.
> Thanks for your help - ccache sounds really useful, but I want
> sure there's no 'traps'!
> ccache mailing list
> ccache at lists.samba.org
Naviguez plus vite avec Internet Explorer 8 Ici.
More information about the ccache