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

Re: Library version naming/sonames



On Mon, Apr 28, 2003 at 05:37:45PM -0400, Morgon Kanter wrote:

> I'm packing libzthread (known to the outside world as ZThread), and I 
> have a question over the correct name to give the package.
> 
> The current version of ZThread is 2.2.11, and the soname for this is 9. 
> I'm really confused over the right name for this.
> 
> Should it be:
> libzthread2-9:2.11
> libzthread2-2.2.11
> libzthread9-2.2.11
> libzthread2.9-2.2.11
>
> or something entirely different? This is kind of weird, and ZThread is 
> one of the first libraries I've tried to package that has a soname that 
> is so different from the major version number. What it actually looks 
> like in /usr/lib:
> 
> libZThread-2.2.so.9.0.2 (the actual library)
> libZThread-2.2.so.9 (symlink to the actual library)
> libZThread.so (symlink to libZThread-2.2.so.9)
> (besides those, there's the .la and the .a):
> libZThread.la
> libZThread.a
> 
> How exactly should I resolve this naming difficulty?

You should definitely read:

http://www.netfort.gr.jp/~dancer/column/libpkg-guide/

and

http://www.debian.org/doc/debian-policy/ch-sharedlibs.html

before attempting this.  But to try to answer your question:

If the soname is being managed properly, the release version number should
not be involved in the name at all.  If the soname is not being managed
properly, then in some situations it is acceptable (though suboptimal) to
use the release version number as a substitute soname, meaning that no two
releases are ever binary compatible.  This library looks like it is trying
to do both, which is clearly wrong.

Probably you need to have a talk with upstream about proper library
versioning.  The libtool manual has some information on this, as does the
libpkg-guide.

-- 
 - mdz



Reply to: