Summary: | sys-devel/gcc-9.2.0-r2 internal compiler error on x11-libs/wxGTK/3.0.4-r302 (pax aslr) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Fedja Beader <fedja> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | edgardragon444, jstein, sandino |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Terminal log (build log + some more command-line action)
Broad set of logs (working and failed merges) |
Description
Fedja Beader
2020-01-03 17:06:38 UTC
Created attachment 602422 [details]
Terminal log (build log + some more command-line action)
Thank you for the report. Please paste the emerge info as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket We need to have all information at hand before ticket assignment, so that the maintainer can look after it in one session with minimal number of callbacks. Please reopen this ticket (Status:unconfirmed) afterwards. Zorry pointed out on #gentoo-toolchain that it's a PCH-related failure: https://bugs.gentoo.org/301299 We have a few things here: - x11-libs/wxGTK unconditionally uses PCH headers (easy to disable with configure option). - gcc's PCH loading code does not detect the fact that PCH headers are loaded by pax kernel at unexpected location. In this bug I'll poke at gcc to check if we can fix it's mmap() error handling. For everyone else, this makes the build succeed: diff /var/portage/tree/x11-libs/wxGTK/wxGTK-3.0.4-r302.ebuild /var/portage/local/x11-libs/wxGTK/wxGTK-3.0.4-r302.ebuild --- /var/portage/tree/x11-libs/wxGTK/wxGTK-3.0.4-r302.ebuild 2019-10-11 18:11:20.000000000 +0200 +++ /var/portage/local/x11-libs/wxGTK/wxGTK-3.0.4-r302.ebuild 2020-01-03 22:45:22.653003797 +0100 @@ -100,6 +100,7 @@ --with-zlib=sys --with-expat=sys --enable-compat28 + --disable-precomp-headers $(use_with sdl)" # debug in >=2.9 or perhaps also EXTRA_ECONF=--disable-precomp-headers emerge ... wxGTK... Created attachment 640028 [details] Broad set of logs (working and failed merges) Thx, applying `EXTRA_ECONF=--disable-precomp-headers` resolved my compile issues, even though my output is not segfault, but different. The bizarre thing is, I removed the EXTRA_ECONF, and it compiled again right after without a hitch. I unmerged it, and reemerged it. Still can't reproduce anymore. So I did a @world: > Cloud / # emerge -avuDN --quiet-fail=y --with-bdeps=y --keep-going @world > These are the packages that would be merged, in order: > Calculating dependencies ... done! > [ebuild R ] dev-libs/libpcre-8.43:3::gentoo USE="bzip2 cxx jit pcre16* pcre32* readline recursion-limit (split-usr) (unicode) zlib -libedit -static-libs" ABI_X86="(64) -32 (-x32)" 0 KiB > [ebuild U ] app-crypt/gnupg-2.2.20::gentoo [2.2.19::gentoo] USE="bzip2 ldap nls readline smartcard ssl usb -doc (-selinux) -tofu -tools -user-socket -wks-server" 6,628 KiB And afterwards attempt installing a package: > Cloud / # emerge -av -j32 --quiet-fail=y kicad > These are the packages that would be merged, in order: > Calculating dependencies ... done! > [ebuild N ] x11-libs/wxGTK-3.0.4-r302:3.0-gtk3::gentoo USE="X debug gstreamer libnotify opengl sdl tiff (-aqua) -doc -webkit" ABI_X86="(64) -32 (-x32)" 0 KiB > [ebuild N ~] dev-python/wxpython-4.0.7:4.0::gentoo USE="-test -webkit" PYTHON_TARGETS="python3_7 -python3_6 -python3_8" 0 KiB > [ebuild N ~] sci-electronics/kicad-5.1.5-r2::gentoo USE="doc examples github ngspice oce openmp python -occ" PYTHON_SINGLE_TARGET="python3_7 -python3_6" 0 KiB And the issue resurfaced!: > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: > /usr/lib/debug/usr/lib64/Scrt1.o.debug: no group info for section '.debug_macro' > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/Scrt1.o: in function `_start': > (.text+0x20): undefined reference to `main' > collect2: error: ld returned 1 exit status > make: *** [Makefile:15909: .pch/wxprec_xrcdll/wx/wxprec.h.gch] Error 1 Note that I've attempted debug removal beforehand via `*FLAGS-=-ggdb3` and `USE=-debug`, where same errors persisted, maybe due rest of the system being built that way. But disabling PCH solved this. On the other hand, different system exhibiting issues: > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: > /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64/Scrt1.o: in function `_start': > /usr/src/debug/sys-libs/glibc-2.30-r8/glibc-2.30/csu/../sysdeps/x86_64/start.S:104: undefined reference to `main' > collect2: error: ld returned 1 exit status > make: *** [Makefile:15576: .pch/wxprec_basedll/wx/wxprec.h.gch] Error 1 Did not resolve it (neither disabling PCH nor LDFLAGS -Wl,-O1), but I don't intend to dig into it. As I'm replacing that system. We don't have access to PaX anymore I'm afraid, but I advise avoiding PCH even on non-PaX systems given how brittle PCH is. |