AIX 4.3 and gcc-3.4.6 build

Jędrzej Dudkiewicz jedrzej.dudkiewicz@gmail.com
Mon Apr 28 12:20:00 GMT 2008


Hi,

I'm trying to build gcc-3.4.6 on AIX 4.3. I'm following the
system-specific instructions for AIX system (CONFIG_SHELL, patches,
etc.).
As a machine I build on is rather old, there is not enough space on
harddisk, so I'm doing everything on a remote mount (NFS).
Whole thing is mounted in /jd directory, neither NIS nor similar
service are active.
In /jd/src/gcc-build/ directory there is directory with gcc sources
(./gcc-3.4.6) and build directory (./aix-build).
Directory /jd/aix-tmp-export serves as a replacement for /tmp
directory (TMP_DIR env. variable set to /jd/aix-tmp-export).
Gcc will be installed in /jd/aix-bin/gcc-3.4.6 (/jd/aix-bin already exists).

I run configure from/jd/src/gcc-build/aix-build directory:
../gcc-3.4.6/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld
--disable-nls --enable-languages=c,c++ --prefix=/jd/aix-bin/gcc-3.4.6
--enable-threads --enable-shared --enable-static

Compilation fails after about seven hours(!) with the following:

make[6]: Entering directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/powerpc/libstdc++-v3'
: make ; exec true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc"
"CC_FOR_TARGET=/jd/src/gcc-build/aix-build/gcc/xgcc
-B/jd/src/gcc-build/aix-build/gcc/
-B/jd/aix-bin/gcc-3.4.6/powerpc-ibm-aix4.3.3.0/bin/
-B/jd/aix-bin/gcc-3.4.6/powerpc-ibm-aix4.3.3.0/lib/ -isystem
/jd/aix-bin/gcc-3.4.6/powerpc-ibm-aix4.3.3.0/include -isystem
/jd/aix-bin/gcc-3.4.6/powerpc-ibm-aix4.3.3.0/sys-include" "CFLAGS=-O2
-g -O2  -mcpu=powerpc" "CXXFLAGS=-g -O2  -mcpu=powerpc"
"CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-O2 -g -O2"
"INSTALL=/jd/src/gcc-build/gcc-3.4.6/install-sh -c"
"INSTALL_DATA=/jd/src/gcc-build/gcc-3.4.6/install-sh -c -m 644"
"INSTALL_PROGRAM=/jd/src/gcc-build/gcc-3.4.6/install-sh -c"
"INSTALL_SCRIPT=/jd/src/gcc-build/gcc-3.4.6/install-sh -c"
"LDFLAGS=-mcpu=powerpc" "LIBCFLAGS=-O2 -g -O2  -mcpu=powerpc"
"LIBCFLAGS_FOR_TARGET=-O2 -g -O2" "MAKE=make"
"MAKEINFO=/jd/src/gcc-build/gcc-3.4.6/missing makeinfo
--split-size=5000000      " "PICFLAG=" "PICFLAG_FOR_TARGET="
"SHELL=/usr/local/bin/bash" "RUNTESTFLAGS="
"exec_prefix=/jd/aix-bin/gcc-3.4.6"
"infodir=/jd/aix-bin/gcc-3.4.6/info"
"libdir=/jd/aix-bin/gcc-3.4.6/lib"
"includedir=/jd/aix-bin/gcc-3.4.6/include"
"prefix=/jd/aix-bin/gcc-3.4.6"
"tooldir=/jd/aix-bin/gcc-3.4.6/powerpc-ibm-aix4.3.3.0"
"gxx_include_dir=/jd/aix-bin/gcc-3.4.6/include/c++/3.4.6" "AR=ar
-X32_64" "AS=/usr/bin/as" "LD=/usr/bin/ld" "LIBCFLAGS=-O2 -g -O2
-mcpu=powerpc" "PICFLAG=" "RANLIB=ranlib" "NM=nm -B -X32_64"
"NM_FOR_BUILD=" "NM_FOR_TARGET=nm -B -X32_64" "DESTDIR=" "WERROR="
DO=all multi-do
make[6]: Leaving directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/powerpc/libstdc++-v3'
make[5]: Leaving directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/powerpc/libstdc++-v3'
make[4]: Leaving directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/powerpc/libstdc++-v3'
make[4]: Entering directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/ppc64/libstdc++-v3'
make[4]: *** No rule to make target `all'.  Stop.
make[4]: Leaving directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/ppc64/libstdc++-v3'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/libstdc++-v3'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/libstdc++-v3'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2

Offending directory,
/jd/src/gcc-build/aix-build/powerpc-ibm-aix4.3.3.0/ppc64/libstdc++-v3,
contains only two files, namely config.cache (0kB) and config.log
(11kB). I don't think including such a big file is a good idea, so
I'll only paste lines that I think are relevant:

  $ ../../../../gcc-3.4.6/libstdc++-v3/configure
--with-multisubdir=ppc64 --with-multisrctop= --enable-multilib
--cache-file=./config.cache --host=powerpc-ibm-aix4.3.3.0 --build=powe
rpc-ibm-aix4.3.3.0 --enable-multilib --with-as=/usr/bin/as
--with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++
--prefix=/jd/aix-bin/gcc-3.4.6 --enable-threads --enable-share
d --enable-static
--with-gcc-version-trigger=/jd/src/gcc-build/gcc-3.4.6/gcc/version.c
--program-transform-name=s,y,y,
--srcdir=../../../gcc-3.4.6/libstdc++-v3 --with-target-subdir=p
owerpc-ibm-aix4.3.3.0 CPPFLAGS=-O2 -g -O2
build_alias=powerpc-ibm-aix4.3.3.0 host_alias=powerpc-ibm-aix4.3.3.0
-srcdir=../../../../gcc-3.4.6/libstdc++-v3


configure:2484: checking whether the C compiler works
configure:2490: ./a.out
Could not load program ./a.out:
Cannot run a 64-bit program on a 32-bit machine.
configure:2493: $? = 255
configure:2502: error: cannot run C compiled programs.

It seems obvious that in such case attempt at building 64-bit version
should be avoided - but it isn't.

What is the best way to solve this?

-- 
Jędrzej Dudkiewicz

I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.


More information about the Gcc-help mailing list