[ccache] ccache false cache hit when creating precompiled headers

Mark Fieldhouse mark at mediasolutions.co.uk
Mon Aug 4 14:09:08 MDT 2014


Hello,
 
ccache appears to break our compilation by incorrectly retrieving cached
precompiled headers.
 
The problem is our build has a header file which has;
 
#define NUM_COMPOSITE_OUTPUTS 0
void func(int x);
 
This gets compiled and put in the cache by ccache.
We then change the file to be;
 
#define NUM_COMPOSITE_OUTPUTS 2
void func(int x);
 
And ccache runs its own 'direct' hash function and correctly decides
that the file is not in the cache.
Then it runs the C pre-processor and hashes the output.
 
The output of the C pre-processor hasn't changed so ccache incorrectly
retrieves the cached version of the file
Which has;
#define NUM_COMPOSITE_OUTPUTS 0
 
Failed build.
 
Let me know if this is a known issue or if you'd like me to raise a bug
report?
 
Cheers,
Mark


More information about the ccache mailing list