On Tue, Jul 05, 2005 at 10:53:40AM +0200, Silvio a Beccara wrote:
Good morning,
I installed the gpc with gcc binary on a Linux machine (file gpc-2.1-with-gcc.i686-pc-linux-gnu.tar.gz), executed install-gpc-binary, updated ~/.bashrc with GPC_EXEC_PREFIX, but when I try to execute gpc, I get the following error:
gpc: /lib/i686/libc.so.6: version `GLIBC_2.3' not found (required by gpc)
So I put the library libc-2.3.3.so in the directory /home/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2 and updated the library path, putting in ~/.bashrc the following line:
LIBRARY_PATH=$LIBRARY_PATH:/clx/userunivts/utsts007/silvio/src.dev3.old/old/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2
but the error does not go away. On another machine, it goes like a breeze. Does anybody have a solution?
Thanks in advance, best regards
Silvio a Beccara Trieste - Italy
As Mirsad pointed out, the dynamic linker looks at LD_LIBRARY_PATH, not LIBRARY_PATH. There are, however, more things which can go wrong:
- The gpc binary is not likely to be linked to the specific version "libc-2.3.3.so", more probably it is "libc.so.6". You can find the expected name of the library with "ldd `which gpc`", and then set up the corresponding symlink in /home/usr/..../2.95.2/
- When you do that, it is no longer advisable to export LD_LIBRARY_PATH from .bashrc, as other programs would also get linked to the new version of the library. You need a wrapper script for gpc.
- libc needs various files at run time (e.g., locale and termcap database). If you just copy libc-2.3.3.so from another system, there is no guarantee that it will be able to use correctly the files supplied with the original system libc.
IMHO it is safer to compile gpc yourself than dealing with this mess.
Emil Jerabek