PySpatialite compile error with easy fix

22 views
Skip to first unread message

Mondo

unread,
Apr 29, 2011, 2:47:22 PM4/29/11
to SpatiaLite Users

Hi Everyone,

I just wanted to encourage Sandro, on his Python + Spatialite page, to
indicate that the
Python developer libraries are needed to build PySpatialite, which is
obvious from the
error messages to anyone experienced with this sort of thing. But for
a noob like me
who isn't, it's helpful to have those kinds of instructions.

I followed the instructions here:

http://www.gaia-gis.it/spatialite-2.4.0-4/splite-python.html

...in order to get the Qspatialite plugin to work.

For example, in the case of Ubuntu (I'm running 10.04):

$ sudo apt-get install python-all-dev

...will get you everything you need to build PySpatialte. I will just
post some of the output
and error messages in case a noob like me searches this list for an
answer.

Thank you (Sandro, and everyone)!!

M

src/connection.h:26:20: error: Python.h: No such file or directory
src/connection.h:27:22: error: pythread.h: No such file or directory
src/connection.h:28:26: error: structmember.h: No such file or
directory
In file included from src/connection.h:30,
from src/module.c:24:
src/cache.h:34: error: expected specifier-qualifier-list before
‘PyObject_HEAD’
src/cache.h:44: error: expected specifier-qualifier-list before
‘PyObject_HEAD’
src/cache.h:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘pysqlite_NodeType’
src/cache.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘pysqlite_CacheType’
src/cache.h:64: error: expected declaration specifiers or ‘...’ before
‘PyObject’
src/cache.h:64: error: expected declaration specifiers or ‘...’ before
‘PyObject’
src/cache.h:67: error: expected declaration specifiers or ‘...’ before
‘PyObject’
src/cache.h:67: error: expected declaration specifiers or ‘...’ before
‘PyObject’
src/cache.h:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ toke

Lokkju Brennr

unread,
Apr 29, 2011, 2:49:32 PM4/29/11
to spatiali...@googlegroups.com
One of these days I'll do pre-packaged libs... I swear, I really do.

There *really* needs to be some python package build farms - anyone
know of any free ones?

Loki

> --
> You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
> To post to this group, send email to spatiali...@googlegroups.com.
> To unsubscribe from this group, send email to spatialite-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spatialite-users?hl=en.
>
>

a.furieri

unread,
Apr 29, 2011, 3:49:16 PM4/29/11
to SpatiaLite Users
Hi Mondo,

I perfectly understand your pain, because it's exactly the same I feel
too.

Unhappily, each single Linux distro adopts some more or less smart
naming
convention for packages; and all them surely are different the one
from the other.

What is true for Ubuntu will quite surely be false for Fedora, and so
on.

So there is an unique way to guess which ones packages are actually
required
to perform a successful build on a specific Linux box: by trial and
error :-)
I don't know nothing better than this.

bye Sandro
Reply all
Reply to author
Forward
0 new messages