Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC

Bug 15586

Summary: gcc-3.2.2 emerge failed with internal compiler error
Product: Gentoo Linux Reporter: Mark Tlay <eschvoca>
Component: [OLD] GCC PortingAssignee: Martin Schlemmer (RETIRED) <azarah>
Status: RESOLVED FIXED    
Severity: normal CC: jlk96
Priority: High    
Version: 1.4_rc2   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mark Tlay 2003-02-12 12:42:46 UTC
I unmasked and upgraded gcc-3.2.2 to try to see if upgrading it would fix bug
15410.  But I got another ICE (internal compiler error) when compiling gcc-3.2.2.

Reproducible: Didn't try
Steps to Reproduce:
1. emerge -u world # gentoo 1.4
2. unmask ~x86
3. emerge gcc-3.2.2

Actual Results:  
I unmasked and upgraded gcc-3.2.2 to try to see if upgrading it would fix bug
15410.  But I got another ICE when compiling gcc-3.2.2:

(snip)
/var/tmp/portage/gcc-3.2.2/work/build/gcc/xgcc
-B/var/tmp/portage/gcc-3.2.2/work/build/gcc/ -B/usr/i686-pc-linux-gnu/bin/
-B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -c
-DHAVE_CONFIG_H -O2 -march=athlon -mcpu=athlon  -pipe -I.
-I/var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/libiberty/../include  -W -Wall
-Wtraditional -pedantic
/var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/libiberty/cplus-dem.c
/var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/libiberty/cplus-dem.c: In function
`recursively_demangle':
/var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/libiberty/cplus-dem.c:3113: internal
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[2]: *** [cplus-dem.o] Error 1
make[2]: Leaving directory
`/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.2.2/work/build'
make: *** [bootstrap-lean] Error 2
 
!!! ERROR: sys-devel/gcc-3.2.2 failed.
!!! Function src_compile, Line 285, Exitcode 2
!!! (no error message)


Expected Results:  
Completed the emerge successfully.

Portage 2.0.46-r12 (default-x86-1.4, gcc-3.2.1, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.20 i686 AMD Duron(tm) Processor
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://mirror.clarkson.edu/pub/distributions/gentoo
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/X11R6/lib/X11/xkb /usr/kde/3/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg kde libg++ mikmod mmx mpeg
ncurses nls pdflib png qtmt quicktime spell truetype xml2 xmms xv zlib gdbm
berkdb slang readline arts tetex svga tcltk java guile X sdl gpm tcpd pam libwww
ssl perl python imlib oggvorbis gnome gtk qt motif opengl ldap 3dfx aalib bonobo
cdr dga directfb doc esd ethereal evo fbcon gphoto2 gtk2 gtkhtml imap mozilla
pda plotutils ruby scanner tiff
usb voodoo3 wmf xml"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon -mcpu=athlon -O3 -pipe"
CXXFLAGS="-march=athlon -mcpu=athlon -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j1"
AUTOCLEAN="yes"
SYNC="rsync://helios.sclab.clarkson.edu/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Justin L. Karr 2003-02-12 19:04:44 UTC
Got something similar, don't know if it's related. Notably, I whacked my make.conf and had to rebuild it before I ran this emerge. Missing from the rebuilt make.conf are explicit distcc and ccache options -- though ccache appears to be default now.

Log exerpt:

creating libgcj.la
(cd .libs && rm -f libgcj.la && ln -s ../libgcj.la libgcj.la)
/bin/sh ./libtool --tag=GCJ --mode=link /var/tmp/portage/gcc-3.2.2/work/build/gcc/gcj -B/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libjava/ -B/var/tmp/portage/gcc-3.2.2/work/build/gcc/ -L/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libjava -ffloat-store -g -O2  -o jv-convert --main=gnu.gcj.convert.Convert -rpath /usr/lib/. -shared-libgcc   -L/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libjava/.libs libgcj.la 
/var/tmp/portage/gcc-3.2.2/work/build/gcc/gcj -B/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libjava/ -B/var/tmp/portage/gcc-3.2.2/work/build/gcc/ -ffloat-store -g -O2 -o .libs/jv-convert --main=gnu.gcj.convert.Convert -shared-libgcc  -L/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libjava -L/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libjava/.libs ./.libs/libgcj.so -L/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libstdc++-v3/src -L/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libstdc++-v3/src/.libs -lpthread -ldl -lz -L/var/tmp/portage/gcc-3.2.2/work/build/gcc -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/../../../i686-pc-linux-gnu/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/../.. -lgcc_s -lc -lgcc_s -Wl,--rpath -Wl,/usr/lib/.
./.libs/libgcj.so: undefined reference to `_dl_cpuclock_offset'
collect2: ld returned 1 exit status
make[3]: *** [jv-convert] Error 1
make[3]: Leaving directory `/export/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/export/var/tmp/portage/gcc-3.2.2/work/build/i686-pc-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/export/var/tmp/portage/gcc-3.2.2/work/build'
make: *** [bootstrap-lean] Error 2

!!! ERROR: sys-devel/gcc-3.2.2 failed.
!!! Function src_compile, Line 285, Exitcode 2
!!! (no error message)

End Log Exerpt

Output of 'emerge -info':

Portage 2.0.46-r12 (default-x86-1.4, gcc-3.2.1, glibc-2.3.1-r3)
=================================================================
System uname: 2.4.20-gentoo-r1 i686 Intel(R) Celeron(R) CPU 1.70GHz
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg kde gnome libg++ mikmod mmx mpeg ncurses nls pdflib png qtmt quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline arts svga java X sdl gpm tcpd pam libwww ssl python esd imlib oggvorbis gtk qt motif opengl aalib afs alsa bonobo cdr cjk dga directfb dvd evo fbcon flash gb gd ggi gphoto2 gtkhtml guile imap innodb ipv6 junit lcms ldap libgda maildir mozilla mysql nas odbc pda perl pic plotutils postgres ruby samba sasl scanner snmp sse tcltk tetex tiff usb wmf xml"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe"
CXXFLAGS="-march=pentium4 -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-13 23:39:27 UTC
Change the -march/cpu=athlon to 'i686'.  Same with -march/cpu=pentium4, and
try again please.
Comment 3 Mark Tlay 2003-02-14 00:28:38 UTC
I changed to -O2 and it worked (I got your message too late.)
Comment 4 Justin L. Karr 2003-02-14 17:46:05 UTC
Setting march to i686 didn't do the trick: same error. I'm going to try with -O2
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-16 11:30:50 UTC
Justin:  Rather use '-march=pentium3' than '-march=pentium4', as the pentium4
target is still a bit broken (talking from experience here).  I would also
recommend recompiling binutils and glibc with -march=pentium3, especially if
gcc still fails with -march=pentium3 (remerge binutils and glibc with it,
and try gcc again).
Comment 6 Seemant Kulleen (RETIRED) gentoo-dev 2003-08-02 21:51:05 UTC
Justin, any update?
Comment 7 Seemant Kulleen (RETIRED) gentoo-dev 2003-08-02 21:51:39 UTC
assuming fixed, since that was back in feb/march; reopen if you need to