Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 856835 - sys-devel/gcc: ICE when building dev-python/libvirt-python-8.5.0 with LTO (lto1: internal compiler error: resolution sub id 0xd4e494b0b7e24639 not in object file)
Summary: sys-devel/gcc: ICE when building dev-python/libvirt-python-8.5.0 with LTO (lt...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-07-07 09:45 UTC by Agostino Sarubbo
Modified: 2023-07-28 08:20 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,58.51 KB, text/plain)
2022-07-07 09:45 UTC, Agostino Sarubbo
Details
build.log + emerge info (build.log,27.53 KB, text/x-log)
2023-02-15 19:05 UTC, gekret005
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-07-07 09:45:32 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/libvirt-python-8.5.0 fails to compile (lto).
Discovered on: amd64 (internal ref: lto_tinderbox)

NOTE:
This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-07 09:45:35 UTC
Created attachment 790508 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-07-07 09:45:37 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


lto1: internal compiler error: resolution sub id 0x26d34201fadccf58 not in object file
lto1: internal compiler error: resolution sub id 0x26d34201fadccf58 not in object file
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-07 23:27:45 UTC
Reproduced with 12.1.1_p20220702.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-07 23:32:57 UTC
I think this might be one of these horrible distutils races, and it's just exposing a gcc ICE (instead of a proper error) because some file gets trampled on.
Comment 5 Adrien Dessemond 2022-10-13 13:31:55 UTC
Got the same.

x86_64-pc-linux-gnu-gcc -shared -flto=8 -O3 -pipe -march=native -fomit-frame-pointer -fopt-info-vec -mindirect-branch=thunk -mindirect-branch-register -flto=auto -ffat-lto-objects build/temp.linux-x86_64-cpython-38/build/libvirt-lxc.o build/temp.linux-x86_64-cpython-38/libvirt-lxc-override.o build/temp.linux-x86_64-cpython-38/libvirt-utils.o build/temp.linux-x86_64-cpython-38/typewrappers.o -L/usr/lib64 -lvirt-lxc -lvirt -o build/lib.linux-x86_64-cpython-38/libvirtmod_lxc.cpython-38-x86_64-linux-gnu.so
x86_64-pc-linux-gnu-gcc -shared -flto=8 -O3 -pipe -march=native -fomit-frame-pointer -fopt-info-vec -mindirect-branch=thunk -mindirect-branch-register -flto=auto -ffat-lto-objects build/temp.linux-x86_64-cpython-38/build/libvirt-qemu.o build/temp.linux-x86_64-cpython-38/libvirt-qemu-override.o build/temp.linux-x86_64-cpython-38/libvirt-utils.o build/temp.linux-x86_64-cpython-38/typewrappers.o -L/usr/lib64 -lvirt-qemu -lvirt -o build/lib.linux-x86_64-cpython-38/libvirtmod_qemu.cpython-38-x86_64-linux-gnu.so
lto1: internal compiler error: resolution sub id 0x9d010f8ae3450e26 not in object file
0x7f3f4fe7a2cc __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0x7f3f4fe7a386 __libc_start_main_impl
        ../csu/libc-start.c:381
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
S
Comment 6 Lloyd 2023-02-13 06:54:20 UTC
Same here:

8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8<
creating build/lib.linux-x86_64-cpython-311
x86_64-pc-linux-gnu-gcc -shared -Wl,-O2 -Wl,--as-needed -Wl,--sort-common -Wl,--enable-new-dtags -Wl,--gc-sections -Wl,-flto=auto -march=native -mtune=native -m64 -flto=auto -O2 -pipe -march=native -mtune=native -m64 -flto=auto -O2 -pipe build/temp.linux-x86_64-cpython-311/build/libvirt-lxc.o build/temp.linux-x86_64-cpython-311/libvirt-lxc-override.o build/temp.linux-x86_64-cpython-311/libvirt-utils.o build/temp.linux-x86_64-cpython-311/typewrappers.o -L/usr/lib64 -lvirt-lxc -lvirt -o build/lib.linux-x86_64-cpython-311/libvirtmod_lxc.cpython-311-x86_64-linux-gnu.so
x86_64-pc-linux-gnu-gcc -shared -Wl,-O2 -Wl,--as-needed -Wl,--sort-common -Wl,--enable-new-dtags -Wl,--gc-sections -Wl,-flto=auto -march=native -mtune=native -m64 -flto=auto -O2 -pipe -march=native -mtune=native -m64 -flto=auto -O2 -pipe build/temp.linux-x86_64-cpython-311/build/libvirt-qemu.o build/temp.linux-x86_64-cpython-311/libvirt-qemu-override.o build/temp.linux-x86_64-cpython-311/libvirt-utils.o build/temp.linux-x86_64-cpython-311/typewrappers.o -L/usr/lib64 -lvirt-qemu -lvirt -o build/lib.linux-x86_64-cpython-311/libvirtmod_qemu.cpython-311-x86_64-linux-gnu.so
lto1: internal compiler error: resolution sub id 0x69c38f660fb8a730 not in object file
0x16cbd4b internal_error(char const*, ...)
	???:0
0x68e3a9 read_cgraph_and_symbols(unsigned int, char const**)
	???:0
0x65c5cb 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.
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8<

System is: Linux-5.15.88-gentoo-x86_64
Comment 7 gekret005 2023-02-15 19:05:21 UTC
Created attachment 851484 [details]
build.log + emerge info

Also ran into this.
Comment 8 Adrien Dessemond 2023-04-18 16:15:36 UTC
I didn't revisit this issue with a more recent version of sys-devel/gcc:12 yet but FYI I do not see the ICE anymore with sys-devel/gcc:13 (13.0.1_pre20230416 at date of writing).
Comment 9 Larry the Git Cow gentoo-dev 2023-07-28 08:20:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86035d3667a85f92aa5e6596fdd8cf5815e4b47b

commit 86035d3667a85f92aa5e6596fdd8cf5815e4b47b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-07-28 08:20:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-07-28 08:20:03 +0000

    dev-python/libvirt-python: set -j1 to avoid setuptools breakage
    
    May ICE when building w/ GCC LTO or even be miscompiled (even w/o LTO).
    
    Bug: https://bugs.gentoo.org/856835
    Closes: https://bugs.gentoo.org/907718
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/libvirt-python/libvirt-python-9.3.0.ebuild | 5 +++++
 dev-python/libvirt-python/libvirt-python-9.4.0.ebuild | 5 +++++
 dev-python/libvirt-python/libvirt-python-9.5.0.ebuild | 5 +++++
 dev-python/libvirt-python/libvirt-python-9999.ebuild  | 5 +++++
 4 files changed, 20 insertions(+)