On Nov 15, 2008, at 19:10, "Brendan O'Connor" <[EMAIL PROTECTED]> wrote:
> Hi everyone. I'm getting segfaults trying to run PyLucene on OS X; > there was also a build issue that I think might be unrelated, but not > sure. Does any of this ring a bell? > > I'm using the PyLucene 2.4.0-1 tarball and built and installed JCC > just fine. I edited PyLucene's Makefile and when running "make", the > final linking step to make _lucene.so gives the error: > > ld: -rpath can only be used when targeting Mac OS X 10.5 or later > > I just took out rpath completely and got it to compile. Patching > jcc/python.py in this way: > > --- jcc/jcc/python.py 2008-10-12 15:25:02.000000000 -0700 > +++ /opt/py26/lib/python2.6/site-packages/JCC-2.0-py2.6-macosx-10.3- > i386.egg/jcc/python.py > 2008-11-14 12:58:11.000000000 -0800 > @@ -1392,7 +1392,7 @@ > if shared: > shlibdir = os.path.dirname(os.path.dirname(_jcc.__file__)) > if sys.platform in ('darwin', 'linux2'): # distutils no good > with -R > - args['extra_link_args'] += ['-Wl,-rpath', shlibdir] > + #args['extra_link_args'] += ['-Wl,-rpath', shlibdir] > args['library_dirs'] = [shlibdir] > args['libraries'] = ['jcc'] > > ... so without rpath I have to use DYLD_LIBRARY_PATH so pylucene can > find jcc. I'm trying to follow the README's invocation of initVM() > but it segfaults: > > ~ % DYLD_LIBRARY_PATH=/opt/py26/lib/python2.6/site-packages/JCC-2.0- > py2.6-macosx-10.3-i386.egg/ > python > Python 2.6rc1 (r26rc1:66416, Sep 15 2008, 22:20:00) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> lucene.initVM(classpath=lucene.CLASSPATH) > [1] 10775 segmentation fault DYLD_LIBRARY_PATH= python > > > Based on my quick reading about -rpath > (http://developer.apple.com/releasenotes/DeveloperTools/RN-dyld/index.html > ) > I don't think these issues are related, but not sure. > > I'm using: > OS X 10.5 > g++ 4.0.1 (from the dev tools) > Java 1.5.0 (from the dev tools) > Python 2.6rc1 (built from source) > Use otool -L to see what version of python and libjcc.dylib your executable is linked against. Crashes like that usually hint at a version mismatch. If you built python 2.6 into a non standard framework location, you must use -F in jcc's LFLAGS to ensure extensions are linked against the correct version of things. In particular, libjcc.dylib is at version 2.0.0 right now. Fwiw, I've got a happy python 2.6 PyLucene running on my mac. On mac, unless you changed JCC's LFLAGS, the build assumes a framework build of Python (configured with --enable-framework=path) Andi.. > Any ideas? Thanks! > Brendan > anyall.org > _______________________________________________ > pylucene-dev mailing list > pylucene-dev@osafoundation.org > http://lists.osafoundation.org/mailman/listinfo/pylucene-dev _______________________________________________ pylucene-dev mailing list pylucene-dev@osafoundation.org http://lists.osafoundation.org/mailman/listinfo/pylucene-dev