[Gfoss] pyspatialite su mac os x + Qgis 1.7

Dunque dentro a qgis 1.7 trunk per mac os x, non c’è pyspatialite…ma magari lo metteranno.

Ho provato ad installare su mac os x 10.5 leopard pyspatilite via easy_install, ma ricevo questo errore [1]

Ho provato poi a installare da sorgente ma mi becco questi errori qua [2].

Suggerimenti???

Ciao e grazie.

Luca

[1]

host138-244-dynamic:~ pyarchinit$ sudo easy_install pyspatialite
Password:
Searching for pyspatialite
Reading http://pypi.python.org/simple/pyspatialite/
Reading http://pyspatialite.googlecode.com/
Reading http://code.google.com/p/pyspatialite/downloads/list
Best match: pyspatialite 2.6.1
Downloading http://pyspatialite.googlecode.com/files/pyspatialite-2.6.1.tar.gz
Processing pyspatialite-2.6.1.tar.gz
Running pyspatialite-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dmMEmW/pyspatialite-2.6.1/egg-dist-tmp-5T2Y4D
Downloading amalgation.
Extracting sqlite3.c
Extracting headers/spatialite/sqlite3.h
Extracting spatialite.c
Extracting headers/spatialite/sqlite3ext.h
Extracting headers/spatialite/spatialite.h
Extracting headers/spatialite/gaiaaux.h
Extracting headers/spatialite/gaiaexif.h
Extracting headers/spatialite/gaiageo.h
amalgamation/spatialite.c:85:20: amalgamation/spatialite.c:85:20: error: geos_c.h: No such file or directory
error: geos_c.h: No such file or directory
amalgamation/spatialite.c:89:22: error: proj_api.h: No such file or directory
amalgamation/spatialite.c:89:22: error: proj_api.h: No such file or directory
amalgamation/spatialite.c: In function ‘gaiaConvertCharset’:
amalgamation/spatialite.c:7557: warning: passing argument 2 of ‘libiconv’ from incompatible pointer type
amalgamation/spatialite.c: In function ‘gaiaConvertCharset’:
amalgamation/spatialite.c:7557: warning: passing argument 2 of ‘libiconv’ from incompatible pointer type
amalgamation/spatialite.c: In function ‘gaiaConvertToUTF8’:
amalgamation/spatialite.c:7612: warning: passing argument 2 of ‘libiconv’ from incompatible pointer type
amalgamation/spatialite.c: In function ‘gaiaConvertToUTF8’:
amalgamation/spatialite.c:7612: warning: passing argument 2 of ‘libiconv’ from incompatible pointer type
amalgamation/spatialite.c: In function ‘gaiaGeomCollEquals’:
amalgamation/spatialite.c:12999: error: ‘GEOSGeometry’ undeclared (first use in this function)
amalgamation/spatialite.c:12999: error: (Each undeclared identifier is reported only once
amalgamation/spatialite.c:12999: error: for each function it appears in.)
amalgamation/spatialite.c:12999: error: ‘g1’ undeclared (first use in this function)
amalgamation/spatialite.c:13000: error: ‘g2’ undeclared (first use in this function)
amalgamation/spatialite.c: In function ‘gaiaGeomCollIntersects’:
amalgamation/spatialite.c:13022: error: ‘GEOSGeometry’ undeclared (first use in this function)
amalgamation/spatialite.c:13022: error: ‘g1’ undeclared (first use in this function)
amalgamation/spatialite.c:13023: error: ‘g2’ undeclared (first use in this function)
amalgamation/spatialite.c: In function ‘gaiaGeomCollDisjoint’:

[2]

