[postgis-devel] liblwgeom versioning

Sebastiaan Couwenberg sebastic at xs4all.nl
Thu Oct 8 11:03:01 PDT 2015


On 08-10-15 13:35, Sandro Santilli wrote:
> As we want to ship the fix in PostGIS 2.2.1 but still avoid to
> trigger crashes from any binary dynamically-linking to liblwgeom
> the library SONAME needed to be changed.

It's seems that the addition of the -release along with -version-info
now creates an invalid .so symlink. PostGIS 2.2.0 creates:

 /usr/lib/liblwgeom-2.2.so.2.2.0
 /usr/lib/liblwgeom-2.2.so.2 -> liblwgeom-2.2.so.2.2.0
 /usr/lib/liblwgeom.so -> liblwgeom-2.2.so.2.2.0

Whereas liblwgeom-2.2.so -> liblwgeom-2.2.so.2.2.0 was expected.

The SOVER should probably be included in the liblwgeom.la filename too.

This will also include it in the liblwgeom.a filename.

On the other hand, the libtool manual seems to suggest that not
including the release version in the .so symlink is the expected and
correct behaviour.

> To make such management easier in the future, I moved liblwgeom
> versions from configure.ac to Version.config, where  they are
> manually set (rather than derived from PostGIS release number).
> 
> Liblwgeom versionins uses libtool's current/age/revision triplet,
> currently set to 3:0:0.

This is a very welcome change. libtool versioning is separate from the
software versioning, the previous approach was a bit of a hack.

> The SONAME of liblwgeom will still include Major and Minor PostGIS
> release version, so we'll be able to keep numebers low, enough that
> for 2.3.0 we might start back from 1:0:0 (not done in 2.2.0 because
> we started already with an interface higher than 1).

For 2.3.0 you can even start from 0:0:0 which results in SOVERSION 0
(i.e. SONAME liblwgeom-2.3.so.0).

> I'm not sure it's safe to use 3:0:0 given PostGIS-2.2.0 shipped
> with a liblwgeom of 4:2:0 (decrementing current?).

Decrementing current is wrong, the libtool manual is very clear how the
version-info should be updated.

To bump the SONAME after version-info 4:2:0, it should be increment to
5:0:0. ("Programs may need to be changed, recompiled, and relinked in
order to use the new version. Bump current, set revision and age to 0.")

> The resulting SONAME on Linux is "liblwgeom-2.2.so.3" whereas it
> was "liblwgeom-2.2.so.2" for PostGIS-2.2.0, but I don't know if
> on other systems there could be a different outcome (Bas?).

My perspective is as Debian Developer, so my focus is on Linux too where
the bump to liblwgeom-2.2.so.3 is appropriate. I don't package for
Windows/OSX/BSD, so I can't say anything sensible about those platforms.
We have Greg Troxel for the BSD perspective, but the Windows and OSX
(MacPorts/Homebrew/Fink/...) package maintainers don't seem to be on
this list unfortunately. Regina seems to handle the Windows perspective
quite well though.

> I've added this info in the HOWTO_RELEASE file.
> 
> I believe this is a good compromise between liblwgeom independence
> and easy of maintainance in PostGIS.

I think your right about the compromise.

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



More information about the postgis-devel mailing list