Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 116841

Summary: Segmentation Fault in gcc 3.4.4-r1
Product: Gentoo Linux Reporter: david cooper <david>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: major    
Priority: High    
Version: 2005.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description david cooper 2005-12-26 21:51:59 UTC
OVERVIEW DESCRIPTION:

Gentoo 2005.1-r1 fresh install today. Stage 3 downloaded, md5 verified. Install completes to the end of the installation guide. Emerge -e system stops at gcc with another seg fault / ICE. This PC was just rebuilt, prior it was running successfully from the 2005.1 LiveCD. This bug report focuses on the GCC ICE/SF.


STEPS TO REPRODUCE:

Documented installation steps below, emerge -e system.


ACTUAL RESULTS:

GCC ERROR (3.4.4-r1)

/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/optabs.c: In function `expand_binop':
/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/optabs.c:1891: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [optabs.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/gcc'
make[1]: *** [stagefeedback_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.4-r1 failed.
!!! Function gcc_do_make, Line 1314, Exitcode 2
!!! emake failed with profiledbootstrap


EXPECTED RESULTS:

Compilation of GCC completes successfully.

BUILD DATE/PLATFORM:

Build date 2005-12-26
Platform Gentoo 2005.1-r1, kernel 2.6.14r5 (gentoo-sources)

EMERGE --INFO
--------------
Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.14-gentoo-r5 i686)
=================================================================
System uname: 2.6.14-gentoo-r5 i686 AMD Athlon(tm) XP 3000+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -Os -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://prometheus.cs.wmich.edu/gentoo http://mirror.datapipe.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts bzip2 crypt dvd eds emboss encode expat foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib jpeg kde libg++ libwww lirc mad mikmod motif mp3 mpeg mysql mythtv ncurses nls ogg oggvorbis opengl pam pdflib perl png python qt quicktime readline sdl spell ssl tcpd truetype truetype-fonts type1-fonts udev usb vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY


ADDITIONAL INFO:
### INSTALLATION NOTES ###

# Updated 2005-12-27
# Stage 3 only supported method now

# PVR Build Steps

# From Boot CD

ifconfig eth0 192.168.1.6/24

passwd

nano -w /etc/ssh/sshd_config
# allow root login
# allow password auth

/etc/init.d/sshd start

# SSH from this point on

alias nano='nano -w'

net-setup eth0
 192.168.1.6
 255.255.255.0
 192.168.1.1
 192.168.1.1

alias nano='nano -w'

fdisk /dev/hda
 n p 1 1 17
 n p 2 18 49
 n p 3 50 658
 n p 4 659 9964
 t 2 82
 w

mkreiserfs /dev/hda1
mkswap /dev/hda2
mkreiserfs /dev/hda3
mkreiserfs /dev/hda4

swapon /dev/hda2

mount /dev/hda3 /mnt/gentoo
mkdir /mnt/gentoo/boot /mnt/gentoo/pvrtmp
mount /dev/hda1 /mnt/gentoo/boot
mount /dev/hda4 /mnt/gentoo/pvrtmp

date
date MMDDhhmmYYYY

cd /mnt/gentoo
tar -xvjpf /mnt/cdrom/stage3*.tar.bz2
tar -xvjf /mnt/cdrom/portage*.tar.bz2 -C /mnt/gentoo/usr

nano /mnt/gentoo/etc/make.conf
# make.conf

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -Os -pipe"
MAKEOPTS="-j2"
LIRC_OPTS="--with-x --with-driver=any --with-major=61 --with-port=0x03e8 --with-irq=4"
USE="apache2 alsa dvd gtk gtk2 -ipv6 lirc kde mysql mythtv -oss usb X"

mirrorselect -a -D -s4 -o >> /mnt/gentoo/etc/make.conf

cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
chroot /mnt/gentoo /bin/bash
env-update

source /etc/profile
emerge --sync

# confirm pathname does not end with 2.4
ls -FGg /etc/make.profile

mkdir -p /etc/portage
echo "sys-libs/glibc userlocales" >> /etc/portage/package.use
nano /etc/locales.build
# Only these two
# en_US/ISO-8859-1
# en_US.UTF-8/UTF-8

ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
echo "sys-kernel/gentoo-sources -doc" >> /etc/portage/package.use
emerge gentoo-sources pciutils

lspci

cd /usr/src/linux
make menuconfig

# update configuration for platform specific drivers
make && make modules_install

cp arch/i386/boot/bzImage /boot/steady-kernel
cp .config /boot/steady-config
cp System.map /boot/steady-System.map

rm /etc/modules.autoload.d/kernel-2.4
find /lib/modules/ -type f -iname '*.o' -or -iname '*.ko' >> /etc/modules.autoload.d/kernel-2.6
nano /etc/modules.autoload.d/kernel-2.6

nano /etc/fstab

# /etc/fstab
/dev/hda1               /boot           reiserfs        noatime,notail  1 2        
/dev/hda2               none            swap            sw              0 0
/dev/hda3               /               reiserfs        noatime         0 1
/dev/hda4               /captured       reiserfs        noatime         0 1        
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0
proc                    /proc           proc            defaults        0 0
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0
server:/        /server         nfs     rsize=8192,wsize=8192,timeo=14,intr

cd /etc/conf,d
nano hostname
HOSTNAME="alpine"

nano domainname
DNSDOMAIN="five-speed.net"

rc-update add domainname default

emerge bridge-utils
nano net

# /etc/conf.d/net
# I'm bridging two nics together
bridge_br0="eth0 eth1"
#bridge_br0="eth0"
config_eth0=( "null" )
config_eth1=( "null" )
config_br0=( "192.168.1.6/24" )
routes_br0=( "default gw 192.168.1.1" )
#brctl_br0= ( "" )

ln -s /etc/init.d/net.eth0 /etc/init.d/net.br0
rc-update add net.br0 default

passwd 

nano /etc/conf.d/clock
CLOCK="local"
CLOCK_SYSTOHC="yes"

nano /etc/conf.d/hdparm
all_args="-d1c3u1"
hda_args="-m16A1"

rc-update add hdparm boot

emerge -av vixie-cron syslog-ng logrotate slocate nfs-utils grub reiserfsprogs ntp  gentoolkit screen

rc-update add vixie-cron default
rc-update add syslog-ng default

mkdir /server
rc-update add nfs default
rc-update add ntpd default

nano /etc/ssh/sshd_config
# allow root login
# allow PW auth

rc-update add sshd default

grep -v rootfs /proc/mounts > /etc/mtab
nano /boot/grub/grub.conf

grub --no-floppy

# root (hd0,0)
# setup (hd0)

nano ~/.bashrc
alias nano='nano -w'
alias ls='ls --color'

exit
cd /
umount /mnt/gentoo/pvrtmp /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
reboot

############ GENTOO INSTALL COMPLETED #######################
#############################################################

nano /etc/portage/package.keywords

# /etc/portage/package.keywords
app-admin/eselect-opengl ~x86
app-admin/eselect ~x86
app-misc/lirc ~x86
dev-perl/SOAP-Lite ~x86
media-libs/faad2 ~x86
media-plugins/mythvideo ~x86
media-plugins/mythdvd ~x86
media-plugins/mythbrowser ~x86
media-plugins/mythgallery ~x86
media-plugins/mythgame ~x86
media-plugins/mythmusic ~x86
media-plugins/mythnews ~x86
media-plugins/mythweather ~x86
media-tv/ivtv ~x86
media-tv/mythtv ~x86
x11-drivers/ati-drivers ~x86
x11-apps/ati-drivers-extra ~x86
www-apps/mythweb ~x86

nano /etc/portage/package.use

# /etc/portage.package.use
sys-libs/glibc userlocales
sys-kernel/gentoo-sources -doc
dev-db/mysql -perl
net-www/apache mysql
media-video/mplayer mmx mmxext 3dnow 3dnowext sse


# Eliminates KVM issue with mouse, disables wheel
echo "options psmouse proto=bare" > /etc/modules.d/psmouse

emerge -av alsa-utils

alsamixer
# set master volume 75%
# press M to unmute
# move right to Line
# may have to un-CAPTUR something on the next screen, press TAB to 'All'
# press space "CAPTUR"
# set volume to 75%
# leave muted
# press Esc

alsaconf
# ignore errors

rc-update add alsasound boot

emerge -av ivtv

nano /etc/modules.autoload.d/kernel-2.6
# put ivtv above tveeprom

emerge -av evilwm
emerge -av kdebase 
# Emerge fails at mysql

emerge -e system
# Emerge fails at gcc
Comment 1 SpanKY gentoo-dev 2005-12-26 23:13:53 UTC
does it fail at the same place everytime ?

if so, try using '-O2' instead of '-Os' in your CFLAGS and restart the install process
Comment 2 david cooper 2005-12-27 06:58:35 UTC
Thanks spanKY.

Update:

Even though 'emerge -e system' failed at gcc, I was able to go past mysql in 'emerge kdebase'. 'emerge kdebase' now fails at qt with ICE/SF.

kdevdlg2ui.cpp: In member function `bool KDEVDLG2UI::writeDialog(const 
   QString&)':
