libtool
[Top][All Lists]
Advanced

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

Re: Shared library versioning


From: Bob Friesenhahn
Subject: Re: Shared library versioning
Date: Tue, 14 Jun 2011 09:08:28 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Tue, 14 Jun 2011, Lasse Collin wrote:

If I add a new public function to a library and don't modify anything
else, I should do ++current, ++age, revision=0, right? For example, if
the previous version of the library uses current:revision:age = 1:3:0,
adding a new function would make it 2:0:1. On GNU/Linux, this becomes

   libfoo.so.1.0.3 -> libfoo.so.1.1.0

which is fine. On OpenBSD, GNU Libtool does

   libfoo.so.1.3 -> libfoo.so.2.0

while the correct thing, according to the OpenBSD docs, would be this:

   libfoo.so.1.0 -> libfoo.so.1.1

That is, revision isn't visible anywhere. The filename doesn't change if
only bug fixes have been made and the library ABI hasn't been touched
(nothing added, removed, or changed). Please read the section
"Understanding shared libraries number rules" (it's short):

   http://www.openbsd.org/faq/ports/specialtopics.html

If this web page text is correct, then I agree that libtool is doing the wrong thing for OpenBSD. But of course we should search for any additional information and consult with relevant OpenBSD maintainers before making any such change since FAQ text could easily be wrong.

The applications are really what care about the library versioning.
The OS is just there to help with the selection process.

Packagers care about library versions too. Incrementing the major
version means that packagers need to recompile everything that depend on
the library. It is annoying if the major version is incremented without
a reason.

The major version ("current") was certainly incremented for a reason. It is true that if there is a sea of existing libraries which depend on the older version of the library then there may be problems if you attempt to relink with a newer version of the library since the linker may bring in several versions of the same library. These issues are highly OS dependent.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]