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
Showing
想要评论请 注册 或 登录