Hello,
My name is Marc SERRAU and I discovered the GNU Pascal Compiler few days ago. I installed it on my linux based PC from the binary package. (rpm) The installation worked well but I always become the following message after compiler even with a trivial Hello.pas program :
[marc@altair hisix]$ gpc hello.pas ld: cannot open -lgcc: Aucun fichier ou répertoire de ce type
The linker cannot find some stuff, but what ? The gcc compiler was installed from an RH 6.0 distrib. Who can help me ? Thank you for your effort.
Marc SERRAU Visit http://www.astrosurf.org/noctambule
Marc SERRAU Visitez http://www.astrosurf.org/noctambule In Linux we trust, more and more...
17-Dec-99 23:21 you wrote:
Hello,
My name is Marc SERRAU and I discovered the GNU Pascal Compiler few days ago. I installed it on my linux based PC from the binary package.
^^^^^^^^^^^^^^
(rpm) The installation worked well but I always become the following message after compiler even with a trivial Hello.pas program :
[marc@altair hisix]$ gpc hello.pas ld: cannot open -lgcc: Aucun fichier ou rц²pertoire de ce type
The linker cannot find some stuff, but what ?
Linker can not find gcc (NOT GPC!) library. GPC is based on GCC and usings standard GPC library.
The gcc compiler was installed from an RH 6.0 distrib.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here is your problem: GPC can not be used with different version of GCC. If it's compiled from sources against of GCC 2.8.1 you need GCC 2.8.1 to run the beast, if it's compiled against of EGCS 1.1.2 you need EGCS 1.1.2 and so on. Even minor changes (EGCS 1.1.1 => EGCS 1.1.2) will break harmony :-)
Who can help me ? Thank you for your effort.
Take look on what version of gcc compiler was used for gpc building (use `rpm -ql <packagename>' , then look -- in which directory backend is installed) and then install this version of gcc (at least backend). Or you can grab sources of gcc from RedHat's CD and rebuild GPC from sources.
Here is your problem: GPC can not be used with different version of GCC. If it's compiled from sources against of GCC 2.8.1 you need GCC 2.8.1 to run the beast, if it's compiled against of EGCS 1.1.2 you need EGCS 1.1.2 and so on. Even minor changes (EGCS 1.1.1 => EGCS 1.1.2) will break harmony :-)
That's lovely. So why not read from the current gcc what version it is and if they differ put up a BIG MESSAGE and abort?
It could be boxed like this to bring attention:
************************************************************ * Here is your problem: GPC can not be used with different * * version of GCC. If it's compiled from sources against * * GCC 2.8.1 you need GCC 2.8.1 to run the beast, if it's * * compiled against EGCS 1.1.2 you need EGCS 1.1.2 and so * * on. Even minor changes (EGCS 1.1.1 => EGCS 1.1.2) will * * break harmony :-) * ************************************************************
:-)
Tom
Dr. Thomas D. Schneider National Cancer Institute Laboratory of Experimental and Computational Biology Frederick, Maryland 21702-1201 toms@ncifcrf.gov permanent email: toms@alum.mit.edu http://www.lecb.ncifcrf.gov/~toms/
Hello, Marc, Victor, and everybody!
Khimenko Victor wrote:
Here is your problem: GPC can not be used with different version of GCC.
Well ... you have some additional work when using GPC with a non-matching version of GCC.
In this case it is `libgcc.a' that is not found. You can move or copy it from your GCC's directory
/usr/lib/gcc-lib/<platform>/<version>/
to a global one (such as /usr/local/lib/). After my humble experience, this doesn't harm. (But don't blame me if it does for you.;-)
Another workaround would be to copy or link the same file from GCC's directory above to GPC's one.
A correct solution is to supply the correct version of `libgcc.a' in the GPC distribution - or to package corresponding versions of GPC and GCC in the distribution. This is the distributor's home work.
Another correct solution is to ...
grab sources of gcc from RedHat's CD and rebuild GPC from sources.
Exactly.
Hope this helps,
Peter
Peter Gerwinski wrote:
In this case it is `libgcc.a' that is not found. You can move or copy it from your GCC's directory
/usr/lib/gcc-lib/<platform>/<version>/
to a global one (such as /usr/local/lib/). After my humble experience, this doesn't harm. (But don't blame me if it does for you.;-)
This works for my case too with :
cd /usr/local/lib ln -s /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/libgcc.a libgcc.a
Hope it will be the same for other pgm...
Another workaround would be to copy or link the same file from GCC's directory above to GPC's one.
A correct solution is to supply the correct version of `libgcc.a' in the GPC distribution - or to package corresponding versions of GPC and GCC in the distribution. This is the distributor's home work.
Sure it will be easier for gnu tools non-expert as me ...
Another correct solution is to ...
grab sources of gcc from RedHat's CD and rebuild GPC from sources.
Exactly.
I was doing that when your message arrive... I will try this too.
Hope this helps,
Yes and thank you for all helper !
This list is very dynamic !
Marc SERRAU Visitez http://www.astrosurf.org/noctambule In Linux we trust, more and more...
PS : My objective is to design a Linux driver for an astrnomical CCD camera. A part of the actual code is in BP...
19-Dec-99 22:22 you wrote:
Hello, Marc, Victor, and everybody!
Khimenko Victor wrote:
Here is your problem: GPC can not be used with different version of GCC.
Well ... you have some additional work when using GPC with a non-matching version of GCC.
In this case it is `libgcc.a' that is not found. You can move or copy it from your GCC's directory
/usr/lib/gcc-lib/<platform>/<version>/
to a global one (such as /usr/local/lib/). After my humble experience, this doesn't harm. (But don't blame me if it does for you.;-)
It will work for simple programs like "Hello, World!" (where libgcc is not needed anyway) just fine. But for more complex programs it'll create problems. libgcc.a is INTERNAL gcc library - there are internal functions to help compiler workaround processor limitations (functions like 64bit division). And functions interface can be changed from one gcc version to other. It's not used much for regular programs (linux kernel does not use libgcc at all and it's not a small program by any measureement :-) though.
Another workaround would be to copy or link the same file from GCC's directory above to GPC's one.
A correct solution is to supply the correct version of `libgcc.a' in the GPC distribution - or to package corresponding versions of GPC and GCC in the distribution. This is the distributor's home work.
Another correct solution is to ...
grab sources of gcc from RedHat's CD and rebuild GPC from sources.
Exactly.
Hello again.
Khimenko Victor wrote:
to a global one (such as /usr/local/lib/). After my humble experience, this doesn't harm. (But don't blame me if it does for you.;-)
It will work for simple programs like "Hello, World!" (where libgcc is not needed anyway) just fine. But for more complex programs it'll create problems. libgcc.a is INTERNAL gcc library - [...]
So you mean that different versions of `libgcc.a' are not compatible enough even between egcs-1.1.1 and egcs-1.1.2 to make this work in a stable way?
Well, then the creator of the GPC binary distribution _must_ supply a matching `libgcc.a'.
Peter
20-Dec-99 18:11 you wrote:
Hello again.
Khimenko Victor wrote:
to a global one (such as /usr/local/lib/). After my humble experience, this doesn't harm. (But don't blame me if it does for you.;-)
It will work for simple programs like "Hello, World!" (where libgcc is not needed anyway) just fine. But for more complex programs it'll create problems. libgcc.a is INTERNAL gcc library - [...]
So you mean that different versions of `libgcc.a' are not compatible enough even between egcs-1.1.1 and egcs-1.1.2 to make this work in a stable way?
It CAN be compatible but it's NOT tested (and since it's not used this way and not used much overral probability is VERY high to get silent damage and not notice it for very long time).
Well, then the creator of the GPC binary distribution _must_ supply a matching `libgcc.a'.
He just must add -- cut -- Require: gcc = 2.8.1 -- cut -- line in .spec file. Then rpm will just refuse to install gpc without corresponding gcc.