Brian Desmond wrote:
I have been trying to use gpc on a DEC Alpha Personal Workstation 600au. gcc 2.8.1 was previously installed, and is not being rebuilt with the pascal binary. From my reading of the docs, this *SHOULD* be OK.
The C compiler does not have to be rebuilt. However, the GCC sources are patched while making GPC, and parts of them are recompiled. I suppose you did so, otherwise you wouldn't have got so far.
gpc builds and installs OK, compilation of the demos appears fine, but I get the following message when running the built programs:
bash> gpc --automake -Wall demoproc.pas -o demoproc bash> ./demoproc internal error: duplicate constructor bash>
That's interesting. I got this message when playing with a dynamically linked RTS (run time system). Apparently, the way linking works on your platform makes it occur with static linking as well. (BTW, the fact that noone else has noticed this problem doesn't mean it doesn't exist for others. The units, which cause the problem, are relatively new, and it might be that noone has tried to use them or to compile the demo programs on the Alpha before.)
Anyway, this error is nothing serious. It was meant as a sanity check for something else long time ago, so in fact it's safe now to remove this error message. A patch (which will also be in the next release) is appended below.
I have tried installing the prebuilt binary, but it seems to require that gcc is installed into the same tree, which it isn't on our system, and so attempts to compile fail.
Yes, the automake expects this. We've thought about this problem, so probably some future versions will accept any GCC installed somewhere. For now, if you really need it, you can try symlinking cc1 and cpp from the installed GCC to the GPC directory (<prefix>/lib/gcc-lib/<platform>/<version>). Of course, that's a bit of a kludge...
Frank
*** misc.c.orig Mon Apr 19 21:13:52 1999 --- misc.c Fri Mar 26 04:37:18 1999 *************** *** 71,78 **** --- 71,86 ---- { if (fun == scan->fun) { + /* dynamic RTS linking currently can produce a duplicate + constructor of gpc.pas -- it doesn't hurt much since the + constructor does nothing, and the object file it's in is + empty otherwise (19990307) */ + #if 1 + return; + #else fputs ("internal error: duplicate constructor\n", stderr); _exit (-1); + #endif }
if (scan->run_id > run_id || !scan->next)