[pylucene-dev] Re: using JCC

Andi Vajda vajda at osafoundation.org
Wed Feb 20 00:48:10 PST 2008


On Feb 20, 2008, at 0:35, Andi Vajda <vajda at osafoundation.org> wrote:

>
> On Feb 19, 2008, at 20:59, Bill Janssen <janssen at parc.com> wrote:
>
>> OK, I discovered the secret --classpath switch to JCC, and was able  
>> to
>> generate the stubs.  However, when I tried to add --build, I run into
>> the darn Linux gcj problem:
>>
>> % python -m jcc --classpath /tmp/Support.jar --jar /tmp/ 
>> GoodStuff.jar --files 1 --python GoodStuff --build
>> running build_ext
>> building 'GoodStuff._GoodStuff' extension
>> creating build/temp.linux-i686-2.5
>> creating build/temp.linux-i686-2.5/usr
>> creating build/temp.linux-i686-2.5/usr/lib
>> creating build/temp.linux-i686-2.5/usr/lib/python2.5
>> creating build/temp.linux-i686-2.5/usr/lib/python2.5/site-packages
>> creating build/temp.linux-i686-2.5/usr/lib/python2.5/site-packages/ 
>> JCC-1.7-py2.5-linux-i686.egg
>> creating build/temp.linux-i686-2.5/usr/lib/python2.5/site-packages/ 
>> JCC-1.7-py2.5-linux-i686.egg/jcc
>> creating build/temp.linux-i686-2.5/usr/lib/python2.5/site-packages/ 
>> JCC-1.7-py2.5-linux-i686.egg/jcc/sources
>> creating build/temp.linux-i686-2.5/build
>> creating build/temp.linux-i686-2.5/build/_GoodStuff
>> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,- 
>> D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp- 
>> buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind- 
>> tables -D_GNU_SOURCE -fPIC -fPIC -DPYTHON=1 -I/usr/java/jdk-1.6/ 
>> include -I/usr/java/jdk-1.6/include/linux -Ibuild/_GoodStuff -I/usr/ 
>> lib/python2.5/site-packages/JCC-1.7-py2.5-linux-i686.egg/jcc/ 
>> sources -I/usr/include/python2.5 -c /usr/lib/python2.5/site- 
>> packages/JCC-1.7-py2.5-linux-i686.egg/jcc/sources/jcc.cpp -o build/ 
>> temp.linux-i686-2.5/usr/lib/python2.5/site-packages/JCC-1.7-py2.5- 
>> linux-i686.egg/jcc/sources/jcc.o -fno-strict-aliasing
>> /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ 
>> gcj/array.h:19: error: Java class %Gâ€˜%@__JArray%Gâ€™% 
>> @ cannot have an implicit non-trivial destructor
>> /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ 
>> gcj/array.h:59: error: conflicting declaration %Gâ€˜%@typedef  
>> class __JArray* jarray%Gâ€™%@
>> /usr/java/jdk-1.6/include/jni.h:68: error: %Gâ€˜%@jarray% 
>> Gâ€™%@ has a previous declaration as %Gâ€˜%@typedef  
>> class _jarray* jarray%Gâ€™%@
>> /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/ 
>> gcj/array.h:60: error: conflicting declaration %Gâ€˜%@typedef  
>> class JArray<_jobject*>* jobjectArray%Gâ€™%@
>> ...
>>
>> Seems like a bug somewhere in JCC.  On the other hand, I was able to
>> build and install PyLucene with this JCC.  Any idea what's going on?
>
> The error is pretty clear about what's going on. You're picking up a  
> gcj header file. For instance, how many jni.h files are there on  
> your system ?
> In particular, is there one being picked up before the JDK's because  
> it's in /usr/include or somesuch ?
>

This error has been linked before to gcj being the default java  
install on your Linux setup. I don't know how this is done on redhat,  
which I don't use, but on Ubuntu the update-java-alternative command  
let's you choose which Java install should be the default one, moving  
gcj out of the way.

Andi..



> Andi..
>
>>
>>
>> Bill
>>
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev


More information about the pylucene-dev mailing list