[pylucene-dev] JCC install errors

Andi Vajda vajda at osafoundation.org
Tue Feb 12 01:56:56 PST 2008



On Feb 11, 2008, at 23:57, Alessandro Magni <magni at inrim.it> wrote:

> Andi Vajda wrote:
>>
>>
>> On Feb 11, 2008, at 9:47, Andi Vajda <vajda at osafoundation.org> wrote:
>>
>>>
>>> On Feb 11, 2008, at 5:24, Alessandro Magni <magni at inrim.it> wrote:
>>>
>>>> Hello everybody,
>>>> I am not a python developer at all, but I badly need JCC  
>>>> installed (because I need PyLucene installed (because I need  
>>>> UpLib installed (...)))
>>>>
>>>> While compiling the just-downloaded JCC, I get immediately:
>>>>
>>>
>>> It looks like you might be picking up header files you shouldn't  
>>> that contain an incorrect definition of jbyte.
>>
>> In particular, how many versions of jni.h do you have installed ?
>> Are you sure that you're picking up the one for sun java 6 ?
>
> Sorry, I pasted the build result from a previous run ...
> With the correct inlude/lib direcories set in setup.py the result  
> follows, and as you can see the result is the same:
>
>
> [root at lambda2 jcc]# python setup.py build
> running build
> running build_py
> copying jcc/config.py -> build/lib.linux-i686-2.5/jcc
> running build_ext
> building 'jcc._jcc' extension
> 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 -I/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/ 
> include -I/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/include/linux -I_jcc - 
> Ijcc/sources -I/usr/include/python2.5 -c jcc/sources/jcc.cpp -o  
> build/temp.linux-i686-2.5/jcc/sources/jcc.o -DPYTHON -fno-strict- 
> aliasing
> jcc/sources/JArray.h:166: error: redefinition of 'class  
> JArray<signed char>'
> jcc/sources/JArray.h:74: error: previous definition of 'class  
> JArray<signed char>'
> jcc/sources/jcc.cpp: In function 'PyObject* make_descriptor(jbyte)':
> jcc/sources/jcc.cpp:183: error: redefinition of 'PyObject*  
> make_descriptor(jbyte)'
> jcc/sources/jcc.cpp:168: error: 'PyObject* make_descriptor 
> (jboolean)' previously defined here
> error: command 'gcc' failed with exit status 1
>
>
> The search for the include file you suggested reports one hit in / 
> usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/include/jni.h, and nothing else  
> under the possible other include dirs (., /usr/include/python2.5, / 
> usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/include/linux)
>
>
> My config:
>
> [root at lambda2 ~]# uname -a
> Linux lambda2.intra.inrim.it 2.6.23.14-107.fc8 #1 SMP Mon Jan 14  
> 21:37:30 EST 2008 i686 i686 i386 GNU/Linux
>
> (Fedora FC8)
>
>
> [root at lambda2 ~]# java -version
> java version "1.7.0"
> IcedTea Runtime Environment (build 1.7.0-b21)
> IcedTea Client VM (build 1.7.0-b21, mixed mode)
>
> [root at lambda2 ~]# gcc --version
> gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)
>
> [root at lambda2 ~]# python --version
> Python 2.5.1
>
>
> Still wondering what's going on...

Your include path shows that you're using the gcj include files. Not  
good.

Your path seems to show that you're using the Iced Tea VM, a fork of  
Sun's JVM openjdk project which is a lot better already although I've  
not tested build 21. I've built and tested build 23.

Either way, using Sun jdk 5 or 6 should solve your issues.

In any case, make sure that the JVM you're using corresponds to the  
header files and libraries you're compiling PyLucene with.

Using jcc-pylucene with gcj is untested and not supported. Use sun jdk  
5 or 6 or openjdk build >= 23 instead.

Andi..

>
> Alessandro
>
>
>>>
>>>
>>> Andi..
>>>
>>>>
>>>> [root at lambda2 JCC-1.7]# python setup.py build
>>>> running build
>>>> running build_py
>>>> copying jcc/config.py -> build/lib.linux-i686-2.5/jcc
>>>> running build_ext
>>>> building 'jcc._jcc' extension
>>>> 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 -I/usr/lib/jvm/java-6-sun/ 
>>>> include -I/usr/lib/jvm/java-6-sun/include/linux -I_jcc -Ijcc/ 
>>>> sources -I/usr/include/python2.5 -c jcc/sources/jcc.cpp -o build/ 
>>>> temp.linux-i686-2.5/jcc/sources/jcc.o -DPYTHON -fno-strict-aliasing
>>>> jcc/sources/JArray.h:166: error: redefinition of 'class  
>>>> JArray<signed char>'
>>>> jcc/sources/JArray.h:74: error: previous definition of 'class  
>>>> JArray<signed char>'
>>>> jcc/sources/jcc.cpp: In function 'PyObject* make_descriptor 
>>>> (jbyte)':
>>>> jcc/sources/jcc.cpp:183: error: redefinition of 'PyObject*  
>>>> make_descriptor(jbyte)'
>>>> jcc/sources/jcc.cpp:168: error: 'PyObject* make_descriptor 
>>>> (jboolean)' previously defined here
>>>> error: command 'gcc' failed with exit status 1
>>>>
>>>>
>>>> Please, tell me which other info you need, I am really in dire  
>>>> straits...
>>>>
>>>> thank you !
>>>>
>>>>
>>>> alessandro
>>>>
>>>> -- 
>>>>
>>>> ~~~ 
>>>> ~~~ 
>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> /  Dr.Alessandro Magni
>>>> \        Electromagnetics Division
>>>> /        INRiM Strada delle Cacce 91, 10135 Torino (ITALIA)
>>>> \        Email magni at inrim.it
>>>> /        Tel: 0039-011-3919821  Fax: 0039-011-3919834
>>>> \        URL http://www.inrim.it/~magni
>>>> / Our business in life is not to succeed but to continue to fail  
>>>> \ in high spirits.  -- Robert Louis Stevenson
>>>> ~~~ 
>>>> ~~~ 
>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>
>>>> _______________________________________________
>>>> pylucene-dev mailing list
>>>> pylucene-dev at osafoundation.org
>>>> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>>> _______________________________________________
>>> pylucene-dev mailing list
>>> pylucene-dev at osafoundation.org
>>> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>> _______________________________________________
>> pylucene-dev mailing list
>> pylucene-dev at osafoundation.org
>> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>>
>
>
> -- 
>
> ~~~ 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /  Dr.Alessandro Magni
> \        Electromagnetics Division
> /        INRiM Strada delle Cacce 91, 10135 Torino (ITALIA)
> \        Email magni at inrim.it
> /        Tel: 0039-011-3919821  Fax: 0039-011-3919834
> \        URL http://www.inrim.it/~magni
> / Our business in life is not to succeed but to continue to fail \  
> in high spirits.  -- Robert Louis Stevenson
> ~~~ 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>


More information about the pylucene-dev mailing list