Re: Naming library with proper SONAME

Pau Garcia i Quiles <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
On Tue, Mar 10, 2009 at 11:30 PM, Roberto C. Sánchez
<[email protected]> wrote:
> [My apologies in advance for the cross-posting.]
>
> On Tue, Mar 10, 2009 at 10:42:36AM +0100, Daniel Wallin wrote:
>> Roberto C. Sánchez wrote:
>> >>
>> > So, I've been trying to build the Debian package with the latest from
>> > the 0.8 branch on github.  It seems like the SONAME thing is not
>> > completely resolved.  I am seeing this after building:
>> >
>> > roberto@miami:~/src/luabind-upstream$ objdump -p ./bin/gcc-4.3.2/debug/libluabindd.so.0.8.0 |grep SONAME
>> >   SONAME      libluabindd.so.0.8.0
>>
>> Yes, that's the expected result, isn't it? The reasoning was that it's
>> too difficult to have ABI-compatibility, so we just use the complete
>> version number as the SONAME. "bjam install" will create the unversioned
>> symlink.
>>
>
> I am curious as to what people generally think of how the libluabind
> SONAME will be going forward.  I know that certain packages (like
> libssl) have the complete version in the SONAME, but I can't imagine
> that this is a really good idea.  Is this a showstopper for having
> libluabind in Debian, or just for a stable release?  Is this
> discouraged, but otherwise permissible?
>
> I've looked in the Debian library packaging guide and it does not say
> one way or the other.

Read:
http://www.elpauer.org/?p=230

"If your library version is the same as your soname version, you have
not understood a thing of what I said above" :-)

Soversion should be a *single* unsigned int, starting from 0.

Why using the version number as the soversion is a bad, bad idea?
Because bumping soversion means you have broken binary compatibility.
Now, let's imagine this scenario:

luabind version      ABI break?    soversion
------------------------       -----------------    ----------------

0.8.1                       N/A               0
0.8.2                       no                 0
0.9.0                       no                 0
0.9.1                       yes                1
0.10.0                     yes                2
etc

"ABI break?" = "is this version binary compatible with the previous version?"

See? From 0.8.1 to 0.8.2, and from 0.8.2 to 0.9.0 luabind did not
break ABI, so there was no need to bump soversion. If you were using
the luabind version number as the soversion, you would be saying "I'm
breaking ABI with every luabind release", which is not true.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.