Re: glibc versions


Subject: Re: glibc versions
tcv@ninjatech.cjb.net
Date: Tue Aug 19 2003 - 17:34:08 AKDT


>
> On Tue, Aug 19, 2003 at 03:40:32AM -0600, tcv@ninjatech.cjb.net <tcv@ninjatech.cjb.net> wrote:
> >
> > > What kind of thing is GLIBC_2.2.3? Symbol? Tag? Label? What's it
> > > called?
> > >
> > > Second, what provides it? It can't be libc itself, obviously. Does
> > > ld-linux.so.2 provide that kind of thing? Or is it something else?
> >
> > I believe your ld.so.cache file is just out of wack. You should be able
> > to fix this by running "ldconfig"
>
> No, it's more complicated than that. I've gone around and around trying
> to get things set up the way I want, and I've rendered my computer unusable
> twice.
>
> My system started out as Slackware 7.0, with glibc 2.1.2 (since upgraded
> to 2.1.3). My system is now so old that certain binaries I want to run
> (mozilla/firebird, nvidia driver installer, others) won't work -- they want
> glibc 2.2.
>
> So what I want to do is make glibc 2.2 available for the binaries that
> need it, and keep 2.1.3 as my main system libc. What I've done this time
> is compile and install 2.2.5 in a seperate directory, but I can't get
> the executables to use it.
>
> If I use my main (2.1.3) ld-linux.so.2, I get the error above. If I use
> the new one (2.2.5), it insists on using the 2.2.5 directory, even though
> it's NOT in /etc/ld.so.conf, and everything breaks (ls, rm, etc).
>
> So you can see why I carefully targeted my question. I've been trying to
> solve this myself, but there just isn't sufficient glibc documentation
> out there.
>
> --
> Bryan Medsker
> bryan@ak.net
>

OK. Let me *try* to make a bit more sense of it. Forgive me if I mention material you are already familiar with.

Alot of people get caught up by the endless versions of C libraries on Linux systems.
libc-4 - a.out libc was first and not needed any longer
libc-5 - the first ELF libc and
libc-6 - aka "GNU libc" aka "glibc".
 
When you install newer (or older) C libraries you have to be a bit carefull that you don't overwrite files or links to your primary libc
For that I usually run "ldconfig -v" so I can see exactly where all my libraries are residing and their respective symlinks as well.

ldconfig tries to make some method to the madness by writing a file that
Makefiles and configure scripts look to to see where your libraries are.
/etc/ld.so.conf.

In the event this doesnt work ( it probably didn't) edit the file yourself and add the path to 2.2.5.

The order of the paths there is vital if you install more libraries. glibc should be mentioned before anything else. And - that means you keep glibc in /usr/lib and if you install other versions, keep them in other directories, mentioned later in the config file.

Heres a copy of my /etc/ld.so.conf:

/usr/local/lib
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3
/usr/lib/opengl/nvidia/lib
/usr/lib/mozilla
/usr/X11R6/lib
/opt/blackdown-jdk-1.4.1/jre/lib/i386/
/opt/blackdown-jdk-1.4.1/jre/lib/i386/native_threads/
/opt/blackdown-jdk-1.4.1/jre/lib/i386/classic/
/usr/qt/3/lib
/usr/kde/3.1/lib

so , below /usr/local/lib add the entry "/path/to/new/libc"
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Tue Aug 19 2003 - 17:34:16 AKDT