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

William Kyngesburye woklist at kyngchaos.com
Sun Apr 29 21:04:08 EDT 2012


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.

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.

On Apr 29, 2012, at 5:46 PM, Larry Shaffer wrote:

> On Sun, Apr 29, 2012 at 3:50 PM, Larry Shaffer <larrys at dakotacarto.com> wrote:
> Hi,
> 
> Tried building master branch today, on Mac 10.7.3, but build fails when searching for spatialindex library. 
> 
> -- Found GSL: /Library/Frameworks/GSL.framework
> -- Found FCGI: /usr/local/lib/libfcgi.dylib
> CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the CMake files:
> SPATIALINDEX_LIBRARY
>     linked by target "qgis_core" in directory /Users/larrys/QGIS/github-nightly/quantum-gis/src/core
> 
> I did some searching and found this change by JEF 5 days ago [0]. Also, there appears to be no 'spatialindex' directory in src/core anymore in the master branch.
> 
> Is spatialindex library now a system environment build requirement, instead of internal? If so, where can I get the appropriate library?
> 
> There's a header file here (Kyngchaos.com GEOS framework):
> 
> /Library/Frameworks/GEOS.framework/Versions/3/Headers/spatialIndex.h
> 
> but, it doesn't look like what I should be including.
> ...
> 
> [0] https://github.com/qgis/Quantum-GIS/commit/c10b040ec751c503594776fece9ee96961dec678
> 
> 
> I see [1][2] is where internal spatialindex support was removed along with spatialite (which was then readded, later). I tracked down the library [3] and installed (successfully) versions 1.7.1 back to 1.4.0, but QGIS build always fails at same point [4] regardless of library version installed.
> 
> [1] http://hub.qgis.org/issues/4805
> [2] https://github.com/qgis/Quantum-GIS/commit/c56491b11124f9ceefa9b6b3d501374755aac84c#src/core
> [3] http://libspatialindex.github.com/
> [4] http://dl.dropbox.com/u/4058089/qgis/spatialindex_build-failure.pdf
> 
> 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/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings.  And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan




More information about the Qgis-developer mailing list