[pylucene-dev] Unable to compile PyLucene-2.4.0-1

Andi Vajda vajda at osafoundation.org
Sun Nov 23 21:18:39 PST 2008


On Nov 23, 2008, at 21:12, "Aaron Lee" <waifunlee at gmail.com> wrote:

>
> On Sun, Nov 23, 2008 at 1:12 PM, Andi Vajda  
> <vajda at osafoundation.org> wrote:
>
> On Sun, 23 Nov 2008, Aaron Lee wrote:
>
> > I am on centos 5.2 x86_64 and failed on the first compilation in JCC
> > python setup.py build
> > running build
> > running build_py
> > copying jcc/config.py -> build/lib.linux-x86_64-2.4/jcc
> > copying jcc/classes/org/osafoundation/jcc/PythonVM.class ->
> > build/lib.linux-x86_64-2.4/jcc/classes/org/osafoundation/jcc
> > copying jcc/classes/org/osafoundation/jcc/PythonException.class ->
> > build/lib.linux-x86_64-2.4/jcc/classes/org/osafoundation/jcc
> > running build_ext
> > building '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 -m64 -mtune=generic -D_GNU_SOURCE -fPIC - 
> fPIC
> > -D_jcc_lib -I/usr/lib/jvm/java/include -I/usr/lib/jvm/java/include/ 
> linux
> > -I_jcc -Ijcc/sources -I/usr/include/python2.4 -c jcc/sources/ 
> JCCEnv.cpp -o
> > build/temp.linux-x86_64-2.4/jcc/sources/JCCEnv.o -DPYTHON
> > -fno-strict-aliasing
> > jcc/sources/JCCEnv.cpp: In member function 'virtual __jobject*
> > JCCEnv::deleteGlobalRef(__jobject*, int)':
> > jcc/sources/JCCEnv.cpp:210: error: invalid conversion from  
> '__jobject*' to
> > '__jweak*'
> > jcc/sources/JCCEnv.cpp:210: error:   initializing argument 1 of  
> 'void
> > _Jv_JNIEnv::DeleteWeakGlobalRef(__jweak*)'
> > error: command 'gcc' failed with exit status 1
> >
> > I did try searching on Google and no luck
> > There was another user having the same problem back in August
> > http://lists.osafoundation.org/pipermail/pylucene-dev/2008-August/002891.html
> >
> > Am I missing some environment variable settings?
>
> Are you building the latest from svn ?
>
> I got the jcc from PyLucene-2.4.0-1
>
>
> I remember adding the missing cast to jweak there (JCCEnv.cpp,  
> around line
> 210 in the call to DeleteWeakGlobalRef()).
> That error is not occurring everywhere, though. Adding this cast  
> solves the
> problem and doesn't seem to hurt elsewhere.
>
> I added the ugly typecast and now I got a new compilation error:
>
> python setup.py build
> running build
> running build_py
> copying jcc/config.py -> build/lib.linux-x86_64-2.4/jcc
> copying jcc/classes/org/osafoundation/jcc/PythonVM.class -> build/ 
> lib.linux-x86_64-2.4/jcc/classes/org/osafoundation/jcc
> copying jcc/classes/org/osafoundation/jcc/PythonException.class ->  
> build/lib.linux-x86_64-2.4/jcc/classes/org/osafoundation/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 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/lib/jvm/ 
> java/include -I/usr/lib/jvm/java/include/linux -I_jcc -Ijcc/sources - 
> I/usr/include/python2.4 -c jcc/sources/JArray.cpp -o build/ 
> temp.linux-x86_64-2.4/jcc/sources/JArray.o -DPYTHON -fno-strict- 
> aliasing
> jcc/sources/JArray.h:501: error: redefinition of 'class  
> JArray<signed char>'
> jcc/sources/JArray.h:355: error: previous definition of 'class  
> JArray<signed char>'
> jcc/sources/JArray.cpp:956: error: redefinition of 'PyObject*  
> JArray<signed char>::wrap()'
> jcc/sources/JArray.cpp:945: error: 'PyObject* JArray<signed  
> char>::wrap()' previously defined here
> error: command 'gcc' failed with exit status 1
>
> java -version
> java version "1.4.2"
> gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42)
>
> My guess is the GNU Java compiler has some incompatibility?

The GNU java compiler is not supported. Please use a Sun JDK or OpenJDK.

Andi..

>
> -Aaron
>
>
>
> Andi..
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/pylucene-dev/attachments/20081123/252f8c7b/attachment-0001.htm 


More information about the pylucene-dev mailing list