Ah, I see the problem then. I have the spatialindex libs from the
release, but the Rtree from svn. Using the SVN version of spatialindex
includes the library, as you mention.
I tried the import again, but got the error:
OSError: dlopen(libspatialindex_c.dylib, 6): no suitable image found. Did find:
/usr/local/lib/libspatialindex_c.dylib: mach-o, but wrong architecture
I added the arch flag: ./configure CFLAGS='-arch x86_64' for
building the libspatialindex, but no luck. I then did as said here:
http://developer.apple.com/mac/library/releasenotes/OpenSource/PerlExtensionsRelNotes/index.html
and exported ARCHFLAGS=-arch ppc -arch ppc64 -arch i386 -arch x86_64
but still things are not working. Is there a Rtree specific
architecture override that I need to change?
On Tue, Oct 20, 2009 at 3:02 PM, Howard Butler <[email protected]> wrote:
> It is inside the egg directory if I understand correctly. At Rtree
> 0.5, we were building libspatialindex_c.dylib as part of the Python
> extensions, but with Rtree 0.6, we will be moving that into
> libspatialindex proper, which means Python users won't have any
> hassle. The transition there is a little bumpy right now,
> unfortunately.
>
> Howard
>
> On Oct 20, 2009, at 4:19 AM, Neil wrote:
>
>> I tried with DYLD path, but the same problem. I also searched for the
>> libspatialindex_c.dylib library itself, and it isn't around. Is it
>> part of libspatialindex or Rtree?
>>
>>
>>> Please try DYLD_LIBRARY_PATH, which is the osx-equivalent of
>>> LD_LIBRARY_PATH.
>>
>>> This reminds me we need a release of both libspatialindex (which has
>>> the C API now) and Rtree to fix up these issues. I will try to
>>> kick a
>>> libspatialindex release out this week so we can do an Rtree one.
>>> Brent's added a lot of fun stuff in svn that he can tell folks about.
>>
>>
>> On Mon, Oct 19, 2009 at 5:28 PM, Neil <[email protected]> wrote:
>>> I seem to be having the same problem as mentioned in this message:
>>> http://lists.gispython.org/pipermail/community/2009-August/
>>> 002162.html
>>>
>>> I download svn version 1466, spatiallibrary as per website, and build
>>> works fine. In python prompt, though, I get
>>> File "<stdin>", line 1, in <module>
>>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
>>> python2.6/site-packages/Rtree-0.5.0-py2.6.egg/rtree/__init__.py",
>>> line 8, in <module>
>>> from index import Rtree
>>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
>>> python2.6/site-packages/Rtree-0.5.0-py2.6.egg/rtree/index.py",
>>> line 2, in <module>
>>> import core
>>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
>>> python2.6/site-packages/Rtree-0.5.0-py2.6.egg/rtree/core.py",
>>> line 88, in <module>
>>> rt = ctypes.CDLL(lib_name)
>>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
>>> python2.6/ctypes/__init__.py",
>>> line 353, in __init__
>>> self._handle = _dlopen(self._name, mode)
>>> OSError: dlopen(libspatialindex_c.dylib, 6): image not found
>>>
>>> which is the same error. Setting LD_LIBRARY_PATH to the location of
>>> the Rtree egg directory doesn't work, however.
>>>
>>> Any ideas? I wonder if the dylib is not being found (I'm not clear on
>>> the equivalent to ldconfig for the Mac).
>>>
>>> Here is my local library path:
>>> Rtree $ ls -la /usr/local/lib/libspatialindex.*
>>> -rwxr-xr-x 1 root wheel 964192 19 Oct 16:32
>>> /usr/local/lib/libspatialindex.1.dylib
>>> -rw-r--r-- 1 root wheel 1551344 19 Oct 16:32 /usr/local/lib/
>>> libspatialindex.a
>>> lrwxr-xr-x 1 root wheel 23 19 Oct 16:32
>>> /usr/local/lib/libspatialindex.dylib -> libspatialindex.1.dylib
>>> -rwxr-xr-x 1 root wheel 992 19 Oct 16:32
>>> /usr/local/lib/libspatialindex.la
>>>
>> _______________________________________________
>> Community mailing list
>> [email protected]
>> http://lists.gispython.org/mailman/listinfo/community
>
> _______________________________________________
> Community mailing list
> [email protected]
> http://lists.gispython.org/mailman/listinfo/community
>
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community