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

Larry Shaffer larrys at dakotacarto.com
Mon Apr 30 09:48:05 EDT 2012


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.

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.

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?


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"))

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?


[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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120430/5952eec7/attachment.html


More information about the Qgis-developer mailing list