Re: .so versions



On Thu, 2007-05-17 at 18:26 +0100, Sergey Udaltsov wrote:
> Could anyone please comment on the question of the shared library versions:
> 
> http://www.advogato.org/person/svu/diary.html?start=95


Most modules I know use libtool versioning.  yes.

Here is the bits from Pango for example:

dnl The triplet 
m4_define([pango_version_major], [1])
m4_define([pango_version_minor], [17])
m4_define([pango_version_micro], [0])
m4_define([pango_version],
          [pango_version_major.pango_version_minor.pango_version_micro])
dnl The X.Y in -lpango-X.Y line. This is expected to stay 1.0 until Pango 2.
m4_define([pango_api_version], [1.0])
dnl Number of releases since we've added interfaces
m4_define([pango_interface_age], [0])
dnl Number of releases since we've broken binary compatibility.
m4_define([pango_binary_age],
          [m4_eval(100 * pango_version_minor + pango_version_micro)])
dnl Module API version.  This should be stepped up when a change causes
dnl older modules to not work with new pango.
m4_define([pango_module_version], [1.6.0])

...

dnl libtool versioning
m4_define([lt_current], [m4_eval(100 * pango_version_minor + pango_version_micro - pango_interface_age)])
m4_define([lt_revision], [pango_interface_age])
m4_define([lt_age], [m4_eval(pango_binary_age - pango_interface_age)])
VERSION_INFO="lt_current():lt_revision():lt_age()"

...

LIBRARY_LIBTOOL_OPTIONS="-version-info $VERSION_INFO"


So other than the module version we also keep track of an interface_age.
Conceptually we can get rid of it as it should stay at zero for stable
releases and is only useful during development cycles.

Other modules that may break binary compatibility from time to time do
not use an automated binary_age.  See gucharmap and vte for example.  In
those cases one has to update the libtool version triplets manually.


> Thanks,
> 
> Sergey

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759






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