| Summary: | mysterious crashes in the compilation of gcc 4.3.4 | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Wirawan Purwanto <wirawan0> |
| Component: | [OLD] Development | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
| Status: | RESOLVED NEEDINFO | ||
| Severity: | normal | CC: | SebastianLuther |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Wirawan Purwanto
2009-12-08 18:44:32 UTC
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 |