Opened 11 years ago

Closed 11 years ago

#1224 closed defect (fixed)

Spatialite version conflict

Reported by: micha Owned by: live-demo@…
Priority: major Milestone: OSGeoLive7.0
Component: OSGeoLive Keywords: spatialite, qgis, libspatialite
Cc:

Description

We now have on the LiveDVD two versions of libspatialite, both libspatialite3 and libspatialite5. The second is brought in by PostGIS, and causes spatialite_gui to use the version 4.1 of the library instead of the version 3.1 we had up till recently. This is bad news.

The botton line in that any DB created in spatialite is unreadable by QGIS !

I know we're "5 minutes" before the final build, but this problem will really reflect badly on QGIS, SpatiaLite and the LiveDVD.

Two thoughts for a solution:

I wonder if the install_spatialite.sh were run in the build process before PostGIS gets installed, then it would compile spatialite_gui using the libspatialite3 libraries.

Alternatively, we could put into the ./configure script for spatialite_gui an explicit path to the libspatialite3 *.so rather than depending on pkg_config. ??

Any additional thoughts welcome.

Thanks, Micha

Change history (9)

comment:1 by micha, 11 years ago

I tried this in a RC2 VM - I added one line to the install_spatialite.sh script:

--- install_spatialite.orig	2013-08-24 15:04:56.225754055 +0300
+++ install_spatialite.sh	2013-08-24 15:06:35.789754715 +0300
@@ -94,6 +94,8 @@
 PACKAGE[2]="spatialite_gui-1.5.0-stable"
 PACKAGE[3]="spatialite_gis-1.0.0c"
 
+export LIBSPATIALITE_LIBS=/usr/lib/libspatialite.so.3
+
 for i in 1 2 3; do
         wget -c --progress=dot:mega "$GAIA_URL/${SOURCE_DIR[$i]}/${PACKAGE[$i]}.tar.gz"
         tar xzf ${PACKAGE[$i]}.tar.gz

then I reran that install script in the VM. This caused spatialite_gui to be re-compiled with the older 3.1 lib, and now I can create tables in spatialite and view them, as before in QGIS. (you should be able to hear my sigh of relief wherever you are...)

Should I commit this change to svn?? It seems totally benign - It doesn't touch anything else, the change is local to spatialite only.

I also did a quick ogrinfo on a few spatialite db's - both the one created before this fix (libspatialite 4.1) and the one created after (libspatialite 3.1) and they worked OK. So we should be good to go...

comment:2 by kalxas, 11 years ago

In my opinion this is not a blocker at this point.

This would be picked up earlier if we had feedback sooner, or if spatialite gui was submitted to UbuntuGIs intead of building from source (http://trac.osgeo.org/osgeo/ticket/1182).

Anyway, this fix should be committed to svn.

Angelos

in reply to:  2 comment:3 by micha, 11 years ago

Priority: blockermajor

Replying to kalxas:

In my opinion this is not a blocker at this point.

This would be picked up earlier if we had feedback sooner, or if spatialite gui was submitted to UbuntuGIs intead of building from source (http://trac.osgeo.org/osgeo/ticket/1182).

Yes, of course. But the change (addition of libspatialite5) was only in the last few weeks. I'm confident that for 7.5 we'll have normal UbuntuGIS packages, and we won't need this compiling from source business.

Anyway, this fix should be committed to svn.

Good, I've committed the change. I'll recheck after the next nightly build before closing. Meanwhile I lowered priority.

Thanks, Micha

Angelos

comment:4 by kalxas, 11 years ago

Thanks Micha for the fix.

Best, Angelos

comment:5 by hamish, 11 years ago

Hi,

export FOO=bar

is a bashism and should not be used when the shebang is #!/bin/sh. Instead do the export on a second line like:

FOO=bar export FOO

thanks, Hamish

comment:6 by hamish, 11 years ago

Hamish:

is a bashism and should not be used when the shebang is #!/bin/sh

(but in this case the script uses bash + arrays[] and so nevermind :)

in reply to:  5 comment:7 by micha, 11 years ago

Replying to hamish:

Hi,

export FOO=bar

is a bashism and should not be used when the shebang is #!/bin/sh. Instead do the export on a second line like:

It's hard to get rid of bad habits ;-)

Thanks, Micha

FOO=bar export FOO

thanks, Hamish

comment:8 by kalxas, 11 years ago

Can someone please confirm the fix in recent nightly builds? Thanks, Angelos

comment:9 by micha, 11 years ago

Resolution: fixed
Status: newclosed

Checked in build 10834. Spatialite and QGIS are working fine together.

Note: See TracTickets for help on using tickets.