Bug#794047: pyspatialite: distro patch causes misbuild on 64-bit archs
Steve Langasek
steve.langasek at canonical.com
Thu Jul 30 04:09:46 UTC 2015
Package: pyspatialite
Version: 3.0.1-8
Severity: serious
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu wily ubuntu-patch
pyspatialite is currently misbuilt on 64-bit architectures in Debian testing
and unstable, because of a distro patch that causes /usr/include/spatialite
to be added to the header search path. libspatialite-dev ships both a
/usr/include/spatialite.h and a /usr/include/spatialite/spatialite.h, and
the first one is the correct one. Without the correct function types, this
results in the compiler truncating pointers along its way; e.g., from
<https://buildd.debian.org/status/fetch.php?pkg=pyspatialite&arch=arm64&ver=3.0.1-8&stamp=1436875015>:
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DMODULE_NAME="spatialite.dbapi2" -DVERSION="3.0.1" -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DOMIT_FREEXL=1 -DSPATIALITE_HAS_INIT_EX=1 -I/usr/include -I/usr/include/spatialite -I/usr/include/python2.7 -c src/connection.c -o build/temp.linux-aarch64-2.7/src/connection.o
src/connection.c: In function 'pysqlite_connection_init':
src/connection.c:110:9: warning: implicit declaration of function 'spatialite_alloc_connection' [-Wimplicit-function-declaration]
self->slconn = spatialite_alloc_connection();
^
src/connection.c:110:22: warning: assignment makes pointer from integer without a cast
self->slconn = spatialite_alloc_connection();
^
This doesn't get caught by the Debian buildds, but in Ubuntu this is treated
as a fatal error as this is a known misbuild that won't work at all on some
64-bit architectures and will fail randomly at runtime on others.
The one-liner fix has been applied to Ubuntu with the following changelog:
* debian/patches/00-fix_build.patch: don't add /usr/include/spatialite to
the search path. This is a wrong fix which causes
/usr/include/spatialite/spatialite.h to be found instead of
/usr/include/spatialite.h, resulting in a misbuild on 64-bit archs.
Thanks for considering the patch.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyspatialite_3.0.1-8ubuntu1.debdiff
Type: text/x-diff
Size: 1321 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20150729/43792bd6/attachment.diff>
More information about the Pkg-grass-devel
mailing list