Andi:

>> -L/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
>> -ljcc -o build/lib.macosx-10.5-fat-2.6/lucene/_lucene.so -framework
>> JavaVM -Wl,-S -Wl,-rpath
>>
>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
>> ld: library not found for -ljcc
>
> Note the value of the -L flag. This is where the linker expects libjcc.dylib
> to be, not in your build directory. After building JCC, did you install it ?
> as with:
>  $ python setup.py build install

Doh! That was it! Now the setup works fine and completes.

Thank you so much!

> You also don't need to set DYLD_LIBRARY_PATH anymore (which is used for
> running, not by ld) since you're able to use -Wl,-rpath.

Noted and unset.

Thanks again.
Ralph

>
> Andi..
>
>> collect2: ld returned 1 exit status
>> ld: library not found for -ljcc
>> collect2: ld returned 1 exit status
>> lipo: can't open input file:
>> /var/folders/7r/7r4PlyAYE0CN5MeqK98dBk+++TQ/-Tmp-//ccexpZmi.out (No
>> such file or directory)
>> error: command 'g++' failed with exit status 1
>> make: *** [compile] Error 1
>>
>> I added:
>> export
>> DYLD_LIBRARY_PATH=/Users/ralph/pylucene/jcc/build/lib.macosx-10.5-fat-2.6
>> to my .profile as this is where libjcc.dylib resides, but this did not
>> seem to fix the problem.
>>
>> So, any suggestions?
>>
>> Ralph
>>
>> j...@apache.org> wrote:
>>>
>>> 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
>>>>>
>>>
>

Reply via email to