[postgis-devel] statically linked liblwgeom, why ?

Raúl Marín Rodríguez rmrodriguez at carto.com
Fri Jan 25 04:37:10 PST 2019


I decided to compare the size of the binaries and libraries with 2.5 and 3.0:

2.5:
172K    /usr/bin/pgsql2shp
304K    /usr/bin/raster2pgsql
156K    /usr/bin/shp2pgsql
3.4M    /usr/lib/liblwgeom-2.5.so.0.0.0
772K    /usr/lib/postgresql/address_standardizer.so
5.5M    /usr/lib/postgresql/postgis-2.5.so
2.4M    /usr/lib/postgresql/postgis_topology-2.5.so
3.5M    /usr/lib/postgresql/rtpostgis-2.5.so

3.0:
348K    /usr/bin/pgsql2shp
376K    /usr/bin/raster2pgsql
432K    /usr/bin/shp2pgsql
764K    /usr/lib/postgresql/address_standardizer.so
2.5M    /usr/lib/postgresql/postgis_topology-3.so
5.5M    /usr/lib/postgresql/postgis-3.so
3.6M    /usr/lib/postgresql/rtpostgis-3.so

This is measured using the same flags (cflags, ldflags) and the
project as is (no Debian patches),
and in my case the static build is ~3M smaller. I don't have any
static libraries available system wide
for any dependencies, which might be what's causing issues in your
build and should be addressed
if we decided to keep this behaviour.

Regards,

-- 
Raúl Marín Rodríguez
carto.com


More information about the postgis-devel mailing list