Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
.a(tlssup.o):tlssup .c:(.text+0xa8): undefined reference to `LoadLibraryA@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlssup.o):tlssup .c:(.text+0xc8): undefined reference to `GetProcAddress@8' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlssup.o):tlssup .c:(.text+0xe5): undefined reference to `GetProcAddress@8' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlssup.o):tlssup .c:(.text+0x15f): undefined reference to `FreeLibrary@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(pseudo-reloc.o): pseudo-reloc.c:(.text+0x89): undefined reference to `VirtualQuery@12' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(pseudo-reloc.o): pseudo-reloc.c:(.text+0xbe): undefined reference to `VirtualProtect@16' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(pseudo-reloc.o): pseudo-reloc.c:(.text+0xfe): undefined reference to `VirtualProtect@16' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x20): undefined reference to `EnterCriticalSection@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x37): undefined reference to `TlsGetValue@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x41): undefined reference to `GetLastError@0' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x64): undefined reference to `LeaveCriticalSection@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0xc2): undefined reference to `DeleteCriticalSection@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0xf8): undefined reference to `InitializeCriticalSection@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x138): undefined reference to `EnterCriticalSection@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x167): undefined reference to `LeaveCriticalSection@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x18b): undefined reference to `LeaveCriticalSection@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x1e7): undefined reference to `EnterCriticalSection@4' c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.a(tlsthrd.o):tlsth rd.c:(.text+0x204): undefined reference to `LeaveCriticalSection@4' collect2: ld returned 1 exit status error: command 'g++' failed with exit status 1 -Original Message- From: Bill Janssen [mailto:jans...@parc.com] Sent: Wednesday, December 01, 2010 10:19 PM To: pylucene-...@lucene.apache.org Cc: jans...@parc.com Subject: Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7 Andi Vajda va...@apache.org wrote: I believe MSVC 2008 == 9.0 but I could be wrong. I also seem to recall that Python 2.7 requires that version. So you should also try Python 2.6 on Win 7. I asked about this on the mingw list, with the following result: Charles Wilson cwils...@users.sourceforge.net wrote: The official python.org win32 python26 distribution uses the msvcr90.dll libc; anything compiled with mingw uses the msvcrt.dll, and THAT may be the problem. See here: http://jove.prohosting.com/iwave/ipython/issues.html ... There is a way to hack your mingw installation to use the msvcr90.dll runtime, but I've never tried it myself. See this wiki page: http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file I'll try that -- getting mingw to use the same C library that Python uses. Looks like you can do an in-place update -- the pyMinGW toolkit provides a tool which does that. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Andi Vajda va...@apache.org wrote: I believe MSVC 2008 == 9.0 but I could be wrong. I also seem to recall that Python 2.7 requires that version. So you should also try Python 2.6 on Win 7. I asked about this on the mingw list, with the following result: Charles Wilson cwils...@users.sourceforge.net wrote: The official python.org win32 python26 distribution uses the msvcr90.dll libc; anything compiled with mingw uses the msvcrt.dll, and THAT may be the problem. See here: http://jove.prohosting.com/iwave/ipython/issues.html ... There is a way to hack your mingw installation to use the msvcr90.dll runtime, but I've never tried it myself. See this wiki page: http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file I'll try that -- getting mingw to use the same C library that Python uses. Looks like you can do an in-place update -- the pyMinGW toolkit provides a tool which does that. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Andi Vajda va...@apache.org wrote: Try without --find-jvm-dll and setting the Path in the shell first. Yes, I've tried it both ways -- same problem. the Web seems to indicate that this problem comes from mixing malloc and free calls from two different libc's. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
On Tue, 30 Nov 2010, Bill Janssen wrote: Andi Vajda va...@apache.org wrote: Try without --find-jvm-dll and setting the Path in the shell first. Yes, I've tried it both ways -- same problem. the Web seems to indicate that this problem comes from mixing malloc and free calls from two different libc's. in your case, three no ? Andi..
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Andi Vajda va...@apache.org wrote: So you're mixing three compiler runtimes ? (7.1, 9.0, mingw-gcc) Yes, that's right. Although the promise of MinGW is that they build MSVC-compatible programs which link with the standard MSVC libraries. In fact, when you run the Windows equivalent of ldd on _jcc.pyd, you see that it doesn't link against any MinGW libs. So I think it's really just two. Seems to work fine on my XP box with Python 2.6. I'll check to see if Python 2.6 was built against MSVCR71. I got Python 2.7 binaries from python.org and they're built with MSVC 2008. I built PyLucene/JCC with MSVC 2008. I got JDK 1.6.0_22 from Oracle this week-end. I don't what it's built with. I ran depends.exe on it; it links against MSVCR71 (don't know which version of MSVC that corresponds to). Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Andi Vajda va...@apache.org wrote: Also, note how version 9 of msvcrt.dll is on the stack. Is that what you'd expect from your mingw build ? Yes, here's the somewhat elided link line: C:\MinGW\bin\g++.exe -mno-cygwin -shared -s build\temp.win32-2.7\Release\jcc\sources\jcc.o [...] build\temp.win32-2.7\Release\_jcc\java\util\iterator.o build\temp.win32-2.7\Release\jcc\sources\_jcc.def -Lc:\Python27\libs -Lc:\Python27\PCbuild -lpython27 -lmsvcr90 -o build\lib.win32-2.7\jcc\_jcc.pyd -LC:\Program Files (x86)\Java\jdk1.6.0_22/lib -ljvm -Wl,--enable-auto-import -Wl,-S Presumably, that -lmsvcr90 comes from the Python config via setuptools? What was your python built with ? It's the standard version from python.org. Running depends on it says: c:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\MSVCR90.DLL I see that Java seems to be built with msvcr71.dll. Is that a problem? Why don't you see this on your machine? Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Andi Vajda va...@apache.org wrote: I just tried this myself By this, do you mean 64-bit Windows 7, or Python 2.7? and it seems that with Python 2.7 __name__ is never equal to '__main__' in jcc's __init__.py. So, jcc.__main__ is never imported implicitely from __init__.py and hence --find-jvm-dll is ineffective. I moved the --find-jvm-dll trickery to __init__.py and that seems to solve the problem. Of course, this is all masked if the PATH already contains the JRE directories. Andi.. Thanks. Though I thought that the --find-jvm-dll switch only worked if it was explicitly specified, which I wasn't doing. So while that's one Python 2.7 issue, I don't think that's the problem I was seeing, right? I'm going to go back to 32-bit XP, and get things working with Python 2.7 on that platform. Once I have that, I'll go back to 64-bit Windows 7. Bill I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache-ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\\win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
On Nov 29, 2010, at 9:45, Bill Janssen jans...@parc.com wrote: Andi Vajda va...@apache.org wrote: I just tried this myself By this, do you mean 64-bit Windows 7, or Python 2.7? Both. 64 bit Windows 7, with Python 2.7 and Java 1.6.0_22 both 32-bit. and it seems that with Python 2.7 __name__ is never equal to '__main__' in jcc's __init__.py. So, jcc.__main__ is never imported implicitely from __init__.py and hence --find-jvm-dll is ineffective. I moved the --find-jvm-dll trickery to __init__.py and that seems to solve the problem. Of course, this is all masked if the PATH already contains the JRE directories. Andi.. Thanks. Though I thought that the --find-jvm-dll switch only worked if it was explicitly specified, which I wasn't doing. So while that's one Python 2.7 issue, I don't think that's the problem I was seeing, right? Yes, it only kicks in if used explicitely but didn't work. Putting the jre/bin and jre/bin/client dirs on PATH also works around the problem but masks the --find-jvm-dll problem. I'm going to go back to 32-bit XP, and get things working with Python 2.7 on that platform. Once I have that, I'll go back to 64-bit Windows 7. I don't think that makes any difference. I think (but I could be wrong) that the issue is with Python 2.7 and the value of __name__ in __init__.py when invoking a package via -m. Andi.. Bill I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c: \Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys \1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache- ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c: \Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6- py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc \__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6- py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages \jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc \config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7- win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site- packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\ \include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\ \win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '- ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Andi Vajda va...@apache.org wrote: I just tried this myself By this, do you mean 64-bit Windows 7, or Python 2.7? Both. 64 bit Windows 7, with Python 2.7 and Java 1.6.0_22 both 32-bit. OK, I'll try it again on Win 7. I'll use a checkout of the PyLucene trunk instead of a packaged tar file. Don't use trunk, use HEAD of whatever branch you normally use, 2_9, 3_0, etc... The 2.9.4 and 3.0.3 releases are ready to go, pending Lucene Core's. OK, I checked out branches/pylucene_3_0 on my Win 7 machine. Same problem. Here's the Makefile tranche: # Windows (Win32, Python 2.7, Java 1.6, ant 1.8.1, Java not on PATH) PREFIX_PYTHON=/c/Python27 ANT=JAVA_HOME=c:\\Program Files (x86)\\Java\\jdk1.6.0_22 /c/Program Files/apache-ant-1.8.1/bin/ant PYTHON=$(PREFIX_PYTHON)/python.exe JCC=$(PYTHON) -m jcc --shared --find-jvm-dll NUM_FILES=3 JCC builds and installs fine, The Java code builds just fine, but when I get to generating PyLucene, I get this: $ make /c/Python27/python.exe -m jcc --shared --find-jvm-dll --jar lucene-java-3.0.3/build/lucene-core-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/snowball/lucene-snowball-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/analyzers/common/lucene-analyzers-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/regex/lucene-regex-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/memory/lucene-memory-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/highlighter/lucene-highlighter-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/queries/lucene-queries-3.0.3.jar --jar build/jar/extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParser.QueryParserTokenMana ger --exclude org.apache.lucene.queryParser.ParseException --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.3 --module python/collections.py --files 3 --build make: *** [compile] Error 255 $ When I run with -v, I see this: import runpy # precompiled from c:\Python27\lib\runpy.pyc import imp # builtin # c:\Python27\lib\pkgutil.pyc matches c:\Python27\lib\pkgutil.py import pkgutil # precompiled from c:\Python27\lib\pkgutil.pyc import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py import jcc # premake: *** [compile] Error 255 I can run jcc on its own: $ python -m jcc --help for instance shows me the usage text. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Bill Janssen jans...@parc.com wrote: Andi Vajda va...@apache.org wrote: I just tried this myself By this, do you mean 64-bit Windows 7, or Python 2.7? Both. 64 bit Windows 7, with Python 2.7 and Java 1.6.0_22 both 32-bit. OK, I'll try it again on Win 7. I'll use a checkout of the PyLucene trunk instead of a packaged tar file. Don't use trunk, use HEAD of whatever branch you normally use, 2_9, 3_0, etc... The 2.9.4 and 3.0.3 releases are ready to go, pending Lucene Core's. OK, I checked out branches/pylucene_3_0 on my Win 7 machine. Same problem. Here's the Makefile tranche: # Windows (Win32, Python 2.7, Java 1.6, ant 1.8.1, Java not on PATH) PREFIX_PYTHON=/c/Python27 ANT=JAVA_HOME=c:\\Program Files (x86)\\Java\\jdk1.6.0_22 /c/Program Files/apache-ant-1.8.1/bin/ant PYTHON=$(PREFIX_PYTHON)/python.exe JCC=$(PYTHON) -m jcc --shared --find-jvm-dll NUM_FILES=3 JCC builds and installs fine, The Java code builds just fine, but when I get to generating PyLucene, I get this: $ make /c/Python27/python.exe -m jcc --shared --find-jvm-dll --jar lucene-java-3.0.3/build/lucene-core-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/snowball/lucene-snowball-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/analyzers/common/lucene-analyzers-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/regex/lucene-regex-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/memory/lucene-memory-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/highlighter/lucene-highlighter-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/queries/lucene-queries-3.0.3.jar --jar build/jar/extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParser.QueryParserTokenMa nager --exclude org.apache.lucene.queryParser.ParseException --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.3 --module python/collections.py --files 3 --build make: *** [compile] Error 255 $ Ran it under gdb, which provides this tidbit: (gdb) run Starting program: c:\Python27/python.exe -m jcc --shared --compiler mingw32 --jar lucene-java-3.0.3/build/lucene-core-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/snowball/lucene-snowball-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/analyzers/common/lucene-analyzers-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/regex/lucene-regex-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/memory/lucene-memory-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/highlighter/lucene-highlighter-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/queries/lucene-queries-3.0.3.jar --jar build/jar/extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParse r.QueryParserTokenManager --exclude org.apache.lucene.queryParser.ParseException --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.3 --module python/collections.py --files 3 --build [New Thread 1556.0x9fc] Program received signal SIGTRAP, Trace/breakpoint trap. 0x7740fabd in ntdll!TpWaitForAlpcCompletion () from C:\Windows\system32\ntdll.dll (gdb) warning: HEAP[python.exe]: warning: Invalid address specified to RtlFreeHeap( 0038, 004314A8 ) (gdb) bt #0 0x7740fabd in ntdll!TpWaitForAlpcCompletion () from C:\Windows\system32\ntdll.dll #1 0x0027f644 in ?? () #2 0x773d26c4 in ntdll!RtlCreateUserStack () from C:\Windows\system32\ntdll.dll #3 0x004314a0 in ?? () #4 0x77410b17 in ntdll!TpQueryPoolStackInformation () from C:\Windows\system32\ntdll.dll #5 0x0038 in ?? () #6 0x773ca8ff in ntdll!AlpcMaxAllowedMessageLength () from C:\Windows\system32\ntdll.dll #7 0x0038 in ?? () #8 0x77372a32 in ntdll!RtlEncodePointer () from
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
On Nov 29, 2010, at 18:40, Bill Janssen jans...@parc.com wrote: Bill Janssen jans...@parc.com wrote: Andi Vajda va...@apache.org wrote: I just tried this myself By this, do you mean 64-bit Windows 7, or Python 2.7? Both. 64 bit Windows 7, with Python 2.7 and Java 1.6.0_22 both 32-bit. OK, I'll try it again on Win 7. I'll use a checkout of the PyLucene trunk instead of a packaged tar file. Don't use trunk, use HEAD of whatever branch you normally use, 2_9, 3_0, etc... The 2.9.4 and 3.0.3 releases are ready to go, pending Lucene Core's. OK, I checked out branches/pylucene_3_0 on my Win 7 machine. Same problem. Here's the Makefile tranche: # Windows (Win32, Python 2.7, Java 1.6, ant 1.8.1, Java not on PATH) PREFIX_PYTHON=/c/Python27 ANT=JAVA_HOME=c:\\Program Files (x86)\\Java\\jdk1.6.0_22 /c/ Program Files/apache-ant-1.8.1/bin/ant PYTHON=$(PREFIX_PYTHON)/python.exe JCC=$(PYTHON) -m jcc --shared --find-jvm-dll NUM_FILES=3 JCC builds and installs fine, The Java code builds just fine, but when I get to generating PyLucene, I get this: $ make /c/Python27/python.exe -m jcc --shared --find-jvm-dll --jar lucene- java-3.0.3/build/lucene-core-3.0.3.jar --jar lucene-java-3.0.3/ build/contrib/snowball/lucene-snowball-3.0.3.jar --jar lucene- java-3.0.3/build/contrib/analyzers/common/lucene- analyzers-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/regex/ lucene-regex-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/memory/ lucene-memory-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/ highlighter/lucene-highlighter-3.0.3.jar --jar lucene-java-3.0.3/ build/contrib/queries/lucene-queries-3.0.3.jar --jar build/jar/ extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParser.QueryParserTokenMa nager --exclude org.apache.lucene.queryParser.ParseException -- exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities -- exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/ lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/ lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.3 --module python/collections.py --files 3 --build make: *** [compile] Error 255 $ Ran it under gdb, which provides this tidbit: (gdb) run Starting program: c:\Python27/python.exe -m jcc --shared --compiler mingw32 --jar lucene-java-3.0.3/build/lucene-core-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/snowball/lucene-snowball-3.0.3.jar -- jar lucene-java-3.0.3/build/contrib/analyzers/common/lucene- analyzers-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/regex/ lucene-regex-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/memory/ lucene-memory-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/ highlighter/lucene-highlighter-3.0.3.jar --jar lucene-java-3.0.3/ build/contrib/queries/lucene-queries-3.0.3.jar --jar build/jar/ extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParse r.QueryParserTokenManager --exclude org.apache.lucene.queryParser.ParseException --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/ lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/ lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.3 --module python/collections.py --files 3 --build [New Thread 1556.0x9fc] Program received signal SIGTRAP, Trace/breakpoint trap. 0x7740fabd in ntdll!TpWaitForAlpcCompletion () from C:\Windows \system32\ntdll.dll (gdb) warning: HEAP[python.exe]: warning: Invalid address specified to RtlFreeHeap( 0038, 004314A8 ) (gdb) bt #0 0x7740fabd in ntdll!TpWaitForAlpcCompletion () from C:\Windows \system32\ntdll.dll #1 0x0027f644 in ?? () #2 0x773d26c4 in ntdll!RtlCreateUserStack () from C:\Windows \system32\ntdll.dll #3 0x004314a0 in ?? () #4 0x77410b17 in ntdll!TpQueryPoolStackInformation () from C: \Windows\system32\ntdll.dll #5 0x0038 in ?? () #6 0x773ca8ff in ntdll!AlpcMaxAllowedMessageLength () from C: \Windows\system32\ntdll.dll #7
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
On Nov 29, 2010, at 18:40, Bill Janssen jans...@parc.com wrote: Bill Janssen jans...@parc.com wrote: Andi Vajda va...@apache.org wrote: I just tried this myself By this, do you mean 64-bit Windows 7, or Python 2.7? Both. 64 bit Windows 7, with Python 2.7 and Java 1.6.0_22 both 32-bit. OK, I'll try it again on Win 7. I'll use a checkout of the PyLucene trunk instead of a packaged tar file. Don't use trunk, use HEAD of whatever branch you normally use, 2_9, 3_0, etc... The 2.9.4 and 3.0.3 releases are ready to go, pending Lucene Core's. OK, I checked out branches/pylucene_3_0 on my Win 7 machine. Same problem. Here's the Makefile tranche: # Windows (Win32, Python 2.7, Java 1.6, ant 1.8.1, Java not on PATH) PREFIX_PYTHON=/c/Python27 ANT=JAVA_HOME=c:\\Program Files (x86)\\Java\\jdk1.6.0_22 /c/ Program Files/apache-ant-1.8.1/bin/ant PYTHON=$(PREFIX_PYTHON)/python.exe JCC=$(PYTHON) -m jcc --shared --find-jvm-dll NUM_FILES=3 JCC builds and installs fine, The Java code builds just fine, but when I get to generating PyLucene, I get this: $ make /c/Python27/python.exe -m jcc --shared --find-jvm-dll --jar lucene- java-3.0.3/build/lucene-core-3.0.3.jar --jar lucene-java-3.0.3/ build/contrib/snowball/lucene-snowball-3.0.3.jar --jar lucene- java-3.0.3/build/contrib/analyzers/common/lucene- analyzers-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/regex/ lucene-regex-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/memory/ lucene-memory-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/ highlighter/lucene-highlighter-3.0.3.jar --jar lucene-java-3.0.3/ build/contrib/queries/lucene-queries-3.0.3.jar --jar build/jar/ extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParser.QueryParserTokenMa nager --exclude org.apache.lucene.queryParser.ParseException -- exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities -- exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/ lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/ lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.3 --module python/collections.py --files 3 --build make: *** [compile] Error 255 $ Ran it under gdb, which provides this tidbit: (gdb) run Starting program: c:\Python27/python.exe -m jcc --shared --compiler mingw32 --jar lucene-java-3.0.3/build/lucene-core-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/snowball/lucene-snowball-3.0.3.jar -- jar lucene-java-3.0.3/build/contrib/analyzers/common/lucene- analyzers-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/regex/ lucene-regex-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/memory/ lucene-memory-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/ highlighter/lucene-highlighter-3.0.3.jar --jar lucene-java-3.0.3/ build/contrib/queries/lucene-queries-3.0.3.jar --jar build/jar/ extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParse r.QueryParserTokenManager --exclude org.apache.lucene.queryParser.ParseException --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/ lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/ lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.3 --module python/collections.py --files 3 --build [New Thread 1556.0x9fc] Program received signal SIGTRAP, Trace/breakpoint trap. 0x7740fabd in ntdll!TpWaitForAlpcCompletion () from C:\Windows \system32\ntdll.dll (gdb) warning: HEAP[python.exe]: warning: Invalid address specified to RtlFreeHeap( 0038, 004314A8 ) (gdb) bt #0 0x7740fabd in ntdll!TpWaitForAlpcCompletion () from C:\Windows \system32\ntdll.dll #1 0x0027f644 in ?? () #2 0x773d26c4 in ntdll!RtlCreateUserStack () from C:\Windows \system32\ntdll.dll #3 0x004314a0 in ?? () #4 0x77410b17 in ntdll!TpQueryPoolStackInformation () from C: \Windows\system32\ntdll.dll #5 0x0038 in ?? () #6 0x773ca8ff in ntdll!AlpcMaxAllowedMessageLength () from C: \Windows\system32\ntdll.dll #7
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
On Mon, 29 Nov 2010, Bill Janssen wrote: Andi Vajda va...@apache.org wrote: On Nov 29, 2010, at 9:45, Bill Janssen jans...@parc.com wrote: Andi Vajda va...@apache.org wrote: I just tried this myself By this, do you mean 64-bit Windows 7, or Python 2.7? Both. 64 bit Windows 7, with Python 2.7 and Java 1.6.0_22 both 32-bit. and it seems that with Python 2.7 __name__ is never equal to '__main__' in jcc's __init__.py. So, jcc.__main__ is never imported implicitely from __init__.py and hence --find-jvm-dll is ineffective. I moved the --find-jvm-dll trickery to __init__.py and that seems to solve the problem. Of course, this is all masked if the PATH already contains the JRE directories. Andi.. Thanks. Though I thought that the --find-jvm-dll switch only worked if it was explicitly specified, which I wasn't doing. So while that's one Python 2.7 issue, I don't think that's the problem I was seeing, right? Yes, it only kicks in if used explicitely but didn't work. Putting the jre/bin and jre/bin/client dirs on PATH also works around the problem but masks the --find-jvm-dll problem. I'm going to go back to 32-bit XP, and get things working with Python 2.7 on that platform. Once I have that, I'll go back to 64-bit Windows 7. I don't think that makes any difference. I think (but I could be wrong) that the issue is with Python 2.7 and the value of __name__ in __init__.py when invoking a package via -m. OK, I'll try it again on Win 7. I'll use a checkout of the PyLucene trunk instead of a packaged tar file. Don't use trunk, use HEAD of whatever branch you normally use, 2_9, 3_0, etc... The 2.9.4 and 3.0.3 releases are ready to go, pending Lucene Core's. Andi.. Bill Andi.. Bill I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c: \Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys \1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache- ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c: \Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6- py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc \__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6- py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages \jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc \config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7- win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site- packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\ \include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\ \win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '- ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
On Mon, 22 Nov 2010, Bill Janssen wrote: Bill Janssen jans...@parc.com wrote: Using depends.exe on _jcc.pyd says that the missing file is Python27.dll, which seems odd. Where should I find that? And there is a python27.dll in C:\Windows\system32\. So, not sure what the problem is. I just tried this myself and it seems that with Python 2.7 __name__ is never equal to '__main__' in jcc's __init__.py. So, jcc.__main__ is never imported implicitely from __init__.py and hence --find-jvm-dll is ineffective. I moved the --find-jvm-dll trickery to __init__.py and that seems to solve the problem. Of course, this is all masked if the PATH already contains the JRE directories. Andi.. Bill Bill roman On Mon, Nov 22, 2010 at 7:53 PM, Bill Janssen jans...@parc.com wrote: I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache-ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\\win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
On Mon, Nov 22, 2010 at 9:45 PM, Bill Janssen jans...@parc.com wrote: Roman Chyla roman.ch...@gmail.com wrote: I had similar/same issue on win xp, it was the space in the java path, but i can't recall details. What happens if you change config.py to? C:\\Program\ Files\ (x86)\\Java\\jdk1.6.0_22\\lib Wouldn't that eval to the same Python string? Which reminds me I ended up with 'Program\\ Files', but that must have been for the compilation - so nevermind, sorry, that was another problem. I tried quoting all the spaces in the strings, with no help. It's when it attempts to load jcc/_jcc.pyd that it fails. One possible problem is that there are two different _jcc submodules there: -rw-rw-rw- 1 wjanssen root 282 11-22 12:29 _jcc.py -rw-rw-rw- 1 wjanssen root 577 11-22 12:29 _jcc.pyc -rw-rw-rw- 1 wjanssen root 512418 11-22 12:29 _jcc.pyd I'm not sure why, or if that's a problem. Using depends.exe on _jcc.pyd says that the missing file is Python27.dll, which seems odd. Where should I find that? Bill roman On Mon, Nov 22, 2010 at 7:53 PM, Bill Janssen jans...@parc.com wrote: I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache-ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\\win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Roman Chyla roman.ch...@gmail.com wrote: I had similar/same issue on win xp, it was the space in the java path, but i can't recall details. What happens if you change config.py to? C:\\Program\ Files\ (x86)\\Java\\jdk1.6.0_22\\lib Wouldn't that eval to the same Python string? I tried quoting all the spaces in the strings, with no help. It's when it attempts to load jcc/_jcc.pyd that it fails. One possible problem is that there are two different _jcc submodules there: -rw-rw-rw- 1 wjanssen root 282 11-22 12:29 _jcc.py -rw-rw-rw- 1 wjanssen root 577 11-22 12:29 _jcc.pyc -rw-rw-rw- 1 wjanssen root512418 11-22 12:29 _jcc.pyd I'm not sure why, or if that's a problem. Using depends.exe on _jcc.pyd says that the missing file is Python27.dll, which seems odd. Where should I find that? Bill roman On Mon, Nov 22, 2010 at 7:53 PM, Bill Janssen jans...@parc.com wrote: I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache-ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\\win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
Bill Janssen jans...@parc.com wrote: Using depends.exe on _jcc.pyd says that the missing file is Python27.dll, which seems odd. Where should I find that? And there is a python27.dll in C:\Windows\system32\. So, not sure what the problem is. Bill Bill roman On Mon, Nov 22, 2010 at 7:53 PM, Bill Janssen jans...@parc.com wrote: I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache-ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\\win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill
building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache-ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\\win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill
Re: building PyLucene 3.0.2 on Win7/MinGW with Python 2.7
I had similar/same issue on win xp, it was the space in the java path, but i can't recall details. What happens if you change config.py to? C:\\Program\ Files\ (x86)\\Java\\jdk1.6.0_22\\lib roman On Mon, Nov 22, 2010 at 7:53 PM, Bill Janssen jans...@parc.com wrote: I got a brand-new Windows 7 machine, and thought I'd try building PyLucene with a newer version of Python, 2.7, the 32-bit version. I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to work with Python 2.7. Using 32-bit Java 6.0_22. But I can't get JCC to run here: sh-3.1$ which jcc.dll /c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll sh-3.1$ which jvm.dll /c/Program Files (x86)/Java/jre6/bin/client/jvm.dll sh-3.1$ python -m jcc.__main__ --help c:\Python27\python.exe: DLL load failed: The specified module could not be found. sh-3.1$ sh-3.1$ python -c 'import os; print os.environ.get(PATH)' c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program Files\apache-ant-1.8.1\bin;c:\Program Files (x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg It seems to build and install OK, but when I run python in verbose mode, I see import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py import jcc # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc # c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py import jcc.config # precompiled from c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc c:\Python27\python.exe: DLL load failed: The specified module could not be found. So, what's in jcc/config.py? Here's what's in it: INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 'C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include\\win32'] CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings'] DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG'] LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm'] IMPLIB_LFLAGS=['-Wl,--out-implib,%s'] SHARED=True VERSION=2.6 Any ideas about what's going wrong? I suspect those parentheses in the path to the jvm, myself. Bill