[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [pkg-boost-devel] Bug#456915: second boost NMU

Hi Steve,
On Sun, Dec 23, 2007 at 09:55:49PM -0600, Steve M. Robbins wrote:

> On Wed, Dec 19, 2007 at 05:34:46PM -0800, Steve Langasek wrote:

> > Here is a patch for a second NMU, fixing the issues I overlooked in the
> > first.  Sorry for the inconvenience.

> > NMU on its way to incoming.

> Thanks so much for the work on this.  I'm merging the -2.1 and -2.2
> NMU changes into the boost svn trunk (i.e. the experimental -3
> version).

> There's one thing about the changes that I don't understand: how come
> a simple symlink like the following works?

> libboost_regex-gcc41-1_34_1.so.1.34.1 -> libboost_regex-gcc42-1_34_1.so.1.34.1

> The new "*-gcc42-*" library has "gcc42" in its SONAME, whereas a
> boost-using binary such as lyx have the "gcc41" version in its NEEDED
> section:

> $ objdump -p /usr/bin/lyx|grep boost_regex
>   NEEDED      libboost_regex-gcc41-1_34_1.so.1.34.1

> I've been labouring under the delusion that lyx would only run if it
> can be linked with a library with that precise SONAME.  This seems to
> be false as lyx continues to work despite the absence of said library.

> Can you point me at something that describes the rules for locating
> a shared lib?

I can describe them briefly, but I don't know a reference for this off the
top of my head.

The "NEEDED" entries are looked up as filenames - but just like any other
normal file access in Unix, when the libraries are loaded at runtime,
symlinks are followed.  This is easy to verify, because that most obvious of
libraries, libc.so.6, is itself a symlink to libc-2.7.so (or libc-2.3.6.so)!
So the only validation of NEEDED entries is that there has to be a file in
the search path whose name matches; it can be a symlink to anywhere you want
it to be, and this trick has been used more than once before in Debian to
maintain binary compatibility with existing packages when a wayward upstream
has made gratuitous soname changes.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Reply to: