You are not logged in.

#1 2011-05-14 17:28:45

hwkiller
Member
Registered: 2009-07-21
Posts: 56

A question about 32bit applications

This is not about how to get 32bit applications to work on Arch linux. I don't have any problems with that.

However, I've been trying to understand how certain applications know to look for their libs in /usr/lib32.

I have to use firstclass for my job, and that is 32bit only. Firstclass works on 64bit via a wrapper that sets LD_LIBRARY_PATH to the /opt/lib32 folder (meh, I won't question that deprecated method).

However, what about skype? Acrobat Reader (not that I use it)?  These are 32bit only, and they require arch's lib32... but how do they know to look for their libs in lib32 if that's a non-standard location? Is there a mechanism I don't know about that allows these binaries to look through /usr/lib, realize that they won't work, and move onto /usr/lib32 (which is currently configured in ld.so.conf.d)?

So far I know of the following ways in which an app looks for libs
1) RPATH. But if /usr/lib32 is non-standard, I doubt they would compile this location into the binary as the default location.
2) LD_LIBRARY_PATH. This isn't set.
3) ld.so.conf.d. Sets up additional library folders. But why don't these apps just stop loading upon trying to load /usr/lib? My hunch is that LD can detect an incorrect ELF header/architecture and move on to another folder, but I am unsure.

Thanks for anyone's help. I can't seem to find any great documentation about this. I found great documentation on how LD works (http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html if anyone is interested), but not so much on lib32/lib64 coexistence.

Offline

#2 2011-05-14 18:50:22

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: A question about 32bit applications

Use strace to launch a program and you'll see Linux drilling through the PATH environmental variable and checking for compatibility.

Last edited by skottish (2011-05-14 18:50:57)

Offline

Board footer

Powered by FluxBB