Olly Betts
2006-Mar-16 05:30 UTC
[Xapian-discuss] Bindings, snapshots, and automated tinderbox builds
This mail is a bit of a potpourri, but there's a theme of sorts so it seems better to collect these things together rather than sending N separate small messages. I added the bindings to the the automated tinderbox builds a few weeks ago. It's thrown up a few portability issues which I've fixed, but there are still some build/test failures on the bindings which I've not analysed yet. Some could be problems in the autobuild framework rather than the bindings though. http://www.oligarchy.co.uk/tinderbox/xapian/status.html There's one which I have analysed but not fixed is that bindings don't work with Python 2.1 currently - "make check" segfaults while python is cleaning up before exiting (at least judging from the backtrace). Is anyone using Xapian with Python 2.1? It's a bit of an old version these days (the last 2.1 release was 2.1.3 just under 4 years ago), so I'm tempted to declare it "currently unsupported" rather than spend a lot of time trying to figure out what's going wrong (I think our support has been broken for over 6 months without anyone reporting it). I'd leave the build machinery in place in case anyone wants to fix it in the future (it requires separately generated SWIG wrappers). I've also added the perl Search::Xapian bindings to the snapshot build script so I can test that in the tinderbox too (but I still need to tweak the autobuild scripts to cope with non-matching SVN revisions because it comes from a different repo). But a side benefit is that you can now download the very latest SVN version of Search::Xapian which may have more features (and perhaps more bugs) than the latest official release on CPAN: http://www.oligarchy.co.uk/xapian/trunk/ And lastly after a bit of quick prototyping and some discussions with Eric B. Ridge, I'm intending to try to move the Java bindings over to use SWIG. SWIG's Java support seems to have matured and the latest release allows you to automatically rename methods to match Java's conventions (like we now do for C#). It's currently rather labour-intensive to add a new method to the JNI wrappers, whereas with SWIG it's usually just a matter of cut-and-pasting the method prototype into xapian.i, and that work already gets done for the other languages. As a result, the Java wrappers don't wrap a number of newer API methods whereas the SWIG wrappers are close to complete. SWIG also generates a smaller .so glue library, and supports generating GCJ's CNI wrappers as an alternative to Sun's JNI, which gives more efficient wrappers if you're using GCJ: http://gcc.gnu.org/java/faq.html#2_2 http://gcc.gnu.org/java/faq.html#2_3 It's probably not going to happen instantly though - this is really just an FYI, and an opportunity for anyone who thinks it's a bad idea to speak up (though if we don't do this, we need someone to volunteer to write all the JNI code to wrap the missing classes and methods...) Cheers, Olly
Olly Betts
2006-Apr-01 17:10 UTC
Python 2.1 (was Re: [Xapian-discuss] Bindings, snapshots, and automated tinderbox builds)
On Thu, Mar 16, 2006 at 05:30:24AM +0000, Olly Betts wrote:> There's one which I have analysed but not fixed is that bindings don't > work with Python 2.1 currently - "make check" segfaults while python is > cleaning up before exiting (at least judging from the backtrace).I just took another look at this. I'm not seeing the segfault now, and the only thing stopping Python 2.1 passing "make check" was that the new "Pythonic iterators" require Python 2.2 to work. I suspect the segfault to be because I hadn't run "make clean" properly when switching my tree from Python 2.2 to 2.1. Cheers, Olly