[postgis-devel] liblwgeom symbols exported by postgis module

Bas Couwenberg sebastic at xs4all.nl
Thu Oct 1 02:17:55 PDT 2015


On 2015-10-01 11:00, Sandro Santilli wrote:
> On Thu, Oct 01, 2015 at 10:45:18AM +0200, Bas Couwenberg wrote:
>> On 2015-10-01 10:22, Sandro Santilli wrote:
>> >Alright, so it may theoretically happen, in a Debian system,
>> >that you end up with a PostGIS module version 2.1.6 using a liblwgeom
>> >version 2.1.8 ?
>> 
>> No, because the postgis module has liblwgeom-2.1.8.so in its NEEDED
>> section.
> 
> Uhm, isn't this in contraddiction with the problem expressed above
> of not knowing which of the 20.000+ packages need a rebuild ?

No, because Debian dynamically links liblwgeom and so we do have the 
dependencies expressing the relationship based on those defined in the 
binaries themselves.

> Where can I find this NEEDED section ? Can't see it with apt-cache show
> nor at https://packages.debian.org/jessie/postgresql-9.4-postgis-2.1

In the binaries using `objdump -x`. There are the required libraries for 
postgis-2.1.so from postgis (2.1.8+dfsg-4) for example:

  Dynamic Section:
    NEEDED               liblwgeom-2.1.8.so
    NEEDED               libgeos_c.so.1
    NEEDED               libproj.so.9
    NEEDED               libxml2.so.2
    NEEDED               libc.so.6

These requirements are expressed in the package dependencies to pull in 
the required library packages.

> Btw, you meant that postgis module 2.1.6 has "liblwgeom-2.1.6.so"
> in its NEEDED section ?

That's not what I meant, but it is also true.

The only way your theoretical case makes sense is for the newer version. 
Debian won't rebuild the postgis 2.1.6 package when 2.1.8 is uploaded to 
the archive. The strict dependencies on the exact binary version make 
sure that the liblwgeom-dev package pulls in the the same liblwgeom 
version, liblwgeom-dev (2.1.8+dfsg-4) Depends: liblwgeom-2.1.8 (= 
2.1.8+dfsg-4), and liblwgeom-dev (2.2.0~rc1+dfsg-1~exp1) Depends: 
liblwgeom2 (= 2.2.0~rc1+dfsg-1~exp1).

The liblwgeom .so symlink is included in the -dev package, and are 
therefore not co-installable, so you only have a single liblwgeom 
version available when building another package against it.

Debian (and Linux in general) has sensible library management, Windows 
is the problem child that requires special care. Hence the objections by 
Regina who is forced to deal with the limitations inherent to the 
Windows platform. Static linking makes sense on Windows, not on Linux.

Kind Regards,

Bas



More information about the postgis-devel mailing list