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

Bug#256283: [pylucene-dev] lucene, pylucene & debian packaging




One possibility is for Debian's lucene package to do both javac and
gcj compilation. It would provide both a java and native library
version of lucene. Then a separate pylucene package would handle swig
and creation of the python module. This would have the advantage of
making lucene available to C programmers as well as python
programmers.

So my questions are:

 1) Is this a reasonable approach?

Using a GCJ-compiled lucene library by embedding it into another non-java system has to be done with care. The GCJ/Java garbage collector doesn't keep track of java objects returned to the embedding system for which there is no reference in the java space. I had to work this around for PyLucene in the SWIG layer.

The value of a naked gcj-compiled lucene package is limited as, were it not for the need to patch it (see below), gcj compiling a java package is pretty trivial, and its direct usability, because of the GC issues, dubious.

 2) I think it would work if the gcj step is simple and easily
    separable. It would not work if the lucene sources need to be
    patched in a pylucene specific way. I'm concerned about the
    lucene.patches file and wonder if they can be merged with lucene
    upstream or migrated to PyLucene.i

The patches.lucene file is there because of bugs in GCJ, such as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15411, or differences in handling instantiation of inner classes. It is not there because of PyLucene's specific needs. Without these patches, GCJ crashes or the resulting object code is not functional.

Having the patches integrated into the Java Lucene project would probably be
met with resistance since, as far as I know, there is nothing wrong with their java code from a java perspective and, unless GCJ support became a priority for them, I don't see the Java Lucene project change their coding practices to accomodate GCJ's current limitations.

It is my hope that, as GCJ matures - version 3.5.0 looks very promising - all of these patches eventually become unnecessary.

 3) Is someone willing to help? I'm interested in native compilation
    in Debian's lucene package, but definitely need assistance.

I cannot help you with Debian specific issues as I don't have access to a Debian system myself and have no experience with it at all. I do most of my work on Mac OS X and have access to NetBSD, Red Hat and win2k systems. I can help you with non Debian-specific PyLucene or GCJ issues. What do you need ?

Andi..



Reply to: