[pylucene-dev] pylucene/jcc compilation issues
Andi Vajda
vajda at osafoundation.org
Thu Oct 25 10:37:39 PDT 2007
On Thu, 25 Oct 2007, Andi Vajda wrote:
> On Thu, 25 Oct 2007, Phil Christensen wrote:
>
>> I'm certainly not complaining, but I feel like having a dependency on
>> LD_LIBRARY_PATH could bring up various issues in the future. This page I
>> found explains it pretty well, although with a slightly snarky attitude
>> ;-):
>>
>> http://linuxmafia.com/faq/Admin/ld-lib-path.html
>>
>
> Interesting. I didn't know about -rpath. This could solve this issue.
> I'm trying this now...
Indeed, by adding '-Wl,-rpath=<library_path>' to the LFLAGS in jcc/setup.py
one does not need to set LD_LIBRARY_PATH at all anymore. Not at build time,
not at runtime.
I just tested this on Ubuntu Gutsy with Sun Java 6. Below is my LFLAGS dict:
LFLAGS = {
'darwin': ['-framework', 'JavaVM'],
'linux2': ['-L/usr/lib/jvm/java-6-sun/jre/lib/i386', '-ljava',
'-Wl,-rpath=/usr/lib/jvm/java-6-sun/jre/lib/i386:/usr/lib/jvm/java-6-sun/jre/lib/i386/client'],
'win32': ['/LIBPATH:o:/Java/jdk1.6.0_02/lib', 'jvm.lib']
}
Thank you for the suggestion, I'm going to update the docs as well.
Andi..
More information about the pylucene-dev
mailing list