Martin Buchholz wrote:
VK> Not being a heavy-duty Linuxoid yet, if you have an older
binary
VK> that wants the libc5 version of -lc how does that get resolved
VK> if it finds a libc6 version via -rpath? Or are we being careful
VK> to only specify -rpath for things not usually found by ld.so.conf?
VK> Basically, what mechanism are we using to make sure that Things
VK> Dont Suck if we link against a now-current library, but the sysadmin
VK> then uses ld.so.conf to move it around for compatability while
VK> installing a new version of the library?
VK> Or am I missing something due to too many nights of 5 hours sleep? ;)
The new library should have a new major version number or should use
some other magic to make sure old binaries don't use it.
The major version should change if that particular library changes.
However, the problem is when one library depends upon another, and
it's the dependency that changes.
E.g. I have two versions of libX11.so.6.1. One was built for libc-5,
whilst the other was built for libc-6.
The trick is to ensure that ld-linux.so picks up the correct version
for the application. The solution is to examine the dependencies of
each candidate library, and to use the version which requires the same
libc as the executable. Of course, this only works if the library has
dependency information (i.e. if you used "-lc" when building it).
--
Glynn Clements <glynn(a)sensei.co.uk>