Bug 38606 - AIX: build failed in stage 2
Summary: AIX: build failed in stage 2
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-22 14:52 UTC by Rainer Tammer
Modified: 2009-07-19 16:53 UTC (History)
2 users (show)

See Also:
Host: powerpc-ibm-aix5.3.0.0
Target: powerpc-ibm-aix5.3.0.0
Build: powerpc-ibm-aix5.3.0.0
Known to work:
Known to fail:
Last reconfirmed:


Attachments
spec file (3.78 KB, text/plain)
2008-12-22 14:53 UTC, Rainer Tammer
Details
script to start build (283 bytes, text/plain)
2008-12-22 14:54 UTC, Rainer Tammer
Details
build log (135.29 KB, application/octet-stream)
2008-12-22 14:55 UTC, Rainer Tammer
Details
last 250 lines build log (2.84 KB, text/plain)
2008-12-22 14:55 UTC, Rainer Tammer
Details
genautomata.prep.c.gz (80.34 KB, application/octet-stream)
2008-12-22 15:17 UTC, Rainer Tammer
Details
insn-attrtab.prep.c.gz (138.45 KB, application/octet-stream)
2008-12-22 15:17 UTC, Rainer Tammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Tammer 2008-12-22 14:52:49 UTC
Hello,
I tried to build 4.3.2 on AIX 5.3. The build failed in stage2:

/opt/freeware/src/packages/BUILD/gcc-build/./prev-gcc/xgcc -B/opt/freeware/src/packages/BUILD/gcc-build/./prev-gcc/ -B/opt/freeware/powerpc-ibm-aix5.3.0.0/bin/ -c   -O2 -I/opt/freeware/include -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../../gcc-4.3.2/gcc -I../../gcc-4.3.2/gcc/. -I../../gcc-4.3.2/gcc/../include -I../../gcc-4.3.2/gcc/../libcpp/include  -I../../gcc-4.3.2/gcc/../libdecnumber -I../../gcc-4.3.2/gcc/../libdecnumber/dpd -I../libdecnumber -I/opt/freeware/include   insn-attrtab.c -o insn-attrtab.o
../../gcc-4.3.2/gcc/config/rs6000/rs6000.md: In function 'internal_dfa_insn_code':
../../gcc-4.3.2/gcc/config/rs6000/rs6000.md:148: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gmake[3]: *** [insn-attrtab.o] Error 1
gmake[3]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build/gcc'
gmake[2]: *** [all-stage2-gcc] Error 2
gmake[2]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build'
gmake[1]: *** [stage2-bubble] Error 2
gmake[1]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build'
gmake: *** [bootstrap-lean] Error 2
Bad exit status from /tmp/rpm-tmp.27170 (%build)

I will upload the build log an the SPEC file. 
I have used IBM XLC/C++ V9 as a bootstrap for stage 1.

Bye
  Rainer
Comment 1 Rainer Tammer 2008-12-22 14:53:34 UTC
Created attachment 16963 [details]
spec file
Comment 2 Rainer Tammer 2008-12-22 14:54:02 UTC
Created attachment 16964 [details]
script to start build
Comment 3 Rainer Tammer 2008-12-22 14:55:10 UTC
Created attachment 16965 [details]
build log
Comment 4 Rainer Tammer 2008-12-22 14:55:32 UTC
Created attachment 16966 [details]
last 250 lines build log
Comment 5 Rainer Tammer 2008-12-22 15:16:37 UTC
Hello,
some additions:

The same happens for genautomata.c.

/opt/freeware/src/packages/BUILD/gcc-build/./prev-gcc/xgcc -B/opt/freeware/src/packages/BUILD/gcc-build/./prev-gcc/ -B/opt/freeware/powerpc-ibm-aix5.3.0.0/bin/ -c   -g -O2 -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 -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.3.2/gcc -I../../gcc-4.3.2/gcc/build -I../../gcc-4.3.2/gcc/../include -I../../gcc-4.3.2/gcc/../libcpp/include  -I../../gcc-4.3.2/gcc/../libdecnumber -I../../gcc-4.3.2/gcc/../libdecnumber/dpd -I../libdecnumber -I/opt/freeware/include   -o build/genautomata.o ../../gcc-4.3.2/gcc/genautomata.c
: In function 'create_automata':
:6534: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gmake[3]: *** [build/genautomata.o] Error 1


I have successfully tried to produce the preprocessed output with -E. This worked OK. 

After that I could compile the two preprocessed files with 4.2.4 gcc -c xxx.c ... With 4.3.2 gcc the same error happens:

