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

Re: Questions about library names



On 30 Apr 2001, Jose Carlos Garcia Sogo wrote:

> El 30 Apr 2001 09:37:23 -0400, sharkey@superk.physics.sunysb.edu escribió:
> [...]
> > Nothing happens to the old package.

> > When a new shared library comes out that is incompatible with an old
> > shared library, both libraries should be installed, this is why the
> > soname is in the package name.   It allows simultaneous installation of
> > libgpgme0 and libgpgme1.  By having both packages, third party programs
> > compiled and linked angainst either version will run fine.

>  Yes, but now I have another question. The library itself has a
> different version numbering. In this way, current version is 0.2.1, but
> the library gets compiled as libgpgme.so.0.3.0 as I said before.

>   The problem with this is that some day, the library can reach, let's
> say, version 0.5, and upstream author must decide to start calling the
> library again from 0.0.0, so the library's name for version 0.5 will be
> libgpgme.so.0.0.0
>   This means that the package must called again libgpgme0. How is this
> issue managed?

The purpose of the soname is to *uniquely* identify the library interface
across all versions.  There should never be another libgpgme.so.0.0.0 -- the
library so version should always be incrementing.

>   Perhaps should I ask upstream author to go with the same version
> numbering both in source itself and in soname?

Certainly not.  Version numbers on packages are arbitrary, and at the author's
discretion.  Version numbers on libraries have a very specific meaning ('when
the library interface is changed in an incompatible way, increment the major
version'), and deviating from this meaning causes problems for the system.  If
the author releases version 0.5 of the package, he can call he library
libgpgme.so.0.5.0 if he wants to -- IF the library interface is the same as
previous versions.  If a program compiled against version 0.4 doesn't work
with version 0.5, he must call the library libgpgme.so.1.x.x ... usually
libgpgme.so.1.0.0.

Steve Langasek
postmodern programmer



Reply to: