Hey, I'm trying to build JCC on Python 2.4.3 (CentOS 5). However during the compilation I get this error: 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_java_generics -DJCC_VER="2.13" -I/usr/lib/jvm/java-openjdk/include -I/usr/lib/jvm/java-openjdk/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 -O0 jcc/sources/JArray.h:44: error: 'Py_ssize_t' does not name a type jcc/sources/JArray.h:75: error: expected ';' before '(' token jcc/sources/JArray.cpp:1213: error: expected `;' at end of input jcc/sources/JArray.cpp:1213: error: expected `}' at end of input jcc/sources/JArray.h: In constructor 'JArray<T>::JArray(_jobject*)':
Well, I could work around that one with a patch (see attached) but afterwards compilation still fails: 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_java_generics -DJCC_VER="2.13" -I/usr/lib/jvm/java-openjdk/include -I/usr/lib/jvm/java-openjdk/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 -O0 _jcc/java/lang/Class.h:48: error: ISO C++ forbids declaration of 'JArray' with no type _jcc/java/lang/Class.h:48: error: expected ';' before '<' token _jcc/java/lang/Class.h:49: error: ISO C++ forbids declaration of 'JArray' with no type _jcc/java/lang/Class.h:49: error: expected ';' before '<' token I'm using GCC 4.1.2: gcc-4.1.2-52.el5_8.1 gcc-c++-4.1.2-52.el5_8.1 Any idea what I'm doing wrong? Do you need more info? fs
diff -r ed402f605ae4 jcc/sources/JArray.h --- a/jcc/sources/JArray.h Tue Jun 12 12:02:22 2012 +0200 +++ b/jcc/sources/JArray.h Tue Jun 12 12:04:05 2012 +0200 @@ -18,6 +18,7 @@ #ifdef PYTHON #include <Python.h> #include "macros.h" +#include "functions.h" extern jobjectArray fromPySequence(jclass cls, PyObject *sequence); extern PyObject *PyErr_SetJavaError();