]> xenbits.xensource.com Git - libvirt.git/commit
Fix timebomb in LIBVIRT_VERSION_INFO calculation
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 10 Aug 2012 17:39:41 +0000 (18:39 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 14 Aug 2012 09:59:02 +0000 (10:59 +0100)
commit3b0cd660ef9c949aa5c7b468d00b0b27652ced01
treecd5b941b5fcfab5e24bbc51c23c493dd0a044837
parentbb705e251931754faa246145ebbd5deb8d692daa
Fix timebomb in LIBVIRT_VERSION_INFO calculation

The way LIBVIRT_VERSION_INFO is calculated has a timebomb that
will cause us to accidentally break soname when we change the
major version number to a non-zero value !

Given CURRENT:REVISION:AGE, libtool will generate

   libvirt.so.($CURRENT-$AGE).$AGE.$REVISION

We set CURRENT to be MAJOR+MINOR and AGE to $MINOR, so as
soon as MAJOR changes to non-zero, we get libvirt.so.1
as the soname, eg  1.3.9 would create libvirt.so.1.3.9
Looks natural but is not ABI compatible with libvirt.so.0.x.y

The fix is to set CURRENT to always be exactly the same
as AGE. We want to have the major version reflected in
the so symlinks though. So then we set AGE to MAJOR*1000+MINOR
eg, so 1.3.9 would create libvirt.so.0.1003.9 and libvirt
2.51.3 would create libvirt.so.0.2051.3
configure.ac