[Qgis-developer] Config fails on find of spatialindex library

William Kyngesburye woklist at kyngchaos.com
Mon Apr 30 10:22:31 EDT 2012


On Apr 30, 2012, at 8:48 AM, Larry Shaffer wrote:

> Hi William,
> 
> Thanks for help.
> 
> On Sun, Apr 29, 2012 at 7:04 PM, William Kyngesburye <woklist at kyngchaos.com> wrote:
> Yes, spatialindex was remove from the source, so it's now an external dependency.  I started working out compilation details for OS X and got distracted :(
> 
> It has nothing to do with the GEOS spatialindex.h.
> 
> For detecting spatialindex in configuration, I see that spatialindex installs its headers in a subfolder of the include folder, and the cmake find spatialindex doesn't check this.  If you specify SPATIALINDEX_LIBRARY and SPATIALINDEX_INCLUDE_DIR it should be OK.
> 
> I found I did not need to specify these. I didn't have issues with spatialindex not being found (once it was installed in /usr/local). Seems cmake/FindSpatialindex.cmake has 'PATH_SUFFIXES spatialindex' already to aid in that. Note: I installed from spatialindex-src-1.7.1.
> 
Right, my brain blocked out the suffix flag.

> Once found, I see another problem - internally, spatialindex headers include each other by spatialindex/*/*.h.  But QGIS does not - I think it's previous internal spatialindex had these includes all changed.  ...and indeed, changing the one include in core/qgsspatialindex.cpp to:
> 
> #include <spatialindex/SpatialIndex.h>
> 
> does the trick.
> 
> Yes, this worked. It was the only edit needed to build successfully.
> 
But now I find that spatialindex has the bug in one of its headers, it's not a QGIS problem.  Hopefully it will be fixed soon.

> Does this mean libspatialindex.dylib will need to be added to QGIS.app/Contents/MacOS/lib and linking updated for successful app bundling, as well?
> 
On my todo list.

> 
> The built app is useable, but I'm still getting two crashes, under Lion (haven't tested on Snow Leopard, yet):
> 
> 1) The networking issue is still crashing on any call to external resources [0][1].
> 
> Typing the following into PyQGIS Console causes an immediate crash:
> 
> from PyQt4.QtWebKit import QWebView from PyQt4.QtCore import QUrl
> webviewer = QWebView()
> webviewer.setUrl(QUrl("http://www.qgis.org"))
> 
...yes, that crashes QGIS.

> 2) Crashes on quit, regardless of having worked in it a while or only having launched it.
> 
> Do you have these issues with your builds?
> 
no crashing on quit for me.

> 
> [0] http://hub.qgis.org/issues/5338
> [1] http://osgeo-org.1560.n6.nabble.com/QtNetwork-issue-with-master-td4887155.html
> 
> 
> Regards,
> 
> Larry Shaffer
> Dakota Cartography
> Black Hills, South Dakota
> 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy




More information about the Qgis-developer mailing list