How to use PROPERTIES VERSION and SOVERSION?

Friedrich W. H. Kossebau kossebau at kde.org
Fri Apr 11 14:08:39 CEST 2008


Am Freitag, 11. April 2008, um 13:28 Uhr, schrieb Andreas Pakulat:
> On 11.04.08 13:34:21, Friedrich W. H. Kossebau wrote:
> > What is the difference between the build version and api version? Is
> > build version the long major.minor.patch-level, and api version just
> > major.minor?
>
> No, SOVERSION is a version number on the .so file you create and is
> usually understood as an indicator for API compatibility (and ABI too).
> So whenever you change the library API in a way that apps that linked
> against an old version won't work against the new version increase the
> SOVERSION. Its just an always increasing integer.

Indicator fur human eyes or used by the linker?
So kdelibs 4.1 the SOVERSION should be one higher than for kdelibs 4.0? 
Because code compiled against 4.1 would not see the same ABI when running 
with 4.0

Yet GENERIC_LIB_SOVERSION is just set to "4". I miss something, obviously.

> The VERSION attribute otoh is more or less just a descriptive thing, its
> just for the symlinks.

> > What leaves me puzzled is that with cmake 2.4.7 for
> > 	set_target_properties( mylibname PROPERTIES VERSION 6.1 SOVERSION 5 )
> > I get
> > 	libmylibname.so -> libmylibname.so.5*
> > 	/home/koder/System/kde-devel/lib/libmylibname.so.5 ->
> > libmylibname.so.6.1*
> > /home/koder/System/kde-devel/lib/libmylibname.so.6.1*
> > Is this really what one wants?
>
> Well, depends. If your working on version 6.1 of your libary, but you
> changed the binary interface only 5 times until now it makes perfect
> sense. That said it is a quite unusual pattern I think.

So let's see:
libmylibname.so.6.1 - the real file, name used to separate the different 
versions
libmylibname.so.5 - used by whom? linker?
libmylibname.so - used by whom? linker?

Any helpful answers will end in another section "Getting the version numbers 
right" of
http://techbase.kde.org/index.php?title=Development/Tutorials/Creating_Libraries
BTW, so you help others, too.

Thanks
Friedrich


More information about the Kde-buildsystem mailing list