[pylucene-dev] Re: using JCC
vajda at osafoundation.org
Wed Feb 20 15:34:36 PST 2008
On Wed, 20 Feb 2008, Bill Janssen wrote:
>> Taking a closer look at the error you sent me earlier, it seems to me that
>> the correct jni.h file is picking up the wrong array.h file. So the bug is
>> clearly not in JCC but either in your system's setup or in jdk 1.6's jni.h
> Unfortunately, every Linux platform I've ever seen is infected with a
> gcj install. So I'd like to find out how to work around it, rather
> than trying to eradicate it.
>> I'm hoping there
>> is a command like the one on Ubuntu, update-java-alternative, that does this
>> cleanly. Otherwise, you might want to consider reinstalling gcc by excluding
> Yeah, except that I don't want to devote my life to finding out how to
> be a sysadmin on all the various flavors of Linux. I'd rather have
> JCC control the build environment so that the bad gcj headers and/or
> libraries don't get accidentally found.
As far as I know, JCC doesn't control that, gcc does.
If you tell gcc not to pick system or compiler header files (for which there
is a flag, I'm pretty sure) then you're going to have other problems.
JCC can't workaround your faulty compiler.
>>> I have a hypothesis: if you specify "--package java.lang", header
>>> files are generated, which are found before the gcj header files, so
>>> things work. If you don't, the bad gcj header files are found. I'll
>>> try it and report back.
> Sure enough, that's the difference. Adding "--package java.lang" to
> the "python -m jcc" line, as PyLucene does, somehow changes the gcc
> command line, and things compile.
No, it just causes header files to be found that are missing otherwise or
incorrect. The bug in JCC could be that these files are required and not
optional. I wonder if the gcj ones were not present if this bug would be
replaced by a missing header error. It'd be interesting to know which header
if causing this. JCC is already generating some wrappers for essential JRE
classes like Object and Class. Maybe more are required.
I'm still not convinced it's a JCC bug, though :)
Without clearing out gcj on your system, there's no way to find out, I
>From the earlier stack trace you sent it seems that jdk 1.6's jni.h is
pulling a bogus array.h file. I'd be curious to know what that line of code
in jni.h looks like.
More information about the pylucene-dev