/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-editors/emacs-30.0.9999/temp/ccTDISvI.o: plugin needed to handle lto object /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-editors/emacs-30.0.9999/temp/ccTDISvI.o: plugin needed to handle lto object lto1: internal compiler error: original not compressed with zstd 0x11b4301 internal_error(char const*, ...) ???:0 0x128df16 cgraph_node::get_untransformed_body() ???:0 0x128d483 cgraph_node::expand() ???:0 0x19c08af symbol_table::compile() ???:0 0x19b51b0 lto_main() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. make[4]: *** [/var/tmp/portage/app-editors/emacs-30.0.9999/temp/ccUOIbLs.mk:2: /var/tmp/portage/app-editors/emacs-30.0.9999/temp/ccsaJZm8.ltrans0.ltrans.o] Error 1 lto-wrapper: fatal error: make returned 2 exit status compilation terminated. collect2: fatal error: lto-wrapper returned 1 exit status compilation terminated. libgccjit.so: error: error invoking gcc driver
Created attachment 887555 [details] The build log.
Created attachment 887556 [details] The emerge --info output
Created attachment 887557 [details] patch to reproduce issue easily This patch makes it easier to reproduce this issue since then emacs will fail emerging without -flto.
It's always worth giving full context, e.g. the discussions you and I had on the libgccjit ML. Anyway, if GCC is ICEing, then it's something to report to the GCC bugzilla (if you have a standalone test case), or bring it up on the libgccjit ML and ask for advice.
True. This is the original thread I started on the libgccjit mailing list: https://gcc.gnu.org/pipermail/jit/2024q1/001853.html Basically, this started as an issue with libgccjit not being compiled with LTO support but that was fixed. I also started a thread in emacs-devel but no one there is able to reproduce it and they suggest reporting it to Gentoo: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69689
What package provides libgccjit.so?
You need to report it to the libgccjit people. It's not an Emacs bug for it to ICE (although it's possible that the libgccjit integration in Emacs needs to do something to enable compression).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28fca56a1639578fc58de1e8310b7c94a5e12e09 commit 28fca56a1639578fc58de1e8310b7c94a5e12e09 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-04-22 03:13:04 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-04-22 03:13:52 +0000 toolchain.eclass: propagate USE=zstd to libgccjit build You *can* do LTO with libgccjit, apparently, and it even works if we don't break the compression used for LTO with it. Pass down the zstd arg from USE=zstd like we do for the regular build. Thanks to StrawberryTea for reporting. Closes: https://bugs.gentoo.org/926953 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6706bf513d4ddfd48b16871ecb062746aab6dec commit b6706bf513d4ddfd48b16871ecb062746aab6dec Author: Sam James <sam@gentoo.org> AuthorDate: 2025-04-13 11:44:34 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-04-13 11:45:17 +0000 toolchain.eclass: fix GCC 8 with USE=jit This has been broken for a year(!) since 28fca56a1639578fc58de1e8310b7c94a5e12e09. Bug: https://bugs.gentoo.org/926953 Signed-off-by: Sam James <sam@gentoo.org> eclass/toolchain.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)