SpatiaLite 4.3.0a & PostGIS 2.2.0 (lw_vasprintf no longer available)

169 views
Skip to first unread message

linux...@gmail.com

unread,
Dec 10, 2015, 5:15:24 AM12/10/15
to SpatiaLite Users
Yesterday PostGIS 2.2.0 was uploaded to Debian unstable, and SpatiaLite 4.3.0a was rebuilt with its liblwgeom.

Unfortunately the build succeeded despite lw_vasprintf having been removed from liblwgeom.

The build log only reported:

 gg_lwgeom.c: In function 'lwgaia_noticereporter':
 gg_lwgeom.c:94:10: warning: implicit declaration of function 'lw_vasprintf' [-Wimplicit-function-declaration]
      if (!lw_vasprintf (&msg, fmt, ap))
           ^

When the SpatiaLite tests are built linking fails with:

 /build/spatialite-4.3.0a/src/.libs/libspatialite.so: undefined reference to `lw_vasprintf'

The fossil repository doesn't reference lw_vasprintf' any more and uses sqlite3_vmprintf instead.

Is it sufficient to patch SpatiaLite 4.3.0a to use the new lwgaia_noticereporter & lwgaia_errorreporter functions or are more changes required to build with PostGIS 2.2.0?

Kind Regards,

Bas

linux...@gmail.com

unread,
Dec 10, 2015, 6:26:35 AM12/10/15
to SpatiaLite Users
Op donderdag 10 december 2015 11:15:24 UTC+1 schreef linux...@gmail.com:

These two changes seem sufficient to fix the lw_vasprintf issue:

https://www.gaia-gis.it/fossil/libspatialite/fdiff?v1=48918773ced633bc&v2=342a605d691bddc6&sbs=1
https://www.gaia-gis.it/fossil/libspatialite/fdiff?v1=bae06cd7cce4c2c9&v2=6000f2931ddaf06d&sbs=1

I've added a patch to the spatialite Debian package with these two changes that seems to do the trick.

Kind Regards,

Bas

a.fu...@lqt.it

unread,
Dec 10, 2015, 12:21:00 PM12/10/15
to spatiali...@googlegroups.com
Hi Bas,

unhappily liblwgeom is plagued by several unexpected API/ABI
breakages affecting each subsequent release; in this specific
case lw_vasprints was abruptly removed from PostGIS 2.2.0

libspatialite 4.3.0a was released one month before postgis
2.2.0 (respectively on 2015-09-07 and 2015-10-07) and sadly
the final result of all this is that now 4.3.0a cannot be
successfully built on the top of liblwgeom 2.2.0

as you already discovered by yourself the current code of
libspatialite-trunk available from the Fossil repository
now correctly supports liblwgeom 2.2.0 (and any earlier
version), and the required changes were just replacing
all references to lw_vasprintf by sqlite3_vmprintf.
the interested functions are lwgaia_noticereporter()
and lwgaia_errorreporter() in -/src/gaiageo/gg_lwgeom.c

so I'm happy to confirm that your patch to the Debian
package is correct and should successfully work.

bye Sandro




Reply all
Reply to author
Forward
0 new messages