This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Re: installing glibc-2.1 as normal user
- To: Kasper Peeters <K.Peeters@damtp.cam.ac.uk>
- Subject: Re: installing glibc-2.1 as normal user
- From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
- Date: 17 Jun 1999 20:54:55 +0200
- Cc: glibc-linux@ricardo.ecn.wfu.edu
- References: <14185.12436.20035.334535@hopf.amtp.cam.ac.uk>
- Reply-To: glibc-linux@ricardo.ecn.wfu.edu
>>>>> Kasper Peeters writes:
> I am trying to install glibc-2.1 on a glibc-2.0 based machine as a
> normal user (I am not root on this machine and the sysadmins do not
> want modern stuff).
> This, apparently, leads to a problem. Even though glibc-2.1 can be
> used to run glibc-2.0, it seems that you _have_ to use the 2.1 dynamic
> loader ld-2.1.so. That is fine if I just want to run a binary, since I
> can just do
> ~/lib/ld-2.1.so [programname]
> and it will work. But it is annoying, and it also means that I cannot
> use scripts which are started through `#!/bin/...' since
> ~/lib/ld-2.1.so [script]
> then has to be run as
> ~/lib/ld-2.1.so [interpreter] [script]
> (the dynamic loader does not like scripts) and I have to figure out
> the name of the interpreter myself by peeking at the script.
> I guess I'm asking for the impossible here, but is there a way to
> separate the _dl_* stuff in ld-2.1.so into a separate library such
> that I can use the glibc-2.0 dynamic loader with the 2.1 libraries?
> Or any other smart trick that makes the kernel use my glibc-2.1
> dynamic loader instead of the /lib/ld-linux-2.so one?
You can't mix dynamic linker and libc from different versions - no
chance.
You can compile against a locally installed (here with
--prefix=/usr/glibc/glibc-2.1) glibc with e.g.:
#!/bin/sh
gcc $* \
-L /usr/glibc/glibc-2.1/lib -I /usr/glibc/glibc-2.1/include \
-Wl,--rpath=/usr/glibc/glibc-2.1/lib \
-Wl,--dynamic-linker=/usr/glibc/glibc-2.1/lib/ld-linux.so.2 \
-g
Since you mentioned rpath and dynamic linker, the binaries will run
without any additional setup (no need for LD_LIBRARY_PATH!).
Andreas
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de