[pylucene-dev] Re: experiences with --shared on Linux
vajda at osafoundation.org
Tue Mar 11 18:32:51 PDT 2008
On Tue, 11 Mar 2008, Bill Janssen wrote:
>>> So there's no pointer that an extension can use to access libjcc.so.
>>> The "-rpath" path needs to be longer. Or, you could add the location
>>> of libjcc.so dynamically to it when you stub a jar file with JCC.
>> If you add it to LFLAGS before building JCC, it'll be there too.
> Yes, but this is the wrong place to do it. It means you have to guess
> what the installed location will be. Better to do it dynamically by
> JCC itself when stubbing another extension, *after* JCC is installed.
>> In other words, you need to add another -rpath thingie in there or better
>> yet, just add the path to libjcc.so in the existing rpath argument, after
>> another ':'.
> Yes, but it's just not right to do it manually, when it could be done
> automatically by the 'install' command.
Ahhhh, that's where things get more complicated. setup.py doesn't know about
rpath. rpath is a linux-specific thing. It applies it only because "you"
told it to with the LFLAGS. "you" being you here either explicitely or
implicitely by accepting the defaults I put into setup.py.
This is why I'm saying "you" need to add another path for libjcc.so in
there. This works more magically on Mac because the rpath equivalent is put
into libjcc.dylib itself by "you" as well (the -install_name ld arg).
JCC can guess the location of where libjcc.so is installed but it doesn't
know how to tell the linker about rpath unless distutils has an option for
this that I don't know about.
More information about the pylucene-dev