[ccache] ccache shared cache and automake based VPATH builds

Alex Hornby alex at anvil.com
Wed Feb 5 20:41:36 EST 2003


Hi,

I have ccache 2.1.1 installed and I am trying to use a shared cache. All
developers have the following set and appropriate umasks.

CCACHE_DIR=/vols/build2/ccache
CCACHE_NOLINK=1

Developers never seem to get shared cache hits from other developers, I
think because we normally build in a directory not equal to the source
dir (usual automake based VPATH build).

I've already worked around a problem where there would be a -I to the
top source dir (which includes developer name) which would prevent
shared caching. Instead I create a symlink to the top sourcedir from the
builddir. This allows relative ../.. style paths for the -I that look
the same for all developers.

Thus "make foo.o" refers to the full path to foo.cpp. As the full path
includes the developers username, I think this is may be preventing the
ccache from getting a cache hit from a file built by another developer.

e.g. automake output from "make foo.o" with my -I workround applied.

ccache g++ -DHAVE_CONFIG_H -I. -I../include/source/ate/foo -c -o foo.o
`test -f '/home/alex/trees/ate-head/foo/foo.cpp' || echo
'/home/alex/trees/ate-head/foo/'`/home/alex/trees/ate-head/foo/foo.cpp

Is the path name the problem? If so is there a work around for this? I
think I need a ccache based on file basename + file contents rather than
file pathname + file contents. I don't think I can do a work around as I
did for the includes as the full file path is handed to the compiler by
automake.

Cheers,
Alex.



More information about the ccache mailing list