Re: PyLucene: How to package libraries that link against OpenJDK libraries?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Colin Walters wrote:
On Thu, May 22, 2008 at 5:33 PM, Felix Schwarz
<felix.schwarz@xxxxxxxxxxxxxx> wrote:
I'm trying to package JCC/PyLucene. Now that OpenJDK made it into Fedora
(and EPEL 5), PyLucene with JCC could possibly be included with Fedora.

Wow, JCC is terrifying.  Interacting with Lucene via Jython would be...saner =)

In my understanding Jython better suited/the best possibility if I want to call Python from Java code. If the main program is in Python, using Jython will restrict you on a Python feature set that is roughly the same as in Python 2.2.

This would make PyLucene worthless for many programmers - e.g. most of my libraries won't work as they require at least Python 2.3 (Python 2.2 did not even had "True" and "False"!) and a big percentage needs even 2.4 or 2.5.

So I think JCC is basically the right thing to do as this is the only way you can always use the latest Python features (even Python packages that are written in C) and the latest Java (GCJ always had threading issues and is generally hard to debug).

Furthermore using JCC you can even use Java from C++ without too much hassle - quite cool I think :-)

   d) JCC uses JNI so the library paths must be set correctly at runtime.
      Unfortunately, the OpenJDK package does not add its paths to
      /etc/ld.so.conf.d (did I miss something?) Is there another workaround
      besides using rpath (bad, see a) or filing a bug against OpenJDK?

Right now, you should hardcode the paths to the library in your package.  See:
http://fedoraproject.org/wiki/Packaging/Java#head-61a3ee0d05ff616ef9be2021b489610e036fd932
Specifically, "If the JNI-using code calls System.loadLibrary you'll
have to patch it to use System.load, passing it the full path to the
dynamic shared object."

For an example of this see
http://cvs.fedoraproject.org/viewcvs/devel/javasqlite/

Sorry, my wording was not detailed enough. JCC does "JNI the other way round" so it calls Java from C++. Therefore there is no System.loadLibrary which could be patched. Instead I have to rely on the standard linker configuration (or use rpath).

Felix Schwarz


--
Felix Schwarz
Dipl.-Informatiker

Gubener Str. 38
10243 Berlin
Germany

www.schwarz.eu - software development and consulting

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux