prasad svr wrote:
I am tring to compile GPC-20041218 on solaris 10 Intel Platform using gcc-3.3.3.While compiling Iam getting an error like bellow.
/usr/local/bin/gcc-3.3.3 -o p/declarations.o -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -I. -Ip -I/home/prasad/gcc-install/gcc-3.3.3/gcc -I/home/prasad/gcc-install/gcc-3.3.3/gcc/p -I/home/prasad/gcc-install/gcc-3.3.3/gcc/config -I/home/prasad/gcc-install/gcc-3.3.3/gcc/../include -DGPC -I/home/prasad/gcc-install/gcc-3.3.3/gcc/p /home/prasad/gcc-install/gcc-3.3.3/gcc/p/declarations.c /home/prasad/gcc-install/gcc-3.3.3/gcc/p/declarations.c: In function `init_decl_processing': /home/prasad/gcc-install/gcc-3.3.3/gcc/p/declarations.c:1469: error: `set_word_size' undeclared (first use in this function) /home/prasad/gcc-install/gcc-3.3.3/gcc/p/declarations.c:1469: error: (Each undeclared identifier is reported only once /home/prasad/gcc-install/gcc-3.3.3/gcc/p/declarations.c:1469: error: for each function it appears in.) /home/prasad/gcc-install/gcc-3.3.3/gcc/p/declarations.c:1470: error: `set_words_big_endian' undeclared (first use in this function) make[1]: *** [p/declarations.o] Error 1 make[1]: Leaving directory `/home/prasad/gcc-install/gpc-build/gcc' make: *** [all-gcc] Error 2
Did you follow instructions in:
http://www.gnu-pascal.de/gpc/Compiling-GPC.html
In particular, the configure script should have patched the gcc sources (it should have asked you for permission to patch the sources, unless you have patched them earlier). And of coures you need the `patch' program.
To check that the gcc sources look at the file `tree.h' in the gcc source directory (`/home/prasad/gcc-install/gcc-3.3.3/gcc' in your case). This file should have the line:
/* @@ PATCHED FOR GPC @@ */
near the beginning. Also `set_word_size' should be defined near line 2600 in this file. You may search for:
extern unsigned int set_word_size;
if `tree.h' does not contain this line it was not patched correctly.
If `tree.h' was not patched correctly you should probably start again from the very begining. Look carefully at messages generated by configure script. After running configure check if `tree.h' is now patched.
You may also apply the patch by hand. Just cd to the gcc source direstory and type:
patch -p1 < p/diffs/gcc-3.3.3.diff
The patch program may complain that line numbers in the patch does not exactly match, that is normal. But if you get any rejects (.rej files) you have a problem.