How to use PROPERTIES VERSION and SOVERSION?

Thiago Macieira thiago at kde.org
Fri Apr 11 14:28:23 CEST 2008


On Friday 11 April 2008 14:29:58 Friedrich W. H. Kossebau wrote:
> Am Freitag, 11. April 2008, um 13:44 Uhr, schrieb Thiago Macieira:
> > On Friday 11 April 2008 13:28:07 Andreas Pakulat wrote:
> > > > 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.
> >
> > The glibc style would be more appropriate here:
> >
> > $ ls -l /lib/libc*so*
> > -rwxr-xr-x 1 root root 1319092 2008-03-10 08:10 /lib/libc-2.7.so*
> > lrwxrwxrwx 1 root root      11 2008-03-12 13:30 /lib/libc.so.6 ->
> > libc-2.7.so*
>
> Yes, quite less confusing.
>
> So no /lib/libc.so ? Why does our buildsystem/CMake create such symlinks,
> then?

There is, but then libc is a bad example. Let me take another:

$ ls -l /lib/libutil* /usr/lib/libutil.so
-rwxr-xr-x 1 root root 9704 2008-03-10 08:10 /lib/libutil-2.7.so*
lrwxrwxrwx 1 root root   14 2008-03-12 13:30 /lib/libutil.so.1 -> 
libutil-2.7.so*
lrwxrwxrwx 1 root root   22 2008-03-12 
13:34 /usr/lib/libutil.so -> ../../lib/libutil.so.1*

For libc, it's a special case:
$ cat /usr/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED 
( /lib/ld-linux.so.2 ) )

The same goes for pthread:
$ ls -l /usr/lib/lib*.so(.^*)
-rw-r--r-- 1 root root 238 2008-03-10 08:00 /usr/lib/libc.so
-rw-r--r-- 1 root root 216 2008-03-10 08:02 /usr/lib/libpthread.so

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20080411/f63bf2ac/attachment.pgp 


More information about the Kde-buildsystem mailing list