[Pkg-vsquare-devel] Bug#610933: libvdeplug3 declares a conflict with libvdeplug2
Jonathan Nieder
jrnieder at gmail.com
Mon Nov 28 23:59:00 UTC 2011
Ludovico Gardenghi wrote:
> (In any case, I still can't figure out what should be the *proper* way
> for a program for dlopening a .so while providing the version number...
> should it loop over all the (infinite :-)) possible SONAMEs who offer
> compatibility for the needed interface version?
Ah! Well, it's true that SONAMEs are not a perfect description of
whether the relevant part of the interface changed or not.
When the SONAME is bumped, programs that linked directly to the
library still are linked to the old version. This has a few
implications:
1. If you want to dlopen a shared library, in general one practical
way to do so is to call "readlink" on the .so symlink at build
time and then strip off the minor version (for example in your
configure script) and bake in the target. This way, if later
versions of the shared library change or remove the interfaces you
are using, your program will still work.
Is there any particular reason for libvdeplug_dyn.h to use the
unversioned name instead of "libvdeplug.so.3"?
2. If the SONAME of a shared library is changing very often, that
means old programs linking to the old version are going to
cause a lot of crufty old versions to be kept around on some
machines. If the SONAME is bumping often enough for this to
be a problem, it can be useful to find ways to make the interface
a little more stable :) --- for example, by using opaque types,
and by using symbol versioning to version backward-compatible
ABI extensions.
More information about the Pkg-vsquare-devel
mailing list