Re: ccache false cache hit when creating precompiled headers

Joel Rosdahl <[email protected]> Fri, 8 Aug 2014 10:36:49 +0200
Newsgroups gmane.comp.compilers.ccache
Message-ID <CAK8D=phBLLge3_rAYGBf+Kfw9S7E3x6nn3t9dQv6DD4pBdLcng@mail.gmail.com>
Hi Mark,

See https://bugzilla.samba.org/show_bug.cgi?id=10212.

-- Joel


On 4 August 2014 22:09, Mark Fieldhouse <[email protected]> wrote:

> 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
> _______________________________________________
> ccache mailing list
> [email protected]
> https://lists.samba.org/mailman/listinfo/ccache
>