Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 814383 - sys-devel/gcc-11.2.0: ICE when compiling sys-devel/gdb-11.1
Summary: sys-devel/gcc-11.2.0: ICE when compiling sys-devel/gdb-11.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Alpha Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-22 15:41 UTC by MarcT
Modified: 2021-10-01 16:19 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,194.60 KB, text/x-log)
2021-09-22 15:41 UTC, MarcT
Details
build.log (build.log,193.62 KB, text/x-log)
2021-10-01 11:21 UTC, MarcT
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MarcT 2021-09-22 15:41:06 UTC
Created attachment 740724 [details]
build.log

When issuing emerge sys-devel/gdb, the compile stops with :-

/usr/lib/gcc/alpha-unknown-linux-gnu/11.2.0/include/g++-v11/bits/stl_funct
ion.h:1086:37: internal compiler error: in push_class_level_bin
ding_1, at cp/name-lookup.c:5409
 1086 |       pointer_to_unary_function() { }
      |                                     ^

emerge --info :-

Portage 3.0.23 (python 3.9.7-final-0, default/linux/alpha/17.0, gcc-11.2.0, glib
c-2.33-r7, 5.14.5-gentoo-alpha alpha)
=================================================================
System uname: Linux-5.14.5-gentoo-alpha-alpha-EV67-with-glibc2.33
KiB Mem:     1006960 total,    179000 free
KiB Swap:    1097144 total,   1096616 free
Timestamp of repository gentoo: Wed, 22 Sep 2021 10:00:01 +0000
Head commit of repository gentoo: 15d9f62490132b7f057b6d8373519562347eee24
sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p4) 2.36.1
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r2::gentoo
dev-lang/python:          3.9.7::gentoo, 3.10.0_rc2::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/openrc:          0.44.4::gentoo
sys-apps/sandbox:         2.25::gentoo
sys-devel/autoconf:       2.69-r5::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.36.1-r2::gentoo, 2.37_p1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.14::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r7::gentoo
Repositories:

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

ACCEPT_KEYWORDS="alpha ~alpha"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
CBUILD="alpha-unknown-linux-gnu"
CFLAGS="-mieee -O2 -mcpu=ev67"
CHOST="alpha-unknown-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="-mieee -O2 -mcpu=ev67"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PER
L5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG
_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-mieee -O2 -mcpu=ev67"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-pro
tect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multil
ib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-
owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unm
erge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-mieee -O2 -mcpu=ev67"
GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/ https://mirror.bytemark.co.u
k/gentoo/ http://mirror.bytemark.co.uk/gentoo/ rsync://mirror.bytemark.co.uk/gen
too/ ftp://mirrors.gethosted.online/gentoo https://mirrors.gethosted.online/gent
oo http://mirrors.gethosted.online/gentoo https://www.mirrorservice.org/sites/di
stfiles.gentoo.org/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/ ftp
://ftp.mirrorservice.org/sites/distfiles.gentoo.org/ rsync://rsync.mirrorservice
.org/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 --timeou
t=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl alpha bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc ncu
rses nls nptl openmp pam pcre readline split-usr ssl tcpd unicode xattr zlib" AD
A_TARGET="gnat_2019" ALSA_CARDS="ali5451 als4000 bt87x ca0106 cmipci emu10k1 ens
1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 maestro3 trident usb-audio v
ia82xx ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd action
s alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file aut
hz_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_filte
r file_cache filter headers include info log_config logio mem_cache mime mime_ma
gic negotiation rewrite setenvif speling status unique_id userdir usertrack vhos
t_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface 
irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm
 earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nme
a ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq supe
rstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linu
x" 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_TA
RGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TAR
GET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" 
VIDEO_CARDS="fbdev glint mga nv r128 radeon dummy v4l" XTABLES_ADDONS="quota2 ps
d pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee t
arpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, L
INGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PO
RTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-22 17:58:31 UTC
Hi! This would be a bug in GCC.

Can you look at https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide?
Comment 2 MarcT 2021-09-22 22:41:12 UTC
I updated my CFLAGS to ="-mieee -mcpu=ev67" (removing -O2) and re-ran the emerge.

it used to fail like this

make[3]: Entering directory '/var/tmp/portage/sys-devel/gdb-11.1/work/gdb-11.1/g
dbsupport'
  CXX      agent.o
  CXX      btrace-common.o
  CXX      buffer.o
  CXX      cleanups.o
  CXX      common-debug.o
  CXX      common-exceptions.o
  CXX      common-inferior.o
  CXX      common-regcache.o
  CXX      common-utils.o
In file included from /usr/lib/gcc/alpha-unknown-linux-gnu/11.2.0/include/
g++-v11/functional:49,
                 from ptid.h:35,
                 from common-defs.h:198,
                 from common-utils.cc:20:
/usr/lib/gcc/alpha-unknown-linux-gnu/11.2.0/include/g++-v11/bits/stl_funct
ion.h:1086:37: internal compiler error: in push_class_level_bin
ding_1, at cp/name-lookup.c:5409
 1086 |       pointer_to_unary_function() { }
      |                                     ^
0x12137972b internal_error(char const*, ...)
	???:0
0x12016c7c7 fancy_abort(char const*, int, char const*)
	???:0
0x1202c3997 push_class_level_binding(tree_node*, tree_node*)
	???:0

Now it passes by and completes the emerge.

ake[2]: Entering directory '/var/tmp/portage/sys-devel/gdb-11.1/work/gdb-11.1/gdbsupport'
make  all-am
make[3]: Entering directory '/var/tmp/portage/sys-devel/gdb-11.1/work/gdb-11.1/gdbsupport'
  CXX      agent.o
  CXX      btrace-common.o
  CXX      buffer.o
  CXX      cleanups.o
  CXX      common-debug.o
  CXX      common-exceptions.o
  CXX      common-inferior.o
  CXX      common-regcache.o
  CXX      common-utils.o
  CXX      environ.o
  CXX      errors.o
  CXX      event-loop.o
  CXX      fileio.o
  CXX      filestuff.o
  CXX      format.o
  CXX      gdb-dlfcn.o

I'll add the -O2 again and see if it errors.
Comment 3 MarcT 2021-09-22 22:44:08 UTC
additionally, note the ICE does not generate a segfault. Ive no memory issues, not using -pipe etc.
Comment 4 MarcT 2021-10-01 11:21:19 UTC
Created attachment 742368 [details]
build.log

Latest build.log
Comment 5 MarcT 2021-10-01 16:18:33 UTC
This appears to have been a memory/hardware issue possibly relating to an ELSA Gloria graphics card. I noticed when undertaking a compilation free memory would dip into the 20MB range (while the bufcache was 600MB). I set min free memory through the kernel tunable but this had no positive effect. Every compile caused low memory like this, _but only when undertaking the compilation on the console itself_. When I compiled via ssh, free memory never dipped below ~500MB (total 1GB). So something about the ELSA, maybe the fb device, maybe it was faulty, was consuming memory as the build progressed until the enevetable ICE. I swapped to a Trio64 and its compiling from the console now. Weird thing, no compilation crashed, ever, from the livecd with the ELSA present. I'm going to get another ELSA and try that. Thanks.