Building GCC 4.0.0 on AIX 5.3

From: Richard (rnhurt_at_gmail.com)
Date: 06/09/05


Date: 9 Jun 2005 11:40:57 -0700

Hello,

I am running into problems trying to build GCC 4.0.0 (or GCC 3.4.4) on
AIX 5.3. Currently, we have GCC 3.3.2 installed from the IBM disks.
But that package is pretty old and it's built specifically for AIX 5.2
not 5.3. So I set off trying to update it; and found out that IBM
doesn't yet provide a GCC package for AIX 5.3. Grrr....

Anyway, I grabbed the source code and untared it into
/apps/src/gcc-4.0.0 and then ran this config from /apps/src/objdir:

  /apps/src/gcc-4.0.0/configure --prefix=/opt/freeware
--enable-threads=aix --enable-languages=c,c++ --disable-nls

I then ran a simple make bootstrap and waited. After quite a while (45
mins?) I get the following dump:

...
 <lots of missing files from various mv and cp commands>
...
stage1/xgcc -Bstage1/ -B/opt/freeware/gcc40/powerpc-ibm-aix5.3.0.0/bin/
-c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
-Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -I.
-Ibuild -I/apps/src/gcc-4.0.0/gcc -I/apps/src/gcc-4.0.0/gcc/build
-I/apps/src/gcc-4.0.0/gcc/../include
-I/apps/src/gcc-4.0.0/gcc/../libcpp/include \
 -o build/genmodes.o /apps/src/gcc-4.0.0/gcc/genmodes.c
stage1/xgcc -Bstage1/ -B/opt/freeware/gcc40/powerpc-ibm-aix5.3.0.0/bin/
-c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
-Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE -I.
-Ibuild -I/apps/src/gcc-4.0.0/gcc -I/apps/src/gcc-4.0.0/gcc/build
-I/apps/src/gcc-4.0.0/gcc/../include
-I/apps/src/gcc-4.0.0/gcc/../libcpp/include \
 -o build/errors.o /apps/src/gcc-4.0.0/gcc/errors.c
stage1/xgcc -Bstage1/ -B/opt/freeware/gcc40/powerpc-ibm-aix5.3.0.0/bin/
  -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
-Wold-style-definition -DHAVE_CONFIG_H -DGENERATOR_FILE
-Wl,-bbigtoc -o build/genmodes \
 build/genmodes.o build/errors.o
../build-powerpc-ibm-aix5.3.0.0/libiberty/libiberty.a
build/genmodes -h > tmp-modes.h
exec(): 0509-036 Cannot load program build/genmodes because of the
following errors:
        0509-150 Dependent module libc.a(shr.o) could not be loaded.
        0509-022 Cannot load module libc.a(shr.o).
        0509-026 System error: A file or directory in the path name
does not exist.
make[2]: *** [s-modes] Error 255
make[2]: Leaving directory `/apps/src/objdir/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/apps/src/objdir/gcc'
make: *** [bootstrap] Error 2

In fact when I try to execute build/genmodes it gives me the same
error, so it looks like genmodes is not being compiled correctly. I
have tried this compile several times with several different
modifications to the configure script with no change. I even grabbed
the source for GCC 3.4.4 and it spewed the same error.

I am pretty much a newbie to rolling my own compiler and haven't worked
in AIX too much so don't slap me too hard. :) Does anyone have any
thoughts? I can't seem to find anything in the output that screams
FIXME so I don't really know where to go next. I will probably try
leaving of the 'c++' language to see if that helps, although I really
want C++ compilation capabilities.

Thanx!
  Richard

BTW: I think this worked _once_. In playing around I got through a
complete make; but I don't know if everything worked correctly though.
Is there a quick/dirty way to test GCC?



Relevant Pages

  • Re: libc6 gcc wrapper
    ... I have a wrapper around gcc ... > even if I'm compiling a package with ill-behaved makefiles that ignore ... ofcourse I compile with debuild only. ...
    (Debian-User)
  • Re: Porting PCL to Tiff converter AIX 4.3
    ... I am very "foreign" to AIX so ... "Uli Link" wrote in message ... > The latest GCC I was able to bootstrap without tweaks on 4.3.3 was GCC ... > - Makefiles don't know how to compile thread safe ...
    (comp.unix.aix)
  • Re: Install directory conventions
    ... Does GCC have a package management system? ... Packages are usually easier to install and uninstall; with source code ... pre-compiled compiler that I can use to compile GCC? ...
    (comp.unix.questions)
  • libstdc++5 problem
    ... after which firefox worked ok. ... Then I tried to compile a few programs and hit, with each time, the same ... clearly I have a problem here since my version of gcc is the stable ... dependencies seem to require that I remove my kernel-image package! ...
    (Debian-User)
  • problem compiling perl source on AIX 5.1.0.0 using GCC
    ... The gcc is the AIX build obtained at UCLA ... perl source obtained directly from perl ) ... I need to compile the perl with gcc as the modules that need compiling ...
    (comp.lang.perl)