kdevdlg2ui.cpp:516: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[4]: *** [.obj/release-shared-mt/kdevdlg2ui.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/qt-3.3.4-r8/work/qt-x11-free-3.3.4/tools/designer/plugins/kdevdlg'
make[3]: *** [sub-kdevdlg] Error 2
make[3]: Leaving directory `/var/tmp/portage/qt-3.3.4-r8/work/qt-x11-free-3.3.4/tools/designer/plugins'
make[2]: *** [sub-plugins] Error 2
make[2]: Leaving directory `/var/tmp/portage/qt-3.3.4-r8/work/qt-x11-free-3.3.4/tools/designer'
make[1]: *** [sub-designer] Error 2
make[1]: Leaving directory `/var/tmp/portage/qt-3.3.4-r8/work/qt-x11-free-3.3.4/tools'
make: *** [sub-tools] Error 2

!!! ERROR: x11-libs/qt-3.3.4-r8 failed.
!!! Function src_compile, Line 187, Exitcode 2
!!! (no error message)

I had originally set my CFLAGS using O2, but when I started running into ICE/SF I changed it back to Os, the Stage 3 default. I've restored this setting to O2 and am recompiling system now.
Comment 3 david cooper 2005-12-27 07:35:25 UTC
Update:

Almost comical, 'emerge -e system' fails, but while compiling a DIFFERENT version of GCC.

/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/f/intrin.c: In function `ffeintrin_kindtype':
/var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/gcc/f/intrin.c:2030: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [f/intrin.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.6/work/build/gcc'
make[1]: *** [stage3_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.6/work/build/gcc'
make: *** [bootstrap-lean] Error 2

!!! ERROR: sys-devel/gcc-3.3.6 failed.
!!! Function gcc_do_make, Line 1314, Exitcode 2
!!! emake failed with bootstrap-lean

Used 'gcc-config -l' to identify 3.4.4 version, selected using 'gcc-config 6', restarting 'emerge -e system'.

#gcc-config -l
 [1] i686-pc-linux-gnu-3.3.5-20050130 *
 [2] i686-pc-linux-gnu-3.3.5-20050130-hardened
 [3] i686-pc-linux-gnu-3.3.5-20050130-hardenednopie
 [4] i686-pc-linux-gnu-3.3.5-20050130-hardenednopiessp
 [5] i686-pc-linux-gnu-3.3.5-20050130-hardenednossp
 [6] i686-pc-linux-gnu-3.4.4
 [7] i686-pc-linux-gnu-3.4.4-hardened
 [8] i686-pc-linux-gnu-3.4.4-hardenednopie
 [9] i686-pc-linux-gnu-3.4.4-hardenednopiessp
 [10] i686-pc-linux-gnu-3.4.4-hardenednossp


#gcc-config 6
  [ ok ]hing native-compiler to i686-pc-linux-gnu-3.4.4 ...

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   # source /etc/profile

#source /etc/profile


Comment 4 david cooper 2005-12-27 09:02:58 UTC
Update:

GCC 3.4.4-r1 failed, but in a different place.

/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/resource.c: In function `find_basic_block':
/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/resource.c:134: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [resource.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.4-r1/work/build/gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.4-r1 failed.
!!! Function gcc_do_make, Line 1314, Exitcode 2
!!! emake failed with profiledbootstrap


When I engaged 'emerge --resume' to see if the fault duplicated, it tried to compile 3.3.6 instead of 3.4.4. 'gcc-config -l' shows that 3.4.4 is still the preferred compiler.
Comment 5 david cooper 2005-12-27 10:22:14 UTC
Update:

'emerge system' and 'emerge world' eventually both needed shadow and perl to complete. I picked off all of the other packages one by one until it was these two that would not compile successfully. I rebooted my machine and tried again. I got both to compile. I'm resuming my 'emerge kdebase' now. Some kind of circular dependency thing? I don't know what happened to gcc.. should I try to recompile it and see what happens?
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2005-12-27 11:17:06 UTC

*** This bug has been marked as a duplicate of 20600 ***