[Bug 245452] net-im/telegram-desktop: Fails to build with ccache: fatal error: file '*' has been modified since the precompiled header '*'
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jul 2 22:14:14 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245452
--- Comment #17 from Charlie Li <ml+freebsd at vishwin.info> ---
After hitting this problem with audio/audacity (which now uses cmake), this is
almost entirely a ccache implementation defect. What we're dealing with is how
clang handles precompiled headers, which is a bit different than how gcc does
it.
Some upstream threads for context:
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4400
https://github.com/ccache/ccache/issues/539
https://github.com/ccache/ccache/issues/549
With regard to PCHs in ccache generally, ccache(1) has a dedicated section
describing how to make it process PCHs properly (because it doesn't by
default). Quote the part that needs done in ccache.conf:
ccache has support for GCC's precompiled headers. However, you have to
do some things to make it work properly:
o You must set sloppiness to pch_defines,time_macros. The reason is
that ccache can't tell whether __TIME__ or __DATE__ is used when
using a precompiled header. Further, it can't detect changes in
#defines in the source code because of how preprocessing works in
combination with precompiled headers.
Once added, at least on my -CURRENT setup where base LLVM got updated since I
last built and cached this port, the error message changes to:
error: PCH file built from a different branch
((git at github.com:llvm/llvm-project.git llvmorg-10.0.0-129-gd24d5c8e308)) than
the comp
iler ((git at github.com:llvm/llvm-project.git llvmorg-10.0.1-rc2-0-g77d76b71d7d))
Further tests will need done to find other error messages, ie when base LLVM
stays the same.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list