[ccache] -MD flag and absolute path problem

tal zilcer tal.zilcer at gmail.com
Mon Jan 20 10:49:43 MST 2014


hi,

I use a shared cache over NFS to increase cache hits for users on different
servers.

*some more info:*
1) ccache version is 3.19
2) CCACHE_BASEDIR=/home (to get hits from different folders)
3) the toolchain is located in the user home folder

*when i try to rebuild busybox i get an error:*
fixdep: /home/*other_user*/................./gcc/....../4.8.0/include-fixed/limits.h:
No such file or directory

i compile busybox in my home directory /home/*talz*.
so when i compile i get a cache hit and retrieve the .d file from the cache
and get /home/*other_user*/.... in the .d file(previous hit by another
user).
this is because the -MD flag that causes h files in the toolchain to
be absolute path in the .d file.
*(FYI, this could  also happen if my makefile targets were absolute path
and not relative.....)*

i though about one solution which is to add  the path of the toolchain
to CCACHE_COMPILERCHECK, resulting in getting cache misses if the toolchain
is not from the user folder.
this will of course cause many not code related cache misses which i wish
to prevent.
also this will not work if the makefile targets are absolute path.

what else can i do???

thanks,
tal


More information about the ccache mailing list