[Dev] [issue224] Check if a package being updated changes soname of an included library

Michał Masłowski mtjm at mtjm.eu
Wed Oct 26 12:04:23 PDT 2011


> does it happen often? are they always the same packages? are they ours
> or arch's?

We don't have exact statistics on that.  There are not more than two
bugs reported for such issue (I'm not sure if the subversion mips64el
bug shows this issue; ghostscript-libre with libidn was a different
issue).

> i know this happens for mplayer-libre with x264 updates and unarchiver with
> gnustep's. is there a reason why the program links to a versioned lib instead
> of the lib? iirc .so.xx are symlinks to the actual .so files and the binaries
> work ok with the dirty and old symlink one-to-the-other fix.

$ ls -l /usr/lib/libpoppler.so*
lrwxrwxrwx 1 root root      20 10-21 12:43 /usr/lib/libpoppler.so -> libpoppler.so.18.0.0
lrwxrwxrwx 1 root root      20 10-21 12:43 /usr/lib/libpoppler.so.18 -> libpoppler.so.18.0.0
-rwxr-xr-x 1 root root 2118928 10-21 12:43 /usr/lib/libpoppler.so.18.0.0

The libpoppler.so file is used by ld when building the program using it,
the binary will contain a reference to libpoppler.so.18 (since
libpoppler.so specifies this).  When running this binary ld.so will
use libpoppler.so.18.  The libpoppler.so.18.0.0 name is not important.

The reason for using different sonames (the things after .so) is that
they have different ABIs for programs to use.

For example, when a structure defined in a header file is changed and
the library is rebuilt with a different soname, programs previously
built for it will still look for the previous one.  If they find the new
library instead, they will probably crash or do other bad things due to
different structure layout assumed by them and the library (removing a
function and using a macro for new programs to use different functions
instead will probably lead to clearer missing symbol errors).  Building
new programs with the modified header file and linking them to the new
library will make them work with the new library.

There are good ways of maintaining a library without changing its ABI
often, e.g. current glibc and gtk2 can be used with very old programs.
I don't know why poppler doesn't do this, there might be more reasons
for this in libraries written in C++ (although Qt 4 has stable ABI).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.parabolagnulinux.org/pipermail/dev/attachments/20111026/3cb89677/attachment.asc>


More information about the Dev mailing list