-----Original Message----- From: Frank Heckenbach frank@g-n-u.de To: ioffe_nick@mail.ru, gpc@gnu.de Date: Thu, 24 Jul 2003 18:22:36 +0200 Subject: Re: Linking the libgpc to be shared
Nick Ioffe wrote:
But libgpc installed as static despite WITH_SHARED=yes option. After checking p/rts/Makefile I've pointed out that in that file WITH_SHARED= i.e. is just empty.
You've got to pass this to the make in gcc or gcc/p/rts. The toplevel make doesn't know about it.
After fixing it and making inside the rts I've got the following: nm: libgpc.so.2.1.20030509 not found.
It was because of -Wl,-soname=libgpc.`cat ...` option specified to xgcc on the linking step.
This option might be system-dependent. I've only tested this on Linux so far.
Eliminating it didn't help, now I got another error: LD: DP relative code in file /var/tmp/xxx.o - shared library ...
Adding the -fPIC option used in building the *.lo files to linking command helped.
OK, I'll add that.
Now the question - why configure doesn't do all these things?
Because nobody has implemented it. If you like to do it ...
However, it may be better to wait until support for older gcc versions has dropped (because you don't have to support the different directory structures then) or even until gpc is integraated in gcc (because the directory structure will change again, and rts won't be a subdirectory of p then). Perhaps then the gcc Makefiles will take care of it all, and we don't need extra work ...
Also before that I got some strange errors when configure erroneusly created rts-config.h file - it didn't found open64 and usleep functions in /usr/local/include/fcntl.h - it was discovered by compiler.
What exactly was set? HAVE_OPEN64 and/or OPEN64_DECLARED?
Frank
-- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707
1. The OPEN64_DECLARED. ---------------------- Also I've discovered some syntax changes that cause me some hardwork in fixing the project: 1. one import and then list of all modules delimited by ';' more than one import like import try; import gpc; doesn't work. 2. repeated routine declaration - now I have to get rid of all the parameters in implementation part - otherwise I get "routine declaration doesn't match previous declaration" error
Is there any way of keeping the sources untouched and still to compile it with 20030507?
Thank you, Nick