Opened 13 years ago
Last modified 13 years ago
#3507 new bug
built-in spatialindex conflicts with external libspatialindex
Reported by: | rustychris | Owned by: | borysiasty |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.7.0 |
Component: | Python plugins and bindings | Version: | 1.6.0 |
Keywords: | spatialindex | Cc: | |
Must Fix for Release: | No | Platform: | Debian |
Platform Version: | Kubuntu 10.10 | Awaiting user input: | no |
Description
libspatialindex is used by the python rtree module, but when this module is loaded from within a QGIS python plugin, the symbols from the builtin copy of spatialindex collide and render the python rtree module inoperable.
How to reproduce: install the rtree python module. Start QGIS and open a python console:
>>> import rtree >>> p = rtree.index.Property() >>> p.set_storage(0) True >>> p.get_storage() 1 >>>
Stepping through in gdb shows that libspatialindex.so:Tools::PropertySet::getProperty is shadowed by a function of the same name in libqgis_core.so.
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
The sooner you send it, the sooner JEF&Marco&Tim&Martin will be able to review it ;-)
Note:
See TracTickets
for help on using tickets.
By updating the SpatialIndex wrapper and amending CMakeLists and creating a Cmake script, I managed to build QGIS with a systemwide libspatialindex.
Wonder proposed to update the shipped copy of SpatialIndex and update the wrapper, so the user has the choice to use either lib.
Doing so, would help your problem, I suppose.
I can provide a patch, but I'm not a 100% sure, everything works correct or that my patch is sound, as I am no C++ programmer. Maybe we should do that after 1.7.