[Kde-imaging] library versioning question

Aurélien Gâteau aurelien.gateau at free.fr
Tue Sep 26 10:12:12 CEST 2006


On 26/9/2006, "Angelo Naselli" <anaselli at linux.it> wrote:

> hmm as you told me once you don't like makefiles very much,

Oh... I say so? Then I didn't say it very lood... :-)

> in the same way i don't library versioning :/
> I read it in other links but what I'm not sure is (I know is a bit OT but..)
> the age parameter, I mean is it important if (and only if) we remove
> some interfaces, that was present before age version?

The next paragraph[1] of the url I gave is probably more useful. Here is
the interesting part:

1. Start with version information of 0:0:0 for each libtool library.

2. Update the version information only immediately before a public
release of your software. More frequent updates are unnecessary, and
only guarantee that the current interface number gets larger faster.

3. If the library source code has changed at all since the last update,
then increment revision (c:r:a becomes c:r+1:a).

4. If any interfaces have been added, removed, or changed since the last
update, increment current, and set revision to 0.

5. If any interfaces have been added since the last public release, then
increment age.

6. If any interfaces have been removed since the last public release,
then set age to 0.

> anyway 1:4:0 for libkipi should be ok, shouldn't it?

First, remember that version-info is an *internal* number. It has nothing
to do with the public version number. It's important because it
determines the soname of the library, which is what ld uses to determine
if it can dynamically link an application and a library.

The current version-info is 1:0:1. This means version 1 of the API (the
first 1), no revision (the 0), binary compatible with applications using
version 0 of the API (the second 1).
Note that the initial version-info is 0:0:0, meaning the initial version
of the API is 0. So version 1 of the API is the second version.

If we release a bug fix release, it should be: 1:1:1 (First revision of
the code (the second 1), no change in API)

If we release a binary compatible, API extended version, it should be:
2:0:2 (API version 2, compatible with applications using version 0 and 1
of the API)

If we release a new version which is not binary compatible, it should be:
2:0:0 (API version 2, only compatible with applications using API
version 2)

At least this is how I understand the libtool doc. Correct me if I'm
wrong.

Aurélien

[1]: http://www.gnu.org/software/libtool/manual.html#Updating-version-info


More information about the Kde-imaging mailing list