On Wed, 2 Sep 2009, Ralph Seward wrote:
In Python:
from distutils.util import get_platform
get_platform()
'macosx-10.3-fat'
Apart from the platform detection problem which comes from your setup, there
is a bug in JCC where it adds -Wl,-rpath to the link args without checking
first that the target platform is at least Mac OS X 10.5.
This is around line 1451 in JCC's python.py file.
If you have the logic to check the target OS version, please send in a patch
that fixes this.
Note that if you link the JCC executables without -Wl,-rpath, you'll have to
then set DYLD_LIBRARY_PATH so that libjcc.dylib can be found.
Adding code to emit a warning to that effect in that patch would help too.
Thanks !
Andi..
Ah ha...
On Wed, Sep 2, 2009 at 2:56 PM, Ralph Seward<rj.sew...@gmail.com> wrote:
Hey Andi,
I am attempting to setup PyLucene on a Mac with OS X 10.5 (Leopard)
with Python 2.6 and I am encountering a small problem. I Googled
around and I saw your comment on something similar at
http://www.mail-archive.com/pylucene-...@osafoundation.org/msg02516.html
and I wondered if this was ever sorted out.
I do this:
svn co http://svn.apache.org/repos/asf/lucene/pylucene/trunk pylucene
Checked out revision 810649.
cd pylucene/jcc/
python setup.py build
at which point I get:
running build
running build_py
creating build/lib.macosx-10.3-fat-2.6
creating build/lib.macosx-10.3-fat-2.6/jcc
etc...
which appears to be an incorrect detection of my OS.
then I do:
cd ..
nano Makefile
# Mac OS X (Python 2.6.2, Java 1.5)
PREFIX_PYTHON=/usr/local
ANT=ant
PYTHON=$(PREFIX_PYTHON)/bin/python
JCC=$(PYTHON) -m jcc.__main__ --shared
NUM_FILES=2
... and save it ...
Then I run:
make
and it seems to be doing OK until it fails with:
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccmnAMJQ.out (No such file or directory)
error: command 'g++' failed with exit status 1
make: *** [compile] Error 1
which, if the OS was properly detected, I'm guessing not happen.
So, I was wondering if you had any insight as to the cause or
resolution to this problem.
Thanks in advance.
Ralph