[lug] Compatibility between glibc-2.1 and glibc-2.2

D. Stimits stimits at idcomm.com
Thu Dec 6 15:28:49 MST 2001


"Harris, James" wrote:
> 
> Hi everybody!
> 
> I'm getting confused with the recent RedHat updates on RH 7.0 bringing
> glibc-2.1 up to glibc-2.2.  We have a box that we've patched completely, but
> our third party application was apparently linked against 2.1 and won't
> install now that we have 2.2.4 on the system.
> 
> Looking at the install script, we can easily fool the installer to work, but
> the BIG question is: will be application be unstable running with 2.2 when
> it was originally built on 2.1?  We've sent this question out to the vendor,
> but anticipate that it may take them some time to respond, and I figure you
> guys might know whether the glibc libraries themselves are compatible.  I've
> tried going to the glibc web page but can't find any compatibility
> information out there.
> 
> Does anyone here know?... Or are there any good sites out there that address
> this type of compatibility issue?
> 
> Thanks as always!
> 
> James Harris
> Systems Administrator
> Network Operating Systems Group
> EDS @ Maxtor Corporation
> 303.702.3853
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug

I can't give you an answer, but maybe some help. Version specifications
for glibc-2.1, 2.2 indicate the same major version, and different minor
version. Possibly some new functionality is added between 2.1 and 2.2,
but not interface changes (at least that is the *theory*, it doesn't
always work that way). When looking at 2.2 compared to 2.2.4, the .4
should indicate something more along the lines of  patch level for bug
fixes, but if it really means just that, I can't guarantee. They
*should* all work, though newer ones might have some different behavior
(presumably good behavior). Some applications might be able to use those
libs without problems, but others might need to be recompiled (to
relink). It probably "just depends", where most will work with the newer
lib, as long as it is still a 2.2.x (maybe even 2.2+.x). I doubt you'll
really know until you try it.

But, there is a trick you can use that might help. The LD_PRELOAD
environment variable allows you to name a lib that will be loaded before
any others; if others provide the same functionality, the others will be
ignored. Should you make this part of system startup and it fails,
you'll have an unusable system, so never use this in a system config
unless you have to. Anyway, if you take the 2.2.4, and install it to a
NEW or alternate location, and do NOT in any way remove or alter the old
one, the system will not use the new one by default. You can then
manually do a set of the environment variable LD_PRELOAD to point at the
lib file, and run your applications from that command prompt. Those apps
will use the 2.2.4 version, and you can test them and find out. If you
run "man ld.so", you will find more interesting things you can do; be
forewarned, never use /etc/ld.so.preload, it is an effective
denial-of-service if you name a non-existing or broken file. Environment
variables via shell are the way to test these things.

D. Stimits, stimits at idcomm.com



More information about the LUG mailing list