On Fri, 9 Jul 2010, Thomas Koch wrote:
trying to build Apache PyLucene 2.9.3 / 3.0.2 on Windows (Win32, Python 2.6,
Java 1.6, ant 1.8.0) fails for me with an error during "make" of PyLucene.
Could build JCC2.6 before with no problem.
Should be noted that I've built PyLucene 2.4 before (same machine) with no
problems (with Jcc 2.4 at that time).
There's lots of compiling going fine until the compilation of __init__.cpp
fails:
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD
/W3 /GS- /DNDEBUG -DPYTHON -DJCC_VER="2.6" "-IC:/Program
Files/Java/jdk1.6.0_06/include" "-IC:/Program
Files/Java/jdk1.6.0_06/include/win32" -Ibuild\_lucene
-IC:\Python26\lib\site-packages\jcc-2.6-py2.6-win32.egg\jcc\sources
-IC:\Python26\include -IC:\Python26\PC /Tpbuild\_lucene\__init__.cpp
/Fobuild\temp.win32-2.6\Release\build\_lucene\__init__.obj
__init__.cpp
[...]
build\_lucene\__init__.cpp(30) : warning C4530: C++-Handler verwendet, aber
Entladesemantik ist nicht aktiviert. Geben Sie /EHsc an.
f:\software\python\pylucene-2.9.3-1\build\_lucene\org/apache/lucene/search/CachingWrapperFilter$DeletesMode.h(32)
: error C2059: Syntaxfehler: 'Konstante'
f:\software\python\pylucene-2.9.3-1\build\_lucene\org/apache/lucene/search/CachingWrapperFilter$DeletesMode.h(32)
: error C2238: Unerwartete(s) Token vor ';'
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"'
failed with exit status 2
make: *** [compile] Error 1
[sorry about the german error message, seems MS localizes everything these
days ... it say "syntax error: 'constant'" and "unexpected token before ';'"]
My config (Makefile)
ANT=/cygdrive/f/devel/apache-ant-1.8.0/bin/ant
JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_06
PREFIX_PYTHON=/cygdrive/c/Python26
PYTHON=$(PREFIX_PYTHON)/python.exe
JCC=$(PYTHON) -m jcc.__main__
NUM_FILES=3
I'm using Cygwin to run make and MS Visual Studio 9.0 as C++ compiler.
BTW, the generated CPP code does seem okay to me - though it's been ages I've
been doing CPP coding...
Error at line #32
#31 static CachingWrapperFilter$DeletesMode *DYNAMIC;
#32 static CachingWrapperFilter$DeletesMode *IGNORE;
#33 static CachingWrapperFilter$DeletesMode *RECACHE;
WTF?
It is most likely that IGNORE is being defined to some int value in some
system header for this version of the compiler. I don't have this version of
MSVC so I can't verify this for sure but it's a common problem.
To work this around, add '--reserved IGNORE' to the jcc command line in
PyLucene's Makefile for this symbol to get decorated. If that fixes it, I'll
add it to the list of known reserved symbols in jcc's cpp.py file.
Andi..
Could it be that my CPP environment is broken? However building PyLucene2.4
with JCC2.6 still works with this cl.exe on older PyLucene versions (just ran
"make" in PyLucene2.4.1 again: completed!)
Any ideas?
best regards
Thomas