ABI change in cyrus sasl 2.1.25

Ondřej Surý ondrej at sury.org
Tue Jun 5 03:43:19 EDT 2012


On Mon, Jun 4, 2012 at 11:31 PM, Alexey Melnikov
<alexey.melnikov at isode.com> wrote:
> On 29/05/2012 17:38, Ondřej Surý wrote:
>>
>> On Tue, May 29, 2012 at 6:16 PM, Alexey Melnikov
>> <alexey.melnikov at isode.com>  wrote:
>>>
>>> On 29/05/2012 17:10, Ondřej Surý wrote:
>>>>
>>>> When you change interface and break binary compatibility you need to
>>>> increase .so.NUMBER. Existing binaries has to be recompiled to use this
>>>> new
>>>> library. And older binaries can still use older version of the library
>>>> without breaking.
>>
>> Let me explain in greater detail now.
>>
>> cyrus-sasl now produces:
>>
>> library: /usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
>> symlink: /usr/lib/x86_64-linux-gnu/libsasl2.so.2
>>
>> Binaries (as for example slapd) are linked to libsasl2.so.2 (which is
>> the SONAME) and dynamic linker looks for this file in it's paths.
>>
>> When you break binary compatibility as happened in 2.1.24 you need to
>> increase SONAME of the library to something higher (usually just
>> increase it by one).
>>
>> So cyrus-sasl>= 2.1.24 should really have: libsasl2.so.3 SONAME.
>>
>> Also as one can see the last (patch) number of the library matches the
>> release, which is also probably wrong. You need to change the number
>> only in case you actually change something in the ABI (like add a new
>> function).
>>
>> You can read more about Library interfaces in the libtool manual,
>> especially this part is relevant:
>> http://www.gnu.org/software/libtool/manual/libtool.html#Versioning
>>
>> Here are a set of rules to help you update your library version
>> information:
>>
>> 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 or changed since the last
>> public release, then set age to 0.
>>
>>>> I can prepare patch...
>>>>
>>>> There is also some short info here:
>>>>
>>>>
>>>> http://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html#sonameapiabi
>>>
>>> If you can prepare the patch, that would be great. Will save me time
>>> anyway
>>> ;-).
>>
>> Will do, but not today :).
>
> Have you done it yet?
>
> If not, I might have a patch for you to sanity check.

Not yet. Unfortunatelly I got overwhelmed by other stuff.

If you have a patch, I would be happy to check it.

O.
-- 
Ondřej Surý <ondrej at sury.org>


More information about the Cyrus-devel mailing list