I'm having some issues in getting gpc compiled following the directions at http://www.gnu-pascal.de/gpc_42.html#SEC42
Here is what I have done and the results I'm getting.
1st attempt used gcc-core-3.2.1.tar.gz & gpc-20021128.tar.gz
followed the directions from the above page and everything compiled as expeced. I read the README in the test directory and it indicated to run make in the test dir or make check in the p dir. I did the make check in the p dir. During the test gpc would get Internal compiler errors on every test which meant that all tests failed. NOTE: The this was done prior to runing make install.
Here is one of the error messages I got just so you know the exact output.
TEST aturbo3test.pas: /home/src/gcc-3.2.1/gcc/p/test/../units/system.pas: In function `Memavail': /home/src/gcc-3.2.1/gcc/p/test/../units/system.pas:827: Internal compiler error in gen_tagged_type_instantiation_die, at dwarf2out.c:11247 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions. gpc1: /home/src/gpc-build/gcc/xgpc exited with status 1 gpc1: /home/src/gpc-build/gcc/xgpc exited with status 1 failed
After this failed I decided to install the full gpc sources that my distribution uses ( gentoo by the way ). the source used is gpc-3.2.1 with some patches applied: gcc-3.2.1-branch-update-20021208.patch gcc-3.2.1-bug-url.patch gcc32-ada-make.patch gcc32-shared-pthread.patch gcc32-testsuite.patch gcc32-tls-reload-fix.patch (NOTE: I can supply these to any one that wants them. most of them are really small except the branch-update patch wich is about 1M when compressed with bzip2 )
When I ran configure on this one I had one gpc patch fail to apply. It was the bug url patch as the above gentoo patch had changed the url to a gentoo url verses the gnu url so I fixed the gpc patch to reflect the change and got a clean gpc patch.
Now on to running make.
When Make ran I got this error which I have been unable to track down as from what I can see it looks OK.
In file included from /var/tmp/portage/gcc-3.2.1-r6/work/gcc-3.2.1/gcc/p/gpc-common.c:27: /var/tmp/portage/gcc-3.2.1-r6/work/gcc-3.2.1/gcc/p/gpc.h:667: conflicting types for `global_trees' /var/tmp/portage/gcc-3.2.1-r6/work/gcc-3.2.1/gcc/tree.h:1956: previous declaration of `global_trees' make[1]: *** [p/gpc-common.o] Error 1
Line 667 in gpc.h extern tree size_type_node;
Line 1956 in tree.h extern tree global_trees[TI_MAX];
tree.h line 1998 #define size_type_node global_trees[TI_SIZE_TYPE]
TI_MAX & TI_SIZE_TYPE are part of a enum where TI_MAX is the last item and TI_SIZE_TYPE is last part of the enum. I've greped the sources for gcc and gpc and can't seem to find where tree is defined to see what is going on.
If anyone could point me where to look to solve this I would appreciate it.
In the mean time I'm going to give another go at doing it from the clean gcc sources. but this time I'm going to get the full sources.
Thanks Richard