host138-244-dynamic:pyspatialite-2.6.1 pyarchinit$ sudo python setup.py install
running install
running build
running build_py
creating build
creating build/lib.macosx-10.3-fat-2.5
creating build/lib.macosx-10.3-fat-2.5/pyspatialite
copying lib/init.py → build/lib.macosx-10.3-fat-2.5/pyspatialite
copying lib/dbapi2.py → build/lib.macosx-10.3-fat-2.5/pyspatialite
copying lib/dump.py → build/lib.macosx-10.3-fat-2.5/pyspatialite
creating build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/init.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/dbapi.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/dump.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/factory.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/hooks.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/regression.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/transactions.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/types.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
copying lib/test/userfunctions.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test
creating build/lib.macosx-10.3-fat-2.5/pyspatialite/test/py25
copying lib/test/py25/init.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test/py25
copying lib/test/py25/py25tests.py → build/lib.macosx-10.3-fat-2.5/pyspatialite/test/py25
running build_ext
Downloading amalgation.
Extracting sqlite3.c
Extracting headers/spatialite/sqlite3.h
Extracting spatialite.c
Extracting headers/spatialite/sqlite3ext.h
Extracting headers/spatialite/spatialite.h
Extracting headers/spatialite/gaiaaux.h
Extracting headers/spatialite/gaiaexif.h
Extracting headers/spatialite/gaiageo.h
building ‘pyspatialite._spatialite’ extension
creating build/temp.macosx-10.3-fat-2.5
creating build/temp.macosx-10.3-fat-2.5/src
creating build/temp.macosx-10.3-fat-2.5/amalgamation
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/module.c -o build/temp.macosx-10.3-fat-2.5/src/module.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/connection.c -o build/temp.macosx-10.3-fat-2.5/src/connection.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/cursor.c -o build/temp.macosx-10.3-fat-2.5/src/cursor.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/cache.c -o build/temp.macosx-10.3-fat-2.5/src/cache.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/microprotocols.c -o build/temp.macosx-10.3-fat-2.5/src/microprotocols.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/prepare_protocol.c -o build/temp.macosx-10.3-fat-2.5/src/prepare_protocol.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/statement.c -o build/temp.macosx-10.3-fat-2.5/src/statement.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/util.c -o build/temp.macosx-10.3-fat-2.5/src/util.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/row.c -o build/temp.macosx-10.3-fat-2.5/src/row.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c amalgamation/sqlite3.c -o build/temp.macosx-10.3-fat-2.5/amalgamation/sqlite3.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DMODULE_NAME=“spatialite.dbapi2” -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -Iamalgamation -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c amalgamation/spatialite.c -o build/temp.macosx-10.3-fat-2.5/amalgamation/spatialite.o
amalgamation/spatialite.c:85:20: error: geos_c.h: No such file or directory
amalgamation/spatialite.c:89:22: error: proj_api.h: No such file or directory
amalgamation/spatialite.c:85:20: error: geos_c.h: No such file or directory
amalgamation/spatialite.c:89:22: error: proj_api.h: No such file or directory
amalgamation/spatialite.c: In function ‘gaiaConvertCharset’:

Ho scaricato da qua http://code.google.com/p/pyspatialite/

e nella cartella non c’è nessun file .cfg per fare la configurazione del setup e magari dare i path giusti per le librerie…

Ciao Luca,

2011/6/5 Luca Mandolesi <mandoluca@gmail.com>

Ho scaricato da qua http://code.google.com/p/pyspatialite/
e nella cartella non c’è nessun file .cfg per fare la configurazione del setup e magari

dare i path giusti per le librerie…

diciamo che i 2 file che possibilmente dovresti modificare sono

setup.cfg.OSX e setup.py

Il riferimento a geos_c lo trovi in setup.py: per esempio mi pare che per la compilazione
su windows si è dovuto modificare proprio la riga contenente geos_c aggiungendo iconv.

Trovi qualcosa riguardo su compilazione su debian qui [1].
C’era anche un documento contente i test preliminari del Furieri in cui spiegava come
compilarlo su windows, documento che adesso non trovo.

Mi stranizza comunque che non venga installato su OSX, ma purtroppo (o per fortuna)
non ho un mac.

Se qualcuno (con o senza mac) ne sa di più, ci faccia sapere.
Saluti.

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


Giuseppe Sucameli