On May 3, 2012, at 14:35, Jeremy Michels <jeremy.d.mich...@gmail.com> wrote:
> Thanks again for your help. I got the latest JCC and this seemed to > solve the problem, as Andi suggested. However, running 'make' then > gave me the error: > > Traceback (most recent call last): > File "C:\Program Files\Python\lib\runpy.py", line 162, in _run_module_as_main > "__main__", fname, loader, pkg_name) > File "C:\Program Files\Python\lib\runpy.py", line 72, in _run_code > exec code in run_globals > File "C:\Program > Files\Python\lib\site-packages\jcc-2.12-py2.7-win-amd64.egg\j > cc\__main__.py", line 104, in <module> > cpp.jcc(sys.argv) > File "C:\Program > Files\Python\lib\site-packages\jcc-2.12-py2.7-win-amd64.egg\j > cc\cpp.py", line 644, in jcc > raise ValueError, (cls, 'python class name already in use, use --rename', > na > me, pythonNames[name]) > ValueError: (<Class: class org.apache.lucene.analysis.de.GermanStemmer>, > 'python > class name already in use, use --rename', u'GermanStemmer', <Class: class > org.t > artarus.snowball.ext.GermanStemmer>) > Makefile:312: recipe for target `compile' failed > make: *** [compile] Error 127 > > I couldn't figure out how to correctly add the rename argument in the > Makefile. > Eventually I got frustrated, and just edited out the line > (line 644) raising the exception in the cpp.py file, adding a 'pass' > statement instead. That's going to be causing random failures and crashes. You should instead use the latest PyLucene code in the branch_3x branch. This is turning into the 3.6 release shortly. Andi.. > Then the installation seemed to go ahead fine. > However, the wisdom of my workaround seemed questionable, at best. > What are your thoughts? What is the appropriate syntax for 'rename' ? > > Thanks again, > > Jeremy > > > On Thu, May 3, 2012 at 7:45 AM, Andi Vajda <va...@apache.org> wrote: >> Hi Jeremy, >> >> On Apr 30, 2012, at 9:19, Jeremy Michels <jeremy.d.mich...@gmail.com> wrote: >> >>> Thank you for sharing your expertise on this matter. I was unable to >>> use the pre-built binaries as I am using a 64-bit system (attempting >>> to do so would results in the error: ImportError: DLL load failed: %1 >>> is not a valid Win32 application). >>> >>> This is my setup: >>> Windows 7 (64-bit) >>> Python 2.7.2 (64 bit) >>> Java 1.7 (jdk1.7.0) >>> Ant 1.8.3 >>> Windows SDK C/C++ compiler (v7.0) >>> Cygwin >>> >>> I was able to build JCC without any apparent problems. Below are my >>> Makefile settings: >>> >>> ANT=/cygdrive/c/Program\ Files/Ant/apache-ant-1.8.3/bin/ant >>> JAVA_HOME=C:\\Program Files\\Java\\jdk1.7.0 >>> PREFIX_PYTHON=/cygdrive/c/Program\ Files/Python >>> PYTHON=$(PREFIX_PYTHON)/python.exe >>> JCC=$(PYTHON) -m jcc --shared >>> NUM_FILES=4 >>> >>> Previously I had the "--find-jvm-dll" option included on the "JCC" >>> line, but this gave me the error "ValueError: jvm.dll could not be >>> found," so I removed the option and added the location of the jvm.dll >>> file to my path and I no longer received this error. >>> >>> However, running "make" with the specifications given above results in >>> the error: >>> >>> c:\users\jeremy\downloads\pylucene-3.5.0-3\build\_lucene\[F.h(1) : fatal >>> error C >> >> I've seen that error and it seems to be a bug in JCC related to using Java 7 >> and generics (which is fine). >> >> I fixed that bug a couple of weeks ago. You should get the latest sources >> from the branch_3_x jcc sources or wait for the PyLucene 3.6 release which >> should happen within a week. >> >> Andi.. >> >>> 1016: #if[n]def expected an identifier >>> error: command 'cl.exe' failed with exit status 2 >>> Makefile:312: recipe for target `compile' failed >>> make: *** [compile] Error 1 >>> >>> To be honest, I don't really know what this means and am feeling a bit >>> out of my league at this point. However, any further guidance you >>> might have would be appreciated. >>> >>> Best Regards, >>> >>> Jeremy