I tried to build gcc-4.3.4 on gentoo 2010 desktop edition. Here's where the crash happening: /var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/li b/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -O -m32 -O2 -O2 -g -O2 -pipe -march=core2 -DIN_GCC -W -Wall -Wwrite-strings -Wst rict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I . -I../../.././gcc -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/libgcc -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/libgcc/. -I/var/tmp/portage/sys-devel/gcc-4 .3.4/work/gcc-4.3.4/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/libgcc/../include -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/libgcc/config/lib bid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o bid128_to_uint32.o -MT bid128_to_uint32.o -MD -MP -MF bid128_to_uint32.dep -c /var/tmp/portage/sys-devel/gcc-4.3.4/wor k/gcc-4.3.4/libgcc/config/libbid/bid128_to_uint32.c /var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/libgcc/config/libbid/bid128_to_uint32.c: In function ‘__bid128_to_uint32_xrninta’: /var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/libgcc/config/libbid/bid128_to_uint32.c:3593: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.gentoo.org/> for instructions. make[5]: *** [bid128_to_uint32.o] Error 1 make[5]: *** Waiting for unfinished jobs.... Reproducible: Always Steps to Reproduce: 1. emerge -v gcc Actual Results: crash, see above. My emerge --info yields: wirawan1 etc # emerge --info Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.27-16-generic x86_64) ================================================================= System uname: Linux-2.6.27-16-generic-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8400_@_2.26GHz-with-glibc2.2.5 Timestamp of tree: Tue, 08 Dec 2009 17:15:02 +0000 app-shells/bash: 3.2_p39 dev-lang/python: 2.5.4-r2 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.63 sys-devel/automake: 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -pipe -march=core2" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" FFLAGS="-O2 -pipe -march=core2" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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.namerica.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bidi bittorent blas bluetooth branding bzip2 c++ cairo cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups cvs cxx db2 dbi dbus dhcp dirac divx dri dts dv dvd dvdr dvdread eds emacs emboss encode evo examples exif fam ffmpeg fftw firefox flac foomatic fortran ftp fuse gdbm gif gimp gmp gnome gnome-keyring gnuplot gnutls gpm gsl gstreamer gtk gzip hal hdf5 iconv ieee1394 imagemagick imap ipv6 irc javascript jpeg jpeg2k lame lapack latex ldap libnotify libsamplerate mad mikmod mime mmx modules mp2 mp3 mp4 mp4live mpeg mpeg2 mplayer mtp mudflap multilib ncurses netcdf nls nptl nptlonly nsplugin ofx ogg ogm opengl openmp openmpi pam pcmcia pcre pdf perl png ppds pppd pstricks python qt3support quicktime readline reflection samba scanner scim sdl session sid slang smp sox speex spell spl sqlite3 sse sse2 sse3 ssl ssse3 startup-notification subversion svg sysfs syslog tcl tcpd theora threads thunar tidy tiff timidity tk truetype unicode usb v4l v4l2 vcd vim-syntax vnc vorbis wifi wma wmf wmp x264 xcb xft xine xinerama xml xorg xpm xscreensaver xulrunner xv xvid yahoo zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel vesa radeon radeonhd fglrx" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY The existing gcc is version 4.3.2-r3 from gentoo.
The crash above happened in stage 1. This was not reproduced on second run. Rather, it went to stage 2 and crashed at another file: /var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./prev-gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -c -O2 -pipe -march=core2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/gcc -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/gcc/../libcpp/include -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/gcc/../libdecnumber/bid -I../libdecnumber insn-attrtab.c -o insn-attrtab.o /var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/gcc/config/i386/i386.md: In function âgen_exp2sf2â: /var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/gcc/config/i386/i386.md:17433: 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]: *** [insn-emit.o] Error 1 make[3]: *** Waiting for unfinished jobs.... rm gcc.pod gfortran.pod make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/gcc' make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.4/work/build' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.4/work/build' make: *** [bootstrap-lean] Error 2
The third time, I just use "ebuild <gcc-4.3.4-ebuild> compile", and it went vary far. But it still failed in stage 3: make "DESTDIR=" "RPATH_ENVVAR=LD_LIBRARY_PATH" "TARGET_SUBDIR=x86_64-pc-linux-gnu" "bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.4" "datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.4" "exec_prefix=/usr" "includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/include" "datarootdir=/usr/share" "docdir=/usr/share/doc" "infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.4/info" "pdfdir=/usr/share/doc" "htmldir=/usr/share/doc" "libdir=/usr/lib" "libexecdir=/usr/libexec" "lispdir=" "localstatedir=/usr/var" "mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.4/man" "oldincludedir=/usr/include" "prefix=/usr" "sbindir=/usr/sbin" "sharedstatedir=/usr/com" "sysconfdir=/usr/etc" "tooldir=/usr/x86_64-pc-linux-gnu" "build_tooldir=/usr/x86_64-pc-linux-gnu" "target_alias=x86_64-pc-linux-gnu" "BISON=bison" "CC_FOR_BUILD=x86_64-pc-linux-gnu-gcc" "CFLAGS_FOR_BUILD=-O2 -pipe -march=core2" "CXX_FOR_BUILD=x86_64-pc-linux-gnu-g++" "EXPECT=expect" "FLEX=flex" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LEX=flex" "M4=m4" "MAKE=make" "RUNTEST=runtest" "RUNTESTFLAGS=" "SHELL=/bin/sh" "YACC=bison -y" "`echo 'ADAFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "AR_FLAGS=rc" "`echo 'BOOT_ADAFLAGS=-gnatpg -gnata' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "BOOT_CFLAGS=-O2 -pipe -march=core2" "BOOT_LDFLAGS=" "CFLAGS=-O2 -pipe -march=core2" "CXXFLAGS=-O2 -pipe -march=core2" "LDFLAGS=-Wl,-O1" "LIBCFLAGS=-O2 -pipe -march=core2" "LIBCXXFLAGS=-O2 -pipe -march=core2 -fno-implicit-templates" "STAGE1_CFLAGS=-O" "STAGE1_CHECKING=--enable-checking=yes,types" "STAGE1_LANGUAGES=c" "STAGE2_CFLAGS=-O2 -pipe -march=core2" "STAGE3_CFLAGS=-O2 -pipe -march=core2" "STAGE4_CFLAGS=-O2 -pipe -march=core2" "GNATBIND=no" "GNATMAKE=no" "AR_FOR_TARGET=/usr/x86_64-pc-linux-gnu/bin/ar" "AS_FOR_TARGET=/usr/x86_64-pc-linux-gnu/bin/as" "CC_FOR_TARGET=/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include" "CFLAGS_FOR_TARGET=-O2 -g -O2 -pipe -march=core2 " "CPPFLAGS_FOR_TARGET=" "CXX_FOR_TARGET=/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./gcc/g++ -B/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./gcc/ -nostdinc++ -L/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include" "CXXFLAGS_FOR_TARGET=-O2 -pipe -march=core2 -D_GNU_SOURCE" "DLLTOOL_FOR_TARGET=dlltool" "GCJ_FOR_TARGET=-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include" "GFORTRAN_FOR_TARGET=/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./gcc/gfortran -B/var/tmp/portage/sys-devel/gcc-4.3.4/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include" "LD_FOR_TARGET=/usr/x86_64-pc-linux-gnu/bin/ld" "LIPO_FOR_TARGET=lipo" "LDFLAGS_FOR_TARGET=" "LIBCFLAGS_FOR_TARGET=-O2 -g -O2 -pipe -march=core2 " "LIBCXXFLAGS_FOR_TARGET=-O2 -pipe -march=core2 -D_GNU_SOURCE -fno-implicit-templates" "NM_FOR_TARGET=/usr/x86_64-pc-linux-gnu/bin/nm" "OBJDUMP_FOR_TARGET=/usr/x86_64-pc-linux-gnu/bin/objdump" "RANLIB_FOR_TARGET=/usr/x86_64-pc-linux-gnu/bin/ranlib" "STRIP_FOR_TARGET=/usr/x86_64-pc-linux-gnu/bin/strip" "WINDRES_FOR_TARGET=windres" "WINDMC_FOR_TARGET=windmc" "`echo 'LANGUAGES=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "LEAN=:" "CONFIG_SHELL=/bin/sh" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000" compare make[2]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.3.4/work/build' make[3]: Entering directory `/var/tmp/portage/sys-devel/gcc-4.3.4/work/build' rm -f stage_current make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.4/work/build' Comparing stages 2 and 3 warning: ./cc1plus-checksum.o differs warning: ./cc1-checksum.o differs Bootstrap comparison failure! ./gcc.o differs ./varasm.o differs ./i386.o differs make[2]: *** [compare] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.4/work/build' make[1]: *** [stage3-bubble] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.3.4/work/build' make: *** [bootstrap-lean] Error 2 Weird. Noever happened something like this to me in all my compiling of GCC!
That's most likely a hardware problem.
(In reply to comment #3) I doubt if it is. I just recompiled the code outside the gentoo chroot jail using "standard" CFLAGS and CXXFLAGS, it did not crash at all. In fact, I recompiled the stock GCC 4.3.4 from ftp.gnu.org using '-mcore2' flags, and the compiler crashed again. Here's where it stopped: /home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/xgcc -B/home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/ -B/usr/local/gcc-4.3.4/x86_64-pc-linux-gnu/bin/ -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-4.3.4/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -fpic ../../gcc-4.3.4/libiberty/cp-demangle.c -o pic/cp-demangle.o; \ else true; fi yes checking for objdir... .libs checking if /home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/xgcc -B/home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/ -B/usr/local/gcc-4.3.4/x86_64-pc-linux-gnu/bin/ supports -fno-rtti -fno-exceptions... no checking for /home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/xgcc -B/home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/ -B/usr/local/gcc-4.3.4/x86_64-pc-linux-gnu/bin/ option to produce PIC... -fPIC -DPIC checking if /home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/xgcc -B/home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/ -B/usr/local/gcc-4.3.4/x86_64-pc-linux-gnu/bin/ PIC flag -fPIC -DPIC works... yes checking if /home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/xgcc -B/home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/ -B/usr/local/gcc-4.3.4/x86_64-pc-linux-gnu/bin/ static flag -static works... yes checking if /home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/xgcc -B/home/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo/./prev-gcc/ -B/usr/local/gcc-4.3.4/x86_64-pc-linux-gnu/bin/ supports -c -o file.o... ../../gcc-4.3.4/libiberty/cp-demangle.c: In function ‘d_encoding’: ../../gcc-4.3.4/libiberty/cp-demangle.c:1044: 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]: *** [cp-demangle.o] Error 1 make[3]: *** Waiting for unfinished jobs.... As soon as I removed "-mcore2" the compilation succeeded. The only exception is when comparing stage2 and stage3, there was a warning: make[3]: Leaving directory `/data1/wirawan/BUILD/gcc-4.3.4-wirawan1-20091209-gentoo' Comparing stages 2 and 3 warning: ./cc1-checksum.o differs warning: ./cc1plus-checksum.o differs Comparison successful. ...if this matters to you. But mind you, my computer _is_ a core2 architecture: ~ $ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz stepping : 6 cpu MHz : 800.000 cache size : 3072 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm bogomips : 4521.97 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz stepping : 6 cpu MHz : 800.000 cache size : 3072 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm bogomips : 4522.06 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: ~ $ uname -a Linux wirawan1 2.6.27-14-generic #1 SMP Mon Aug 31 12:58:38 UTC 2009 x86_64 GNU/Linux It's running Ubuntu 8.10 64-bit Desktop edition.
No idea how to reproduce or fix this :(
hi buddies! it is my first time posting here, and also is my first time reporting a bug, so I hope my post will be useful :) I can reproduce this bug even with a different gcc version. At first, I thought the problem was the computer but... I am trying to change the chost variable from i486-pc-linux-gnu to i586-pc-linux-gnu in my ancient PentiumMMX 200Mhz. I've got heaps 'segmentation fault' while compiling the kernel after a fresh installation, and also while compiling binutils, gcc and glibc for chost issues. But after compiling glibc (with a lot of problems, seg faults, etc), EVERYTHING is working fine now. At the moment my Pentium is making emerge -e system, without problems... So I think the problem could be something related to glibc, cause it is very strange that I spent like 5 days just for compiling gcc and glibc, and now, in half day the computer have finished half of the emerge -e system. Isn't it? thanks (and sorry for my English... I tried my best :D) erFelipe