/var/tmp/portage/sys-devel/gcc-4.3.1/work/build/./prev-gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.3.1/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -c -DHAVE_CONFIG_H -march=k8 -pipe -Wno-error -fprofile-use -I. -I/var/tmp/portage/sys-devel/gcc-4.3.1/work/gcc-4.3.1/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -fpic /var/tmp/portage/sys-devel/gcc-4.3.1/work/gcc-4.3.1/libiberty/hashtab.c -o pic/hashtab.o; \ else true; fi /var/tmp/portage/sys-devel/gcc-4.3.1/work/gcc-4.3.1/libiberty/hashtab.c: In function 'htab_expand': /var/tmp/portage/sys-devel/gcc-4.3.1/work/gcc-4.3.1/libiberty/hashtab.c:554: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.gentoo.org/> for instructions. make[3]: *** [hashtab.o] Error 1 make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.1/work/build/libiberty' make[2]: *** [all-stagefeedback-libiberty] Error 2 make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.1/work/build' make[1]: *** [stagefeedback-bubble] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.1/work/build' make: *** [profiledbootstrap] Error 2 * * ERROR: sys-devel/gcc-4.3.1 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 4628: Called toolchain_src_compile * environment, line 5097: Called gcc_src_compile * environment, line 2962: Called gcc_do_make * environment, line 2792: Called die * The specific snippet of code: * emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}"; * The die message: * emake failed with profiledbootstrap * * If you need support, post the topmost build error, and the call stack if relevant. Reproducible: Always Steps to Reproduce: 1.emerge --update --newuse --deep world 2. 3. paul-gentoo paul # emerge --info Portage 2.2_rc1 (default-linux/amd64/2007.0/desktop, gcc-4.2.4, glibc-2.8_p20080602-r0, 2.6.24-gentoo-r3 x86_64) ================================================================= System uname: Linux-2.6.24-gentoo-r3-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-glibc2.2.5 Timestamp of tree: Sat, 21 Jun 2008 16:45:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.5.2-r4 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.62 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -pipe -msse3 -Wno-error " CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=k8 -pipe -msse3 -Wno-error " DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--deep" FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://www.mirorservice.org/sites/www.ibiblio.org/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="en_GB" LC_ALL="en_GB" LDFLAGS="" LINGUAS="en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X acl acpi alsa amd64 apm asf berkdb bluetooth bzip2 cairo cddb cdr cli cracklib crypt cups dbus dri dvb dvd dvdr dvdread dxr3 eds emboss encode esd evo expat fam firefox flac foomaticdb fortran fpx gdbm gif gimp gnome gpm graphviz gs gstreamer gtk hal iconv ieee1394 imagemagick ipv6 isdnlog java jbig jpeg jpeg2k kerberos ladspa ldap libsamplerate lm_sensors mad midi mikmod mmx mng mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection samba scanner sdl session slp sndfile snmp spell spl sse sse2 ssl startup-notification subversion svg symlink tcpd tiff truetype type1 uk_bleb uk_rt unicode usb vcd vorbis wavpack wmf xcomposite xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fglrx" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Can you reproduce this, ie if you try again, does it fail at the same place?
*** Please look at Bug 20600 ***
(In reply to comment #1) > Can you reproduce this, ie if you try again, does it fail at the same place? > Yes - reproduced with exactly same error message twice.
Paul: I'd suggest trying first to eliminate the Wno-error CFLAG. It might be that which is throwing it off. toolchain: Do a google-search for hashtab.c:554 . This looks like the real McCoy, re-arisen from the dead, or... Something.
(In reply to comment #4) > Paul: > I'd suggest trying first to eliminate the Wno-error CFLAG. It might be that > which is throwing it off. > > toolchain: > Do a google-search for hashtab.c:554 . This looks like the real McCoy, > re-arisen from the dead, or... Something. > Thanks for the suggestion Peter but eliminating Wno-error had no effect. Seg fault at same place: /var/tmp/portage/sys-devel/gcc-4.3.1/work/build/./prev-gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.3.1/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -c -DHAVE_CONFIG_H -march=k8 -pipe -fprofile-use -I. -I/var/tmp/portage/sys-devel/gcc-4.3.1/work/gcc-4.3.1/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -fpic /var/tmp/portage/sys-devel/gcc-4.3.1/work/gcc-4.3.1/libiberty/hashtab.c -o pic/hashtab.o; \ else true; fi /var/tmp/portage/sys-devel/gcc-4.3.1/work/gcc-4.3.1/libiberty/hashtab.c: In function 'htab_expand': /var/tmp/portage/sys-devel/gcc-4.3.1/work/gcc-4.3.1/libiberty/hashtab.c:554: internal compiler error: Segmentation fault I had problems with gcc.4.2.1 for which I had to remove -O2 flag. Does this give a clue - could it be a hardware issue?
I can confirm this, with gcc 4.1.2 on a 64bit install. LDFLAGS=" " CFLAGS=" " CXXFLAGS=" " emerge -1 gcc produces the exact same output.
I just tried this with gcc 4.3.1 and gcc 4.3.1-r1, they both segfault.
going gcc 4.1.2 -> 4.2.4 -> 4.3.1 worked.
*** Bug 237225 has been marked as a duplicate of this bug. ***
(In reply to comment #8) > going gcc 4.1.2 -> 4.2.4 -> 4.3.1 worked. Not for me... The segfault is caused by -fprofile-use passed to gcc when compiling this file -- removing it fixes the crash (at the cost of presumably worse performance of the created compiler).
*** Bug 244479 has been marked as a duplicate of this bug. ***
Upstream bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33992 As a quick fix, using "bootstrap-lean" target instead of "profiledbootstrap" in toolchain.eclass helps.
this is part of gcc-4.3.2 mainline release
(In reply to comment #13) > this is part of gcc-4.3.2 mainline release You are once again a bit too trigger happy when it comes to closing bugs. The bug still exists with 4.3.2 ebuild in portage, so no, this definitely wasn't fixed in 4.3.2. Somebody with sufficient permissions to reopen this bug, please do so.
Concur with comment #14. The issue has not yet been fixed. I ran into the same problem trying to build gcc-4.3.2-r2 with gcc-3.4.6-r2 on an amd64 host. I tried many things: * Nullifying CFLAGS to keep BOOT_CFLAGS clean and various other build settings * Installing a tinderbox package of gcc-4.1.2 and setting that as the active compiler * Trying various other make targets than bootstrap-lean (which has recently been made the default in toolchain.eclass) In the end, the _only_ thing that worked was to use "make bootstrap4" which employs a 4-stage bootstrap process rather than the usual 3-stage process entailed by "bootstrap" and "bootstrap-lean". After changing toolchain.eclass accordingly, it compiled beautifully for the first time. Using bootstrap4 seems to reduce the likelihood of spurious build failures a lot. In fact, it's so reliable that I'm even able to carry out a full bootstrap process - as in running gentoo's bootstrap.sh script - with gcc-3.4.6-hardened specs active, leading up to a working gcc-4.3.2-r2 compiler with the recently committed (and experimental) hardened specs! In other words, that constitutes as challenging a scenario for the gcc bootstrap phase as one might expect to encounter and it passes with flying colours. So, given that: * This bug is still in evidence as seen here and in mailing list posts * bootstrap4 isn't much slower than bootstrap/bootstrap-lean * We've gained massive time savings from dropping profiledbootstrap anyway * Hardened might reasonably wish to provide a safe upgrade path for their userbase in the near future * It's by no means a hardened-specific problem anyway ... is there not a case for adopting it?
vaclav, the bug you referenced was fixed pre-4.3.0, so this must be something else. also we stopped using profiledbootstrap altogether recently. kerin, i'm not sure why bootstrap4 would work around this. if it's ICEing in an earlier stage why would adding another fix it? do you have a full build log of the failure handy (preferably without any changes to eclasses/CFLAGS/etc ;))?
profiledbootstrap isnt used anymore by default
> profiledbootstrap isnt used anymore by default Indeed, although the problem I faced was not triggered by profiledbootstrap in the first instance. > kerin, i'm not sure why bootstrap4 would work around this Firstly, sorry for taking so long to get back to you (and in particular for creating noise after the bug has been closed). Neither am I able to offer a reasonable explanation as to why using the bootstrap4 target worked around the issue at the time, but I can assure you that it did in a manner that was entirely reproducible. Anyway, I'm posting back here to say that - just for the record - the real issue turned out to be with the kernel: http://bugs.gentoo.org/show_bug.cgi?id=254843#c13 That's since been resolved so all is well :)