export PATH=/opt/freeware/src/packages/BUILD/gcc-build/prev-gcc:$PATH;xgcc  -c insn-attrtab.prep.c
../../gcc-4.3.2/gcc/config/rs6000/rs6000.md: In function 'internal_dfa_insn_code':
../../gcc-4.3.2/gcc/config/rs6000/rs6000.md:148: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I will upload the two files.

Bye
  Rainer

P.S.:
# ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        32768
memory(kbytes)       32768
coredump(blocks)     2097151
nofiles(descriptors) 2000

Comment 6 Rainer Tammer 2008-12-22 15:17:07 UTC
Created attachment 16967 [details]
genautomata.prep.c.gz
Comment 7 Rainer Tammer 2008-12-22 15:17:32 UTC
Created attachment 16968 [details]
insn-attrtab.prep.c.gz
Comment 8 Andrew Pinski 2008-12-22 16:04:40 UTC
Can you try increasing the stack size limit when building?  insn-attrtab.c compiled at -O0 is known to have a big stack size.
Comment 9 Rainer Tammer 2008-12-23 07:24:17 UTC
Hello,
OK, I will rebuild with a doubled stack size.
I will report back as soon as I have new results.
Bye
  Rainer
Comment 10 Rainer Tammer 2008-12-23 08:35:44 UTC
Hello,
same error:

echo timestamp > s-attr
/opt/freeware/src/packages/BUILD/gcc-build/./prev-gcc/xgcc -B/opt/freeware/src/packages/BUILD/gcc-build/./prev-gcc/ -B/opt/freeware/powerpc-ibm-aix5.3.0.0/bin/ -c   -O2 -I/opt/freeware/include -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../../gcc-4.3.2/gcc -I../../gcc-4.3.2/gcc/. -I../../gcc-4.3.2/gcc/../include -I../../gcc-4.3.2/gcc/../libcpp/include  -I../../gcc-4.3.2/gcc/../libdecnumber -I../../gcc-4.3.2/gcc/../libdecnumber/dpd -I../libdecnumber -I/opt/freeware/include   insn-attrtab.c -o insn-attrtab.o
../../gcc-4.3.2/gcc/config/rs6000/rs6000.md: In function 'internal_dfa_insn_code':
../../gcc-4.3.2/gcc/config/rs6000/rs6000.md:148: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gmake[3]: *** [insn-attrtab.o] Error 1
gmake[3]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build/gcc'
gmake[2]: *** [all-stage2-gcc] Error 2
gmake[2]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build'
gmake[1]: *** [stage2-bubble] Error 2
gmake[1]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build'
gmake: *** [bootstrap-lean] Error 2
Bad exit status from /tmp/rpm-tmp.17996 (%build)



root@build53 rc:130 # ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        65536 <- double stack size
memory(kbytes)       32768
coredump(blocks)     2097151
nofiles(descriptors) 2000


If I produce the preprocessed listing with -E the I can compile this with gcc 4.2.4.

Bye
  Rainer
Comment 11 Rainer Tammer 2009-01-12 07:12:47 UTC
Hello,
any news ?
Bye
  Rainer
Comment 12 Mathis Rosenhauer 2009-02-06 13:34:31 UTC
Maybe you are running out of native heap. Try with something like:

export LDR_CNTRL=MAXDATA=0x40000000
Comment 13 Rainer Tammer 2009-02-08 09:39:47 UTC
Hello,
OK, I will try with an extended heap.

Bye
  Rainer
Comment 14 vladimir penev 2009-06-13 13:23:02 UTC
Hello,
It works for me, to bootstrap GCC 4.3.3 on AIX 5.3

Regards,
vladimir penev

(In reply to comment #12)
> Maybe you are running out of native heap. Try with something like:
> 
> export LDR_CNTRL=MAXDATA=0x40000000
> 

Comment 15 Rainer Tammer 2009-06-13 14:18:30 UTC
Hello,
OK I will try gcc 4.3.3.

Please could you be so kind and post your complete configure call + additional env settings (if set) ?

Thanks in advance.

Bye
  Rainer
Comment 16 vladimir penev 2009-06-13 20:31:01 UTC
Hello,
I configured with:
../gcc-4.3.3/configure --prefix=/usr/local/4.3.3 --enable-shared --enable-threads=posix --enable-checking=release --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc
Additional env sets:
CC=cc (I used the native compiler)
LDR_CNTRL=MAXDATA=0x40000000
CONFIG_SHELL=.../bash

Regards,
vladimir penev

(In reply to comment #15)
> Hello,
> OK I will try gcc 4.3.3.
> 
> Please could you be so kind and post your complete configure call + additional
> env settings (if set) ?
> 
> Thanks in advance.
> 
> Bye
>   Rainer
> 

Comment 17 Rainer Tammer 2009-07-19 16:53:39 UTC
Hello,
gcc 4.3.4 solves this problem.
Bye
  Rainer