[XForms] Trying to get a handle on libtool's versioning system
Angus Leeming
angus.leeming at btopenworld.com
Thu May 6 13:55:09 EDT 2004
On Thursday 06 May 2004 5:55 pm, Angus Leeming wrote:
> Conclusion, the libtool version info is '2:0:1'.
I find that the explanation of the system is much clearer here:
http://sources.redhat.com/autobook/autobook/autobook_91.html
Using this source, I get a version-info of '2:0:1' again, meaning that
the interface is a superset of that of the previous, '1:0:0', public
release and that programs compiled against '1:0:0' will link
successfully against '2:0:1'. Full explanation below.
Angus
All Libtool libraries start with `-version-info' set to `0:0:0' --
this will be the default version number if you don't explicitly set
it on the Libtool link command line. The meaning of these numbers
(from left to right) is as follows:
current
The number of the current interface exported by the library. A
current value of `0', means that you are calling the interface
exported by this library interface 0.
revision
The implementation number of the most recent interface exported by
this library. In this case, a revision value of `0' means that this
is the first implementation of the interface.
If the next release of this library exports the same interface,
but has a different implementation (perhaps some bugs have been
fixed), the revision number will be higher, but current number will
be the same. In that case, when given a choice, the library with the
highest revision will always be used by the runtime loader.
age
The number of previous additional interfaces supported by this
library. If age were `2', then this library can be linked into
executables which were built with a release of this library that
exported the current interface number, current, or any of the
previous two interfaces.
By definition age must be less than or equal to current. At the
outset, only the first ever interface is implemented, so age can only
be `0'.
For later releases of a library, the `-version-info' argument needs to
be set correctly depending on any interface changes you have made.
This is quite straightforward when you understand what the three
numbers mean:
1. If you have changed any of the sources for this library, the
revision number must be incremented. This is a new revision of the
current interface.
Yes -> version-info == 1:1:0
2. If the interface has changed, then current must be incremented,
and revision reset to `0'. This is the first revision of a new
interface.
Yes -> version-info == 2:0:0
3. If the new interface is a superset of the previous interface
(that is, if the previous interface has not been broken by the
changes in this new release), then age must be incremented. This
release is backwards compatible with the previous release.
Yes -> version-info == 2:0:1
4. If the new interface has removed elements with respect to the
previous interface, then you have broken backward compatibility and
age must be reset to `0'. This release has a new, but backwards
incompatible interface.
No. version-info unchanged.
More information about the Xforms
mailing list