[OE-core] The design document for ccache-native

Phil Blundell pb at pbcl.net
Fri Jun 10 13:25:03 UTC 2011


On Fri, 2011-06-10 at 08:09 -0500, Mike Westerhof wrote:
> I fear that the use of ccache is inherently risky with OE.  Given the
> (relatively common) case where the user blows away their TMPDIR in order
> to get a full, clean rebuild after an update to the toolchain is make,
> it is possible that ccache will erroneously re-use an object created by
> the earlier version of the toolchain.
> 
> While imperfect, I would suggest that we would do better if we would
> somehow embed the PV (or something like that) for the toolchain into the
> CCACHE_DIR, thus ensuring that we don't risk the re-use of old objects
> when the toolchain is updated.

ccache does already include the mtime and file size of the compiler in
the hash that it uses to determine whether two compilations are "the
same".  I'm not sure that mangling the compiler version into ${PV} is
going to buy much.

>(Frankly, given my experiences with it, I'd prefer we just disable
>ccache entirely with OE.)

I agree that it should probably be disabled by default.  I've also had
some slightly bad experiences with ccache although I don't think I have
ever encountered the failure mode you mentioned above.

p.






More information about the Openembedded-core mailing list