Bug 23101 - Make Bootstrap fails on AIX 5.2 ML6
Summary: Make Bootstrap fails on AIX 5.2 ML6
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.3.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 25134 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-27 21:18 UTC by Liz Brosch
Modified: 2012-01-11 14:16 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Brosch 2005-07-27 21:18:37 UTC
I am attempting to compile GCC version 3.3.2 on my AIX system.  Here is the 
host config:
AIX 5.2 ML 6
powerpc-ibm-aix5.2.0.0
GNU make v 3.80
Native ar and ld (/usr/bin/ar /usr/bin/ld)
Using Native C compiler:  cc_r - C for AIX Compiler, Version 6
environment variables:  OBJECT_MODE=64 CC=cc_r
APAR  IY53606 installed
configure statement:
/usr/local/builds/gcc-3.3.2/objdir] ../configure  --prefix=/usr/local/gcc-
3.3.2 --enable-threads=aix --disable-nls

When running "make bootstrap" it fails with the following:
mkdir libgcc/pthread/ppc64
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
./xgcc -B./ -B/usr/local/gcc-3.3.2/powerpc-ibm-aix5.2.0.0/bin/ -
isystem /usr/local/gcc-3.3.2/powerpc-ibm-aix5.2.0.0/include -
isystem /usr/local/gcc-3.3.2/powerpc-ibm-aix5.2.0.0/sys-include -O2  -
DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -
isystem ./include   -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -
D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -
I../../gcc/../include  -DL_muldi3 -c ../../gcc/libgcc2.c -o libgcc/./_muldi3.o
Assembler:
/tmp//ccLHMdWu.s: line 68: 1252-191 Only .llong should be used for relocatable 
expressions.
/tmp//ccLHMdWu.s: line 285: 1252-191 Only .llong should be used for relocatable 
expressions.
/tmp//ccLHMdWu.s: line 446: 1252-191 Only .llong should be used for relocatable 
expressions.
make[3]: *** [libgcc/./_muldi3.o] Error 1
make[3]: Leaving directory `/usr/local/builds/gcc-3.3.2/objdir/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/usr/local/builds/gcc-3.3.2/objdir/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/usr/local/builds/gcc-3.3.2/objdir/gcc'
make: *** [bootstrap] Error 2

I have read a build document (http://gcc.gnu.org/ml/gcc/2003-11/msg01493.html) 
and searched Google but no luck.

I have successfully compiled this exact version on another development server - 
AIX 5.2 ML3 and I used native C compiler to build it.  But I am getting no 
where with this and need some help.
Comment 1 Andrew Pinski 2005-07-27 21:29:52 UTC
What happens if you don't set OBJECT_MODE to 64?
Comment 2 Liz Brosch 2005-07-27 21:32:32 UTC
Subject: RE:  Make Bootstrap fails on AIX 5.2 ML6

It gets past it.

As stated before, I have successfully compiled gcc v 3.3.2 on AIX 5.2
ML3 using the OBJECT_MODE variable.  So I can't understand why I can't
get this compiled this time!



Elizabeth Brosch
Sr. Systems Engineer
Thomson Scientific & Healthcare - System Services
Philadelphia, PA  19104
office:  (215) 386-0100 x1144
cell:     (267) 784-9166

-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org] 
Sent: Wednesday, July 27, 2005 5:30 PM
To: Brosch, Liz (TS USA)
Subject: [Bug bootstrap/23101] Make Bootstrap fails on AIX 5.2 ML6


------- Additional Comments From pinskia at gcc dot gnu dot org
2005-07-27 21:29 -------
What happens if you don't set OBJECT_MODE to 64?

Comment 3 Andrew Pinski 2005-07-27 21:43:52 UTC
Try the following add BOOT_CFLAGS="-O2 -maix64 -g" and it should work.
Comment 4 Liz Brosch 2005-07-27 21:51:49 UTC
Subject: RE:  Make Bootstrap fails on AIX 5.2 ML6

I exported the BOOT_CFLAGS you suggested but it fails on the exact
error.

Elizabeth Brosch
Sr. Systems Engineer
Thomson Scientific & Healthcare - System Services
Philadelphia, PA  19104
office:  (215) 386-0100 x1144
cell:     (267) 784-9166

-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org] 
Sent: Wednesday, July 27, 2005 5:44 PM
To: Brosch, Liz (TS USA)
Subject: [Bug bootstrap/23101] Make Bootstrap fails on AIX 5.2 ML6


------- Additional Comments From pinskia at gcc dot gnu dot org
2005-07-27 21:43 -------
Try the following add BOOT_CFLAGS="-O2 -maix64 -g" and it should work.

Comment 5 Liz Brosch 2005-07-28 14:07:46 UTC
Subject: RE:  Make Bootstrap fails on AIX 5.2 ML6

Thanks so much for your help yesterday.  Can you think of anything else
that I could try?  I'm banging my head against the wall trying to figure
this one out!

Thanks again.

Elizabeth Brosch
Sr. Systems Engineer
Thomson Scientific & Healthcare - System Services
Philadelphia, PA  19104
office:  (215) 386-0100 x1144
cell:     (267) 784-9166
-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org] 
Sent: Wednesday, July 27, 2005 5:44 PM
To: Brosch, Liz (TS USA)
Subject: [Bug bootstrap/23101] Make Bootstrap fails on AIX 5.2 ML6


------- Additional Comments From pinskia at gcc dot gnu dot org
2005-07-27 21:43 -------
Try the following add BOOT_CFLAGS="-O2 -maix64 -g" and it should work.

Comment 6 Andrew Pinski 2005-10-30 17:17:07 UTC
Why do you want a compiler which is built in 64bit mode, it will not default to 64bit mode?  It will be slower and hug more memory.
Comment 7 Liz Brosch 2005-11-02 17:21:31 UTC
Subject: RE:  Make Bootstrap fails on AIX 5.2 ML6


I agree. I realized that this was unnecessary.  Thanks for the reply.

------- Comment #6 from pinskia at gcc dot gnu dot org  2005-10-30 17:17
-------
Why do you want a compiler which is built in 64bit mode, it will not
default to
64bit mode?  It will be slower and hug more memory.


Comment 8 Andrew Pinski 2005-12-25 02:26:14 UTC
*** Bug 25134 has been marked as a duplicate of this bug. ***
Comment 9 Andrew Pinski 2005-12-27 17:42:29 UTC
*** Bug 25134 has been marked as a duplicate of this bug. ***
Comment 10 Nate 2010-10-06 17:35:53 UTC
I managed to get it to compile partially with the following:

flag=" -lgcc -I/usr/local/include/ -I/usr/include/ -L/usr/local/lib/ -Wl,-brtl -Wl,-berok "
export BOOT_CFLAGS="-O2 -maix32 -g"
export PATH=/usr/local/bin/:$PATH
export CC="/usr/local/bin/gcc" CFLAGS=" $flag "
export CXX=/usr/local/bin/g++ CXXFLAGS=" $flag "
export CPP="$CC -E " CPPFLAGS=" $flag "
export CPPFLAGS=-fexceptions
export OBJECT_MODE=32
export LDFLAGS="-L/usr/local/lib/ -berok"
make clean
./configure --enable-languages=c,c++,fortran --prefix=/usr/local/gcc/4.5.1/ ABI=32 --enable-bootstrap --with-gmp=/usr/local/gcc/4.5.1/ --with-mpfr=/usr/local/gcc/4.5.1/ --with-mpc=/usr/local/gcc/4.5.1/ && \
make bootstrap

It gets all the way to here:
make[3]: Entering directory `/usr/local/src/gcc-4.5.1/build-powerpc-ibm-aix5.3.0.0/libiberty'
if [ x"" != x ]; then \
          /usr/local/bin/gcc -c -DHAVE_CONFIG_H -lgcc -I/usr/local/include/ -I/usr/include/ -L/usr/local/lib/ -Wl,-brtl -Wl,-berok   -fexceptions -I. -I../.././libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic   ../.././libiberty/physmem.c -o pic/physmem.o; \
        else true; fi
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -lgcc -I/usr/local/include/ -I/usr/include/ -L/usr/local/lib/ -Wl,-brtl -Wl,-berok   -fexceptions -I. -I../.././libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../.././libiberty/physmem.c -o physmem.o
../.././libiberty/physmem.c: In function 'physmem_total':
../.././libiberty/physmem.c:96: error: storage size of 'pss' isn't known
../.././libiberty/physmem.c:97: warning: implicit declaration of function 'pstat_getstatic'
../.././libiberty/physmem.c:96: warning: unused variable 'pss'
../.././libiberty/physmem.c: In function 'physmem_available':
../.././libiberty/physmem.c:200: error: storage size of 'pss' isn't known
../.././libiberty/physmem.c:201: error: storage size of 'psd' isn't known
../.././libiberty/physmem.c:203: warning: implicit declaration of function 'pstat_getdynamic'
../.././libiberty/physmem.c:201: warning: unused variable 'psd'
../.././libiberty/physmem.c:200: warning: unused variable 'pss'
make[3]: *** [physmem.o] Error 1
make[3]: Leaving directory `/usr/local/src/gcc-4.5.1/build-powerpc-ibm-aix5.3.0.0/libiberty'
Comment 11 Richard Biener 2012-01-11 14:16:08 UTC
Thus, works.