Created attachment 862182 [details] Output of ebuild .../ccache-4.8.1.ebuild package I came across this because an embedded build environment, specifically LibreElec.tv, tries to build ccache 4.8.1 as part of its toolchain. Luckily, I can easily reproduce this error using the current (hard-masked) ccache-4.8.1.ebuild. Simply compiling ccache-4.8.1 with $ ebuild /path/to/portage/dev-util/ccache/ccache-4.8.1.ebuild package brings up an g++/gcc internal error/stack trace for me, which instructs to use -freport-bug. To get well readable logs, I then did this: $ MAKEOPTS="-j1" CFLAGS='-freport-bug' CXXFLAGS='-freport-bug' \ ebuild /path/to/portage/dev-util/ccache/ccache-4.8.1.ebuild package I'll attach both its output and the preprocessed source mentioned there.
Created attachment 862183 [details] Preprocessed source to be attached to bug report as per g++ diagnostic, ccCbwiil.out
Just reconfirmed, current stable ccache-4.7.4 correctly builds with the very same compiler. I've also created an issue at upstream, the breaking usage of LOG() in LocalStorage.cpp is new for 4.8.1. My C++ is too rusty to say either way, maybe what's asked of the compiler there is a bit edgy. Or not. It looks innocuous enough. https://github.com/ccache/ccache/issues/1289
*** This bug has been marked as a duplicate of bug 906310 ***
Dug after this a bit as part of https://github.com/ccache/ccache/issues/1289 The issue seems to originate with ccache's use of the fmt library, more specifically its FMT_STRING_IMPL which allows syntax checking of formatting strings to compile time. In case anyone finds this and is bitten by a similar issue, here's what a workaround (forgoing the compile time syntax check) can look like: https://github.com/ccache/ccache/commit/0d425bc96fb08f0e5c61527796894909bd24da47
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1683082f6735325895ab84e5d16801dc7fad2f5 commit c1683082f6735325895ab84e5d16801dc7fad2f5 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-08-08 02:09:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-08-08 02:09:48 +0000 dev-util/ccache: backport ICE workaround Already fixed in stable GCC but let's backport as it makes life easier for people. Bug: https://bugs.gentoo.org/906310 Bug: https://bugs.gentoo.org/906942 Signed-off-by: Sam James <sam@gentoo.org> dev-util/ccache/ccache-4.8.2.ebuild | 1 + .../files/ccache-4.8.2-gcc-ice-workaround.patch | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+)