The Samba-Bugzilla – Bug 7659
building nel from the ryzom project on x86_64 with ccache results in preprocessor errors
Last modified: 2010-09-16 12:42:41 UTC
building nel from the ryzom project on x86_64 with ccache results in lots of preprocessor errors.
you can checkout the sourcecode here:
the testbuild was done on fedora15/rawhide.
Thanks for the bug report!
You get preprocessor errors because precompiled headers are being used, and ccache 3.0.1 doesn't support that (see "preprocessor error" on http://ccache.samba.org/manual.html#_performance). However, support for precompiled headers has been implemented in the development version of ccache and will be part of ccache 3.1. If you're interested, you are very welcome to try it out! Download instructions are here: http://ccache.samba.org/repo.html. Note that you will have to set CCACHE_SLOPPINESS=time_macros (or even better: time_macros,include_file_mtime) to make ccache work properly with PCH; this is described in the manual.
By the way, here are some results from building nel with/without PCH and with/without ccache (current dev version) on my machine (serial build):
With PCH, without ccache: 641 seconds
With PCH, with ccache, first time: 700 seconds
With PCH, with ccache, second time: 68 seconds
Without PCH, without ccache: 817 seconds
Without PCH, with ccache, first time: 851 seconds
Without PCH, with ccache, second time: 23 seconds
(All figures are with a warm disk cache.)
As you see, there's a trade-off between having faster first-time compilations (enable PCH) or faster recompilations (don't enable PCH). The reason why "with ccache, second time" is slower with PCH than without is that ccache has to hash the .gch file (which typically is very large) for each compilation.