#561175 libbz2-dev: Link /usr/lib/libbz2.so to /lib/libbz2.so.1 instead of /lib/libbz2.so.1.0

Package:
libbz2-dev
Source:
bzip2
Description:
high-quality block-sorting file compressor library - development
Submitter:
Lei Zhang
Date:
2010-01-07 10:21:05 UTC
Severity:
normal
#561175#5
Date:
2009-12-14 23:25:07 UTC
From:
To:
On both Debian and Ubuntu, /usr/lib/libbz2.so currently links to
/lib/libbz2.so.1.0. As a result, any program that links against -lbz2
on a Debian machine needs libbz2.so.1.0. This makes it hard to build
a binary that works on RPM distributions, which do not provide
libbz2.so.1.0.

#561175#10
Date:
2009-12-27 17:07:30 UTC
From:
To:
Hi!

The reason the libbz2.so symlink points to libbz2.so.1.0 is because
that's the SONAME of the shared library. Also the symlink only tells
ld which file to use when linking, but it's the SONAME which gets
recorded as the dependency information in the linked binary (the
NEEDED values, as seen with “objdump -p” for example).

So doing what you request would not change much. But changing the
SONAME would, but then I think that'd be wrong, as it would diverge
from the SONAME chosen by upstream for the library (as can be seen in
Makefile-libbz2_so which Debian is following in the patched Makefile).

So I think the bug here is in those rpm based distributions, for
diverging from upstream. I'll let the mainatiners close the bug if
they agree.

regards,
guillem

#561175#15
Date:
2010-01-06 23:11:22 UTC
From:
To:
Yes, you're right - the RPM distributions have a saneso.patch that
changes the SONAME. I noticed Gentoo and Slackware also carry the
same patch.

People have filed this bug to Fedora, but it was marked NotABug. [1]
It would be nice if the different distros can agree on a SONAME so
libbz2 can get included in a future version of the LSB. [2]


[1] https://bugzilla.redhat.com/show_bug.cgi?id=461863
[2] http://bugs.linuxbase.org/show_bug.cgi?id=404

#561175#20
Date:
2010-01-07 10:16:16 UTC
From:
To:
I think that's because the bug didn't provide enough information, and
probably reopening it with such additions might be enough to convince
them.

Well IMO the SONAME upstream chose is the correct one. In addition if
the diverging distributions were to add the missing symlink everything
would work, even previous versions of any package from a distribution
using upstream SONAMEs. But not the other way around, as the diverging
distributions would be still missing such symlink.

It would be helpful if you could add this information into those bug
reports, or a reference to this one.

thanks,
guillem