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

Re: [odin-devel] Broken (lib)vista version number



On Tue, Jan 29, 2008 at 07:45:52PM +0100, Thies Jochimsen wrote:
> Hi David,

> > In fact, the version number is 2.2.1, but after compilation we have a
> > "/usr/lib/libvista.so.2.0.2". That will probably cause errors when someone
> > else will compile any package depending on this library.

I think David is under the mistaken impression that the PACKAGE
version number (2.2.1) has something to do with the LIBRARY versioning
(i.e. libvista.so.2.0.2).  It doesn't.

Specifically: for libtool, see section 11.4 of the autobook:

    It is important to note from the outset that the version number of
    your project is a very different thing to the version number of
    any libraries shipped with your project. It is a common error for
    maintainers to try to force their libraries to have the same
    version number as the current release version of the package as a
    whole. At best, they will break binary compatibility
    unnecessarily, so that their users won't gain the benefits of the
    changes in their latest revision without relinking all
    applications that use it. At worst, they will allow the runtime
    linker to load binary incompatible libraries, causing applications
    to crash.

    http://sourceware.org/autobook/autobook/autobook_91.html#SEC91



> it is the option '-version-info 2:2:0' to libvista_la_LDFLAGS. Please note 
> that the two last digits get reversed for the file name of the installed 
> library.

In fact, the algorithm to go from current:revision:age triplet to the
file name is more complicated than that.  Also, it is not relevant:
just follow libtool's instructions for updating the -version-info.


> According to the specs of libtool
> 
> http://sourceware.org/autobook/autobook/autobook_91.html#SEC91 
> 
> the last digit (age) must be less than or equal to the first (current). Thus, 
> as a quick hack, I have always set it to zero.

That is the conservative choice.  It means you are not guaranteeing
any backwards compatibility with previous versions of your library
interface.  Note that "interface" is used here in the technical
sense defined by libtool; it is different from a release of the
software.


> But this can certainly be 
> changed on my side in the repository, i.e. to  '-version-info 2:1:2' . I am 
> not an expert on library versioning. Any suggestions on how to fix this issue 
> are welcome...

My suggestion is follow the autobook page you referred to, above.  From 
what I've read on this thread (and not having looked at the sources),
I think you are doing the right thing and shouldn't change.


Regards,
-Steve

Attachment: signature.asc
Description: Digital signature


Reply to: