According to Pedro Quaresma de Almeida:
I have installed GNU Pascal compiler, apparently without any problem.
bash# dpkg -i gpc_2.0-3.deb (Reading database ... 23654 files and directories currently installed.) Preparing to replace gpc (using gpc_2.0-3.deb) ... Unpacking replacement gpc ... Setting up gpc ...
bash# dpkg -i libgpc2_2.0-3.deb (Reading database ... 23654 files and directories currently installed.) Preparing to replace libgpc2 (using libgpc2_2.0-3.deb) ... Unpacking replacement libgpc2 ... Setting up libgpc2 ... bash# ldconfig
This looks like a Debian distribution. I didn't know that there exists a Debian distribution of gpc-2.0 ...
but when I try to use it ...
bash$ gpc Ackerman.p ld: cannot open -lgpc: No such file or directory bash$
Obviously, the `gpc' driver program cannot locate the library `libgpc.a'.
From the installation log I have the impression that you did not install
`libgpc.a' but a file named `libgpc2.a'. Perhaps both are the same, and it suffices to link `libgpc.a' to `libgpc2.a' in your `/usr/lib/' directory or whereever you keep your libraries?
In any case it should solve your problems (without warranty, of course ;-) to install an "original" binary distribution of gpc-2.0 like those on
ftp://kampi.hut.fi/jtv/gnu-pascal/binary/
We provide at binaries for i586-linux (elf), i586-linuxaout, and i586-linuxoldld. The "i586" means that some optimization have been done for the Pentium; the compiler runs fine on an i486 or 80386 and can produce code for all of these processors. To install such a binary package, cd to the top directory and "tar xzf" the archive, e.g.
myhost:/# tar xzf /usr/src/gpc-2.0.i586-linux.tar.gz
Good luck,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal - http://home.pages.de/~gnu-pascal/ [970125]
Peter Gerwinski ===============
This looks like a Debian distribution. I didn't know that there exists a Debian distribution of gpc-2.0 ...
Yes, it exists
Package: gpc Version: 2.0-3 Priority: optional Section: devel Maintainer: Christoph Lameter clameter@debian.org Depends: libc5,gcc (>=2.7.2.1-2), gcc (<< 2.7.2.2), libgpc2 Architecture: i386 Filename: unstable/binary-i386/devel/gpc_2.0-3.deb Size: 656684 MD5sum: 6ce6be46dfc3d28eadb3c84910e879b4 Description: GNU Pascal Compiler The GNU Pascal Compiler (GPC) is part of the GNU compiler family, GNU CC or GCC. Version 2.0 of GPC corresponds to GCC version 2.7.2.1. installed-size: 1523
Obviously, the `gpc' driver program cannot locate the library `libgpc.a'. From the installation log I have the impression that you did not install `libgpc.a' but a file named `libgpc2.a'. Perhaps both are the same, and it suffices to link `libgpc.a' to `libgpc2.a' in your `/usr/lib/' directory or whereever you keep your libraries?
The instalation does not provide any "libgpc.a", only "libgpc.so.2".
Can I use some switch (-static or ...) to use libgpc.so.2 instead of libgpc.a?
Thank you for your help.
Filename: unstable/binary-i386/devel/gpc_2.0-3.deb
^^^^^^^^ Thank you very much ;-)
Obviously, the `gpc' driver program cannot locate the library `libgpc.a'. From the installation log I have the impression that you did not install `libgpc.a' but a file named `libgpc2.a'. Perhaps both are the same, and it suffices to link `libgpc.a' to `libgpc2.a' in your `/usr/lib/' directory or whereever you keep your libraries?
The instalation does not provide any "libgpc.a", only "libgpc.so.2".
Did you symlink libgpc.so -> libgpc.so.2 (or whatever the exact libname is) ?
I played with a shared RTS library in some pre-2.0 beta's but decided not to put it in the 2.0 release because it would require libgpc.so to be distributed with all GPC compiled programs and I feared confusion. Assuming you don't have one of these beta's (they had 96XXXX version numbers), my guess is that the Debian maintainer clameter@debian.org decided to put this feature back in. Maybe you should ask him.
Can I use some switch (-static or ...) to use libgpc.so.2 instead of libgpc.a?
No, -static would search for a (nonexisting) libgpc.a
If all else fails, you may have to link /usr/lib/gcc-lib/i386-linux/2.7.2.1/libgpc.a -> /usr/lib/libgpc.so.2, but that's very cruel :-(
Thank you for your help.
Happy hacking,
JanJaap
Jan-Jaap van der Heijden ========================
Did you symlink libgpc.so -> libgpc.so.2 (or whatever the exact libname is) ?
No I did not, because de instalation did the following symlink
libgpc.so.2 -> libgpc.so.2.8 (the actual lib).
But...
The symlink libgpc.so -> libgpc.so.2 it is the correct setting.
Now all is working well.
Thank you again for your help.