This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Re: [LRP] Help! Compiling for glibc-2.0.7 under redhat-6.0 (libc-2.1.1)
- To: glibc-linux@ricardo.ecn.wfu.edu
- Subject: Re: [LRP] Help! Compiling for glibc-2.0.7 under redhat-6.0 (libc-2.1.1)
- From: Gaël Quéri <gael@baoule.dyndns.org>
- Date: Mon, 21 Jun 1999 19:36:52 +0200 (CEST)
- cc: noel@burton-krahn.com, linux-router@linuxrouter.org
- Reply-To: glibc-linux@ricardo.ecn.wfu.edu
Don't use LD_LIBRARY_PATH to change the libc...
The dynamic linker is not compatible.
Instead you have to use rpath-link to tell ld where to find the old ld.so
for example
gcc -B/usr/i586-pc-linux-gnulibc2.0/lib/ -nostdinc -I `gcc
--print-file-name=include` -I/usr/i586-pc-linux-gnulibc2.0/include
-Wl,-rpath-link,/usr/i586-pc-linux-gnulibc2.0/lib ...
assuming the libc 2.0 is in /usr/i586-pc-linux-gnulibc2.0
On Mon, 21 Jun 1999, Dirk Nuyens wrote:
> Hi,
>
> For dynamic resolving against another library then installed you should
> do (for BASH):
> $ export LD_LIBRARY_PATH=/path/to/other/libraries:$LD_LIBRARY_PATH
> you can then test with 'ldd' if your system finds the libraries you want
> it to use
>
> For compiling against those other libraries you need the headers for
> those libraries installed somewhere.
> I am not sure, but I guess you could specify this in a spec file or (and
> here I am sure of) you can specify to not use the standard include files
> but only the directories you list with -I*, herefor you need to give the
> '-nostdinc' (no standard includes) and the '-nostdlib' (no standard
> libraries), for the libraries you specify -L* ofcourse....
>
> cu
>
> dirk
>
> Noel Burton-Krahn wrote:
>
> > Hi,
> >
> > I am trying to compile programs to run under linux-router 2.9.4, which
> > uses glibc-2.0.7. Unfortunately, my development machine runs
> > redhat-6.0 which uses glibc-2.1.1. The two glibc's don't seem to like
> > each other. Programs that I compile under glibc-2.1.1 either die or
> > croak 'undefined symbol: _dl_global_scope_end' under glibc-2.0.7.
> >
> > Is there some magic combination of LD_LIBRARY_PATH and gcc flags which
> > will allow me to link against glibc-2.0.7?
> >