LD_ASSUME_KERNEL considered harmful (tummy.com, ltd. Journal Entry)
tummy.com: we do linux

Friday August 05, 2005 at 12:16
Subject: LD_ASSUME_KERNEL considered harmful
Keywords: Fedora Core 4, LD_ASSUME_KERNEL, Tech
Posted by: Kevin Fenzi

A while back a environment variable was introduced (mostly) to allow users to control how Linux handled threading issues. All sorts of applications (in particular Java) started telling users to set this LD_ASSUME_KERNEL variable. If you still have this variable set in Fedora Core 4, you are looking for trouble.

When Linux was changing threading models the new threading model broke several applications (in particular Java) and so they added a variable you could set to get the old threading behavior. Many people just added this to their .profile or login to always allow things like Java to work.

Another application that had issues at one point with the threading model was rpm. After some upgrades you would need to set LD_ASSUME_KERNEL to some particular value to get rpm to work at all.

At some times during the transition, mozilla/firefox needed LD_ASSUME_KERNEL to properly run. Those days are long past.

This was all well and good for transition to a new threading model/abi, but this has long since been completed. If you have LD_ASSUME_KERNEL set in Fedora Core you will see nifty errors like:

/usr/lib/openoffice.org2.0/program/javaldx: /lib/obsolete/linuxthreads/libpthread.so.0: version `GLIBC_2.3.3' not found

and

rpmdb: unable to initialize mutex: Function not implemented. error: cannot open Name index using db3 - Function not implemented (38)

The solution is of course to go through all your personal init files and make sure you remove any mention of LD_ASSUME_KERNEL. Including .profile, .bashrc, etc.

There is a very complete and nice explanation of what LD_ASSUME_KERNEL values are valid and what they could be used for here at Ulrich Drepper's RedHat pages: http://people.redhat.com/drepper/assumekernel.html
(Post Reply)

Comment
David Parish
Subject: LD_ASSUME_KERNEL
I'm OK with going through my own init scripts, but what about commercial products that use LD_ASSUME_KERNEL?

For instance, the zerog installer has LD_ASSUME_KERNEL. If you want to install a product (commercial or open source) on linux whose installer was built by zerog, you have to do vim -b theinstaller.bin and then chage

export LD_ASSUME_KERNEL=2.2.5
to
#xport LD_ASSUME_KERNEL=2.2.5

WebSphere's .sh scripts also use LD_ASSUME_KERNEL so the install is difficult as you have to modify the .sh files after they get laid down, but before they get called.

If there is a way to allow LD_ASSUME_KERNEL to still function on FC5, even if it didn't really change the kernel behavior that would be terrific.

try this:

[root@dparish 5.1]# export LD_ASSUME_KERNEL=2.2.5
[root@dparish 5.1]# vi
vi: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

-Dave

Comment
David Parish
Subject: More on LD_ASSUME_KERNEL
I thought I had found a solution:

yum groupinstall "Legacy Software Development"

There was some hints on the web that this would give me the libraries I need, but sadly, it didn't work either :(