Hello All



Yesterday I started a fresh (brand new) compile of GCC 3.4.6 on AIX
5.2.



PATH on the machine looks like this

/usr/binutils-2.17/bin:/opt/freeware/bin:/opt/freeware/lib:/usr/bin:/etc:/usr/sbin:/usr/perforce:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5/jre/bin:/usr/java5/bin



I also downloaded libstdc++-devel 4.0.0 (5.2) from
http://www-03.ibm.com/servers/aix/pr.../download.html
and did the default installation.



My GCC install script looks like this

#!/bin/sh
#
# configures and makes gcc
gccversion=3.4.6
blddir=gcc-build

rm -rf $blddir
mkdir $blddir
cd $blddir

# make sure default flags haven't been modified
unset CFLAGS
unset CXXFLAGS
export MAKEFLAGS=''

# put gnu tools on the path
PATH=/opt/freeware/bin:$PATH
export PATH

echo "building gcc $gccversion..." | tee -a ../build.log
date >> ../build.log

# configure
.../gcc-${gccversion}/configure \
--prefix=/opt/gcc-${gccversion} \
--enable-languages=c,c++ \
--with-pic \
--disable-shared \
--disable-nls \
--with-gnu-ld \
--with-ld=/opt/binutils-2.17/bin/ld \
--with-gnu-as \
--with-as=/opt/binutils-2.17/bin/as \
--enable-threads=posix 2>&1 | tee -a ../build.log

gmake bootstrap 2>&1 | tee -a ../build.log





After couple of hours of compilation I get the following error



`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/pthread/libstdc++-v3'

: gmake ; exec true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc"
"CC_FOR_TARGET=/usr/sys/inst.images/gcc-3.4.6/gcc-build/gcc/xgcc
-B/usr/sys/inst.images/gcc-3.4.6/gcc-build/gcc/
-B/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/bin/
-B/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/lib/ -isystem
/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/include -isystem
/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/sys-include" "CFLAGS=-O2 -g -O2
-pthread" "CXXFLAGS=-g -O2 -pthread" "CFLAGS_FOR_BUILD="
"CFLAGS_FOR_TARGET=-O2 -g -O2" "INSTALL=/opt/freeware/bin/install -c"
"INSTALL_DATA=/opt/freeware/bin/install -c -m 644"
"INSTALL_PROGRAM=/opt/freeware/bin/install -c"
"INSTALL_SCRIPT=/opt/freeware/bin/install -c" "LDFLAGS=-pthread"
"LIBCFLAGS=-O2 -g -O2 -pthread" "LIBCFLAGS_FOR_TARGET=-O2 -g -O2"
"MAKE=gmake" "MAKEINFO=/usr/sys/inst.images/gcc-3.4.6/gcc-3.4.6/missing
makeinfo --split-size=5000000 --split-size=5000000 " "PICFLAG="
"PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS="
"exec_prefix=/opt/gcc-3.4.6" "infodir=/opt/gcc-3.4.6/info"
"libdir=/opt/gcc-3.4.6/lib" "includedir=/opt/gcc-3.4.6/include"
"prefix=/opt/gcc-3.4.6" "tooldir=/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0"
"gxx_include_dir=/opt/gcc-3.4.6/include/c++/3.4.6" "AR=ar -X32_64"
"AS=as" "LD=ld" "LIBCFLAGS=-O2 -g -O2 -pthread" "PICFLAG="
"RANLIB=ranlib" "NM=nm -B -X32_64" "NM_FOR_BUILD=" "NM_FOR_TARGET=nm -B
-X32_64" "DESTDIR=" "WERROR=" DO=all multi-do

Making all in include

gmake[7]: Entering directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/pthread/libstdc++-v3/include'

gmake[7]: Nothing to be done for `all'.

gmake[7]: Leaving directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/pthread/libstdc++-v3/include'

Making all in libmath

gmake[7]: Entering directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/pthread/libstdc++-v3/libmath'

/bin/sh ../libtool --tag CC --mode=compile
/usr/sys/inst.images/gcc-3.4.6/gcc-build/gcc/xgcc
-B/usr/sys/inst.images/gcc-3.4.6/gcc-build/gcc/
-B/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/bin/
-B/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/lib/ -isystem
/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/include -isystem
/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/sys-include -pthread
-DHAVE_CONFIG_H -I. -I../../../../../gcc-3.4.6/libstdc++-v3/libmath
-I.. -O2 -g -O2 -O2 -g -O2 -pthread -c -o stubs.lo
.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c

/usr/sys/inst.images/gcc-3.4.6/gcc-build/gcc/xgcc
-B/usr/sys/inst.images/gcc-3.4.6/gcc-build/gcc/
-B/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/bin/
-B/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/lib/ -isystem
/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/include -isystem
/opt/gcc-3.4.6/powerpc-ibm-aix5.2.0.0/sys-include -pthread
-DHAVE_CONFIG_H -I. -I../../../../../gcc-3.4.6/libstdc++-v3/libmath
-I.. -O2 -g -O2 -O2 -g -O2 -pthread -c
.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c -DPIC -o
stubs.o

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:47: error: syntax
error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:47: error: syntax
error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:64: error: syntax
error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:64: error: syntax
error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:81: error: syntax
error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:81: error: syntax
error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:98: error: syntax
error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:98: error:
`atan2' declared as function returning a function

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:98: error:
conflicting types for 'atan2'

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:98: error:
conflicting types for 'atan2'

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:98: error: syntax
error before "double"

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:115: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:115: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:132: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:132: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:149: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:149: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:166: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:166: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:183: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:183: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:200: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:200: error:
`fmod' declared as function returning a function

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:200: error:
conflicting types for 'fmod'

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:200: error:
conflicting types for 'fmod'

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:200: error:
syntax error before "double"

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:234: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:234: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:268: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:268: error:
`hypot' declared as function returning a function

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:268: error:
conflicting types for 'hypot'

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:268: error:
conflicting types for 'hypot'

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:268: error:
syntax error before "double"

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:307: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:307: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:324: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:324: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:366: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:366: error: `pow'
declared as function returning a function

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:366: error:
conflicting types for 'pow'

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:366: error:
conflicting types for 'pow'

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:366: error:
syntax error before "double"

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:383: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:383: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:400: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:400: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:417: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:417: error:
syntax error before ')' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:434: error:
syntax error before '(' token

.../../../../../gcc-3.4.6/libstdc++-v3/libmath/stubs.c:434: error:
syntax error before ')' token

gmake[7]: *** [stubs.lo] Error 1

gmake[7]: Leaving directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/pthread/libstdc++-v3/libmath'

gmake[6]: *** [all-recursive] Error 1

gmake[6]: Leaving directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/pthread/libstdc++-v3'

gmake[5]: *** [all] Error 2

gmake[5]: Leaving directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/pthread/libstdc++-v3'

gmake[4]: *** [multi-do] Error 1

gmake[4]: Leaving directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/libstdc++-v3'

gmake[3]: *** [all-multi] Error 2

gmake[3]: Leaving directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/libstdc++-v3'

gmake[2]: *** [all] Error 2

gmake[2]: Leaving directory
`/usr/sys/inst.images/gcc-3.4.6/gcc-build/powerpc-ibm-aix5.2.0.0/libstdc++-v3'

gmake[1]: *** [all-target-libstdc++-v3] Error 2

gmake[1]: Leaving directory `/usr/sys/inst.images/gcc-3.4.6/gcc-build'

gmake: *** [bootstrap] Error 2



Can you please tell me what do I need to fix this error?



Your help would be greatly appreciated.



Thanks

Abid