Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835919 - sys-devel/gcc-11.2.1_p20220115 fails to self-compile
Summary: sys-devel/gcc-11.2.1_p20220115 fails to self-compile
Status: RESOLVED NEEDINFO
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: gcc-11
  Show dependency tree
 
Reported: 2022-03-24 09:43 UTC by Patrick Lauer
Modified: 2022-03-24 15:34 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2022-03-24 09:43:01 UTC
Steps to reproduce seem to be, from a stage3 - 
* ACCEPT_KEYWORDS="~amd64" and update everything
(updates to gcc-11.2.1_p20220115
* CFLAGS+="-march=native" (failures seen on ryzen9 and skylake class CPUs)
* emerge -1 gcc:11

this fails with an ICE in multiple places afaict, one of them here:

/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/./prev-gcc/xg++ -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -isystem /var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu  -isystem /var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include  -isystem /var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/libstdc++-v3/libsupc++ -L/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -fno-PIE -c -fno-PIE    -m64 -pipe -march=native -O2 -fno-checking -gtoggle -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc -I/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc/. -I/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc/../include -I/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc/../libcpp/include -I/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc/../libcody  -I/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/gcc/../libbacktrace   -o insn-automata.o -MT insn-automata.o -MMD -MP -MF ./.deps/insn-automata.TPo insn-automata.c
gimple-match.c: In function ‘bool gimple_simplify_9(gimple_match_op*, gimple**, tree_node* (*)(tree), tree, tree_node**)’:
gimple-match.c:2014:1: internal compiler error: Segmentation fault
 2014 | gimple_simplify_9 (gimple_match_op *res_op, gimple_seq *seq,
      | ^~~~~~~~~~~~~~~~~
0x23c1f1a diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
        ???:0
0x23c3c97 internal_error(char const*, ...)
        ???:0
0x13aa9c8 crash_signal(int)
        ???:0
0xc4644a c_tree_chain_next(tree_node*)
        ???:0
0xc54ed9 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x10399a0 gt_ggc_mx_tree_statement_list_node(void*)
        ???:0
0xc57748 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x10399a0 gt_ggc_mx_tree_statement_list_node(void*)
        ???:0
0xc57748 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
0x10399a0 gt_ggc_mx_tree_statement_list_node(void*)
        ???:0
0xc57748 gt_ggc_mx_lang_tree_node(void*)
        ???:0
0xc5731b gt_ggc_mx_lang_tree_node(void*)
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
make[3]: *** [Makefile:1144: gimple-match.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm gfdl.pod gcc.pod gfortran.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build/gcc'
make[2]: *** [Makefile:4821: all-stage2-gcc] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build'
make[1]: *** [Makefile:24059: stage2-bubble] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/build'
make: *** [Makefile:24282: bootstrap-lean] Error 2
 * ERROR: sys-devel/gcc-11.2.1_p20220115::gentoo failed (compile phase):
 *   emake failed

Portage 3.0.30 (python 3.9.11-final-0, default/linux/amd64/17.1, gcc-11.2.1, glibc-2.34-r10, 5.16.15-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.16.15-gentoo-x86_64-x86_64-AMD_Ryzen_9_3900X_12-Core_Processor-with-glibc2.34
KiB Mem:    65828656 total,  14397520 free
KiB Swap:   20971516 total,  20971516 free
sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-lang/perl:             5.34.1::gentoo
dev-lang/python:           3.9.11::gentoo, 3.10.3::gentoo
dev-util/meson:            0.61.3::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo, 2.38-r1::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.2.1_p20220115::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.16::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r10::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="acl amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-11.2.1_p20220115::gentoo was built with the following:
USE="(cxx) fortran (multilib) nls nptl openmp (pie) sanitize ssp (-ada) (-cet) -custom-cflags -d -debug -doc (-fixed-point) -go -graphite (-hardened) -jit (-libssp) -lto -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv -zstd" ABI_X86="(64)"
CFLAGS="-pipe -O2"
CXXFLAGS="-pipe -O2"
FEATURES="merge-sync protect-owned distlocks buildpkg-live usersandbox buildpkg preserve-libs sandbox binpkg-docompress userpriv binpkg-dostrip network-sandbox multilib-strict assume-digests parallel-fetch unmerge-logs config-protect-if-modified unmerge-orphans unknown-features-warn userfetch sfperms strict pid-sandbox binpkg-logs ipc-sandbox binpkg-multi-instance qa-unresolved-soname-deps usersync clean-logs ebuild-locks fixlafiles"
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-24 11:55:12 UTC
1. Please provide full build.log
2. Include the gcc tarball the death hooks should create.
3. Please try to follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide.

Different locations every time is suspicious.
Comment 2 Ionen Wolkens gentoo-dev 2022-03-24 12:42:08 UTC
(In reply to Patrick Lauer from comment #0)
> Steps to reproduce seem to be, from a stage3 - 
> * ACCEPT_KEYWORDS="~amd64" and update everything
> (updates to gcc-11.2.1_p20220115
> * CFLAGS+="-march=native" (failures seen on ryzen9 and skylake class CPUs)
> * emerge -1 gcc:11
fwiw I tried given I have a skylake, aka: stage3, accept ~amd64, add -march=native to COMMON_FLAGS, emerge -uUD @world, then emerge -1 gcc:11.. and I now have a successfully rebuilt gcc:11.

Don't have any ryzen to try.