Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jul 2020 22:14:13 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 245452] net-im/telegram-desktop: Fails to build with ccache: fatal error: file '*' has been modified since the precompiled header '*'
Message-ID:  <bug-245452-7788-AjrhO9Qqb8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-245452-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-245452-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245452

--- Comment #17 from Charlie Li <ml+freebsd@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 do=
es
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@github.com:llvm/llvm-project.git llvmorg-10.0.0-129-gd24d5c8e308)) th=
an
the comp
iler ((git@github.com:llvm/llvm-project.git llvmorg-10.0.1-rc2-0-g77d76b71d=
7d))

Further tests will need done to find other error messages, ie when base LLVM
stays the same.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245452-7788-AjrhO9Qqb8>