[postgis-devel] liblwgeom versioning

Sandro Santilli strk at keybit.net
Fri Oct 9 01:10:44 PDT 2015


On Thu, Oct 08, 2015 at 08:03:01PM +0200, Sebastiaan Couwenberg wrote:
> 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.

I tought this was actually a feature, as it allows for linking
with -llwgeom. Is it not ?

> The SOVER should probably be included in the liblwgeom.la filename too.
> 
> This will also include it in the liblwgeom.a filename.

See above.

> 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.

Right, and I can see how it can be useful.

> 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).

Yes, good idea.

> > 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.")

Alright, we are 5:0:0 as of r14237 in 2.2 branch.

> > I believe this is a good compromise between liblwgeom independence
> > and easy of maintainance in PostGIS.
> 
> I think your right about the compromise.

Thanks for the support. I hope we'll be able to further streamline
the API/ABI (stripping of symbols, stop using _internal.h from
PostGIS, symbol versioning...) and then move liblwgeom to its own
repository (hopefully by then OSGeo will have support for hosting
git repos).

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list