Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36633 - sys-devel/gcc build failed : internal error: segmentation fault
Summary: sys-devel/gcc build failed : internal error: segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-28 03:22 UTC by Chisel Wright
Modified: 2005-06-07 19:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
End of output from ggc-build (gcc-build-error.txt,2.51 KB, text/plain)
2003-12-28 03:23 UTC, Chisel Wright
Details
My current make.conf settings (make.conf,14.11 KB, text/plain)
2003-12-28 03:24 UTC, Chisel Wright
Details
My current rc.conf (rc.conf,3.37 KB, text/plain)
2003-12-28 03:24 UTC, Chisel Wright
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chisel Wright 2003-12-28 03:22:10 UTC
Everytime I "emerge -u system" the first build (sys-devel/gcc-3.2.3-r3) fails with:

In file included from /var/tmp/portage/gcc-3.2.3-r3/work/build/i586-pc-linux-gnu/libstdc++-v3/include/string:57,
                 from /var/tmp/portage/gcc-3.2.3-r3/work/build/i586-pc-linux-gnu/libstdc++-v3/include/bitset:55,
                 from /var/tmp/portage/gcc-3.2.3-r3/work/gcc-3.2.3/libstdc++-v3/src/bitset.cc:43:
/var/tmp/portage/gcc-3.2.3-r3/work/build/i586-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc: In
   member function `_Alloc::size_type std::basic_string<_CharT, _Traits,
   _Alloc>::find(const _CharT*, _Alloc::size_type, _Alloc::size_type) const':
/var/tmp/portage/gcc-3.2.3-r3/work/build/i586-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:683: internal
   error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.


Reproducible: Always
Steps to Reproduce:
1. emerge -u system
2.
3.

Actual Results:  
internal error: Segmentation fault


Expected Results:  
gcc should have been compiled and installed

hendrix work # uname -a
Linux hendrix.hoblands.herlpacker.co.uk 2.4.20-gentoo-r5 #1 Thu Jun 5 11:40:46 
BST 2003 i586 AMD-K6(tm) 3D processor AuthenticAMD GNU/Linux
Comment 1 Chisel Wright 2003-12-28 03:23:25 UTC
Created attachment 22737 [details]
End of output from ggc-build

I can't find a full log of the compile output. If there is one, or there's a
way to generate one, I'm more than happy to create and upload it
Comment 2 Chisel Wright 2003-12-28 03:24:00 UTC
Created attachment 22738 [details]
My current make.conf settings
Comment 3 Chisel Wright 2003-12-28 03:24:23 UTC
Created attachment 22739 [details]
My current rc.conf
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-12-28 15:32:56 UTC
Could you try with CFLAGS="-march=i586" ?  There are still some issues with
3.2.3 and k6-2's ...
Comment 5 tradezbgcdan 2004-02-15 13:16:31 UTC
same thing. with GCC 3.3.2-r5, says:
insn-emit.c: In function 'gen_peephole2_1262':
insn-emit.c:19892: internal compiler error: Segmentation fault
Please submit a full bug report,
with prepro....
..
..likely a hardware or OS problem
make[2]: *** [insn-emit.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc'
make[1]: *** [stage3_build] Error 2
make[1]: Leaving directory '/var/tmp/portage/gcc-3.3.2-r5/work/build/gcc'
make: *** [bootstrap-lean] Error 2

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



Im running AMD K6 233MHz, 64mb (DIMM) + 256 (SDRAM)
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-18 09:48:59 UTC
'emerge info' please.
Comment 7 Bryan Duff 2004-05-17 13:36:11 UTC
I don't think gcc like's k6/k6-2's; try the lowest CFLAGS, and CHOST.  My old k6-2 , just didn't want to compile gcc off the install, no matter the flags (I thought it was my specific system, but perhaps k6's suck).  Also try old gcc versions see if you get the same problem.
Comment 8 Robert Moss (RETIRED) gentoo-dev 2004-06-27 20:55:30 UTC
tradezbgcdan, that looks like one of the infamous K6/K6-2 errors to me - try starting again with -march=i586. At a guess, it will probably work. Unfortunately, I don't actually know which version of GCC was the first to play nicely with K6/K6-2. If you get a similar error even with -march=i586 - but not an identical one, and not a repeatable one - I'd suspect that this is a hardware error, as this is probably about the time when "emerge gcc" has been going long enough for something to get a bit overworked.
Comment 9 Eric 2004-07-31 07:17:42 UTC
i have a simalar error with a pentium 3 computer.  I can't really say that it is a totlay different problem than what this guys is having with his computer.  i happen to be doing a stage one install and not able to get it up and going at the moment.   I have installed gentoo on this computer at an earlyer date with stage one install and was able to get it going.  i can't say exsactly what made it go down from the orignal install but i did delete all the files and run the mkfs on all partitions to clean the data off of there.  however, now when i try and do a stage one install i get a problem that is simalar to what this guy is having.  

here is some information that i have gathered. 


/*************** make.conf ***********************/
USE="cdr mmx sse"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe"
CXXFLAGS="${CFLAGS}"

/* 
a warning that may not have anything to do with the problem but i though i would  list it, just in case
*/

 * Feature additions are noted in help and make.conf descriptions.

 * GENTOOLKIT will need to be updated to at least 0.2.0 for some tools
 * to work properly.

 * Update configs using 'etc-update' please. Maintaining current configs
 * for portage and other system packages is fairly important for the
 * continued health of your system.

Recalculating the counter... Counter updated successfully.

/* 
listing of the output starting from a couple screen back before the bootstrap.sh stopped.
*/

gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/debug.c -o debug.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/df.c -o df.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/diagnostic.c -o diagnostic.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/doloop.c -o doloop.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/dominance.c -o dominance.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/dwarf2asm.c -o dwarf2asm.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/dwarf2out.c -o dwarf2out.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/dwarfout.c -o dwarfout.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/emit-rtl.c -o emit-rtl.o
/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/emit-rtl.c: In function `set_me
m_attributes_minus_bitpos':
/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/emit-rtl.c:1858: warning: compa
rison between signed and unsigned
/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/dwarf2out.c: In function `looku
p_filename':
/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/dwarf2out.c:12421: internal com
piler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/except.c -o except.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/explow.c -o explow.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/expmed.c -o expmed.o
gcc -c -O -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-pr
ototypes -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portag
e/gcc-3.3.3-r6/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3
/gcc/. -I/var/tmp/portage/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/config -I/var/tmp/port
age/gcc-3.3.3-r6/work/gcc-3.3.3/gcc/../include /var/tmp/portage/gcc-3.3.3-r6/wor
k/gcc-3.3.3/gcc/expr.c -o expr.o
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [dwarf2out.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r6/work/build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r6/work/build/gcc'
make: *** [bootstrap-lean] Error 2

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

i know my case is a little different that the one that orignaly posted but i think it could be the same basic problem.  i have modified the -O flag from 1 to 3 and scaled the march flag from pentium 3 to 2 and all combinations of those two flaggs.

hope i didn't cause any problems by posting here. 
let me know if there is anything i can list that would help solve the problem.   
Comment 10 Eric 2004-08-13 16:44:43 UTC
i am back.  i figured out why my computer wasn't compiling.  somewhere between not mounting the /proc and not activating the swap drive is what fixed this problem.  i don't know if this will work for the orignal problem.
Comment 11 Caleb Tennis (RETIRED) gentoo-dev 2005-06-07 19:31:19 UTC
assuming this is fixed with the latest ebuilds.