Help building gcc

David Kramer david at thekramers.net
Thu Aug 12 10:17:01 EDT 2004


So my first task at my new job is taking our AIX application and building
it under gcc (we use xlC now), in preparation for porting it to other UNIX
flavors.  Since nobody loves AIX anymore, there are no binaries for gcc
for AIX 5.2 anywhere on the net (well, I found gcc 2.96, but I mean
something less than 4 years old), and that means that my zeroth task is to
build the GNU toolchain on this box.  I already managed to torture
binutils into binary form (there were several.... questionable code
fragments I had to alter to get it to compile.  Very disappointing.), and
now I need to do gcc.

I've never compiled gcc before, and never dealt with any of the bison/yacc 
stuff, which is the first hangup.

After compiling for a while, it got up to gcc/intl/plural.c, where I got 
the message:

make[2]: Entering directory `/dkramer/dload/build/gcc/build/gcc/intl'
cc -c -DIN_GCC -DLOCALEDIR=\"/usr/local/share/locale\" 
-DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" 
-DLIBDIR=\"/usr/local/lib\" -DHAVE_CONFIG_H -I.. -I. 
-I../../../gcc-3.3.3/gcc/intl -I../../../gcc-3.3.3/gcc 
-I../../../gcc-3.3.3/gcc/config -I../../../gcc-3.3.3/gcc/../include  -g   
../../../gcc-3.3.3/gcc/intl/plural.c -o plural.o
"plural.y", line 264.1: 1506-343 (S) Redeclaration of __gettextlex differs 
from previous declaration on line 73 of "plural.y".
"plural.y", line 264.1: 1506-381 (I) The type "const unsigned char**" of 
parameter 2 in the prototype declaration is not compatible with the 
corresponding parameter type "unsigned char**" in the nonprototype 
declaration.
make[2]: *** [plural.o] Error 1
make[2]: Leaving directory `/dkramer/dload/build/gcc/build/gcc/intl'
make[1]: *** [intl.all] Error 1
make[1]: Leaving directory `/dkramer/dload/build/gcc/build/gcc'
make: *** [all-gcc] Error 2

I don't yet understand how the .y file gets turned into the .c file, but I 
will investigate that further myself.  But the two places in plural.y look 
fine to me.
(plural.c contains "#define yylex __gettextlex")

plural.y:73:
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));

plural.y:263: (reformatted to one line by me) 
static int yylex (lval, pexp) YYSTYPE *lval; const char **pexp; {...}

Again, I don't understand the yacc stuff, but it sure looks to me like the 
second parameter of both references are const.  What am I missing?

Thanks in advance for your help.


----------------------------------------------------------------------------
DDDD   David Kramer         david at thekramers.net       http://thekramers.net
DK KD  
DKK D  "I still say a church steeple with a lightening rod on
DK KD  top shows a lack of confidence." 
DDDD                                                           - Doug McLeod 



More information about the Discuss mailing list