Hi all, hi Peter,
I was wondering whether it is just me or a known (and maybe even fixed?) problem: I just finished installing emx09b on my machine to be able to run things like the latest gnuplot beta and all that stuff that gave me warnings about having to use emx09b. So, all seemed well. In fact, even g77 worked, it still does after I have installed the version that had been recompiled with emx09b.
GPC doesn't like me anymore, though. It compiles, but linking doesn't seem to work, I get stuff like:
rts-file.c:221 (e:/bin/emx/lib/gpc.a(rts-file.o)): Undefined symbol _write refer enced from text segment
and lots of it. I then fetched a later version from ftp.uni-augsburg.de since I can't seem to get through to kampi.hut.fi tonight, and installed it: Still the same problem. I understand that emxgpc was compiled (or patched) for 2.6.3, but I was wondering whether there is any hope on the horizon for a transparent gpc under emx?
Interesting enough, gpc --version reports %PROG2%, so this may serve as version indication: rwxa-- 161799 Dec 13 00:39 e:/bin/emx/bin/gpc.exe*
but more interesting (and temporary relief!) is, that gpc -c test.pas gcc test.o -lgpc
does produce a working executable. Any ideas, pointers, promises are most welcome! Cheers! Stefan
Hi, all, hi Stefan!
GPC doesn't like me anymore, though. It compiles, but linking doesn't seem to work, I get stuff like: rts-file.c:221 (e:/bin/emx/lib/gpc.a(rts-file.o)): Undefined symbol _write refer enced from text segment and lots of it.
I think I know this error ...
I would guess that this comes from the fact that GPC does not only need the gpclib.a library but also gcclib.a. With Linux, I remember a similar problem arising from the installation of a new GCC-2.7.x C compiler and a conflict between a.out and elf versions of the libgcc.a library. We have solved it by installing a version of libgcc.a from GCC-2.6.3 in the lib path.
Interesting enough, gpc --version reports %PROG2%, so this may serve as version indication: rwxa-- 161799 Dec 13 00:39 e:/bin/emx/bin/gpc.exe*
I get the same version %PROG2%. Strange. I will have to look for this error, too, but it seems to be an independend one.
but more interesting (and temporary relief!) is, that gpc -c test.pas gcc test.o -lgpc does produce a working executable.
Again: strange. I have one idea: Perhaps your version of gcc can produce a.out as well as elf output files, and gcc knows the option to tell the linker the difference, while gpc doesn't. Well, try to install the old C compiler; if this solves the problem I think we know the origin of the error.
In case you only changed the EMX version and did not touch the C compiler, we are *really* in trouble.
I think all these problems will disappear as soon as we will have a 2.7.x version of GPC. (But this is not my job. :-) Another suggestion would be to make GPC independend of the C runtime library, but include the required stuff into gpclib.a.
See you,
Peter
-------------------------------------------------------------------------------- Dipl. Phys. Peter Gerwinski Fachbereich Physik Universitaet-GH Essen Phone: +49-201-183-2763 D-45117 Essen Fax: +49-201-183-2120 Germany e-mail: pege@mail.theo-phys.uni-essen.de --------------------------------------------------------------------------------
Hi, all, hi Peter!
GPC doesn't like me anymore, though. It compiles, but linking doesn't seem to work, I get stuff like: rts-file.c:221 (e:/bin/emx/lib/gpc.a(rts-file.o)): Undefined symbol _write refer enced from text segment and lots of it.
I think I know this error ...
I would guess that this comes from the fact that GPC does not only need the gpclib.a library but also gcclib.a. With Linux, I remember a similar problem arising from the installation of a new GCC-2.7.x C compiler and a conflict between a.out and elf versions of the libgcc.a library. We have solved it by installing a version of libgcc.a from GCC-2.6.3 in the lib path.
I don't find it (libgcc.a). the closest I find is gcc.lib on my gcc 2.6.3 setup at work. I am not at home right now, so I can't check.
but more interesting (and temporary relief!) is, that gpc -c test.pas gcc test.o -lgpc does produce a working executable.
Again: strange. I have one idea: Perhaps your version of gcc can produce a.out as well as elf output files, and gcc knows the option to tell the linker the difference, while gpc doesn't. Well, try to install the old C compiler; if this solves the problem I think we know the origin of the error.
Well, I have indeed had success with gcc 2.6.3, but not with 2.7.2 anymore. Being completely stupid I didn't just upgrade emx rts from 09a to 09b but did the wole works (2.6.3 -> 2.7.2) assuming that's a VERY GOOD THING. Maybe it wasn't. I'll restore my 2.6.3 and just put in the nwe emxrts tonight. Or, maybe I live with the separate link step until a 2.7.2 version is out?
I think all these problems will disappear as soon as we will have a 2.7.x version of GPC. (But this is not my job. :-) Another suggestion would be to make GPC independend of the C runtime library, but include the required stuff into gpclib.a.
Is this how g77 does it with f2c.lib?
Oh -- by the way: What's the reasone for gpc/emx being >= 3 MB as opposed to 1.7 or so it was before? Is it the turbo stuff, or is it debug info that one could safely strip out? Cheers! Stefan (also Dipl. Phys.)
PS: A last one: I see mail to gpc@hut.fi bouncing all the time. You too?