lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Chyla <>
Subject Problem loading jcc from java : undefined symbol: PyExc_IOError
Date Mon, 14 Feb 2011 23:43:04 GMT
Hello Andi, all,

The python embedded in Java works really well on MacOsX and also
Ubuntu. But I am trying hard to make it work also on Scientific Linux
(SLC5) with *statically* built Python. The python is a build from

So far, I managed to build all the needed extensions (jcc, lucene,
solr) and I can run them in python, but when I try to start the java
app and use python, I get:

SEVERE: org.apache.jcc.PythonException:
undefined symbol: PyExc_IOError

I understand, that the missing symbol PyExc_IOError is in the static
python library:

bash-3.2$ nm /afs/
| grep IOError
0000000000004120 D PyExc_IOError
0000000000004140 d _PyExc_IOError
                 U PyExc_IOError
                 U PyExc_IOError
                 U PyExc_IOError
                 U PyExc_IOError
                 U PyExc_IOError
                 U PyExc_IOError
                 U PyExc_IOError

So when building JCC, I build with these arguments:

lflags  +  ['-lpython%s.%s' %(sys.version_info[0:2]),

I just found instructions at:
I don't really understand g++, but the symbol is there after the compilation

bash-3.2$ nm /afs/
| grep IOError
0000000000352240 D PyExc_IOError
0000000000352260 d _PyExc_IOError

And when starting java, I do

The code works find on mac (python 2.6) and ubuntu (python2.6), but
not this statically linked python2.5 - would you know what I can try?



PS: I tried several compilations, but I was usually re-compiling JCC
without building lucene etc again, I hope that is not the problem.

View raw message