Thomas Koch <k...@orbiteam.de> wrote: > Bill, > I just read through your posting about the MinGW issues in "DLL Hell". Did > you ever manage to get MinGW compile JCC and link against msvcr90.dll?
No, but I didn't try very hard. Other things came up and I haven't gotten back to it yet. Bill > I think I'm facing a similar issue (see post of today) and tried to change > MinGW spec to use msvcr90 (as mentioned in > http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file) but then "python > setup.py build --compiler=mingw32" runs in to ldd issues (I guess that's > because I still need to "hack" minGW itself...) - see attached output. > > > 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. > > > (How) did you manage that? > > Regards > Thomas > -- > Here's the output: > > I:\Software\Python26\PyLucene\src\pylucene-3.3-2\jcc>python setup.py build > --compiler=mingw32 > ... > running build_py > writing I:\Software\Python26\PyLucene\src\pylucene-3.3-2\jcc\jcc\config.py > copying jcc\config.py -> build\lib.win32-2.6\jcc > copying jcc\jcc.lib -> build\lib.win32-2.6\jcc > copying jcc\classes\org\apache\jcc\PythonVM.class -> > build\lib.win32-2.6\jcc\classes\org\apache\jcc > copying jcc\classes\org\apache\jcc\PythonException.class -> > build\lib.win32-2.6\jcc\classes\org\apache\jcc > running build_ext > building 'jcc' extension > C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -D_jcc_lib -DJCC_VER="2.10" > -IC:\Devel\Java\jdk1.6.0_14/include > -IC:\Devel\Java\jdk1.6.0_14/include/win32 -I_jcc > -Ijcc/sources -IC:\Devel\Python26\include -IC:\Devel\Python26\PC -c > jcc/sources/jcc.cpp -o build\temp.win32-2.6\Release\jcc\sources\jcc.o > -DPYTHON -specs=msvcr > 90 -fno-strict-aliasing -Wno-write-strings > C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -D_jcc_lib -DJCC_VER="2.10" > -IC:\Devel\Java\jdk1.6.0_14/include > -IC:\Devel\Java\jdk1.6.0_14/include/win32 -I_jcc > -Ijcc/sources -IC:\Devel\Python26\include -IC:\Devel\Python26\PC -c > jcc/sources/JCCEnv.cpp -o build\temp.win32-2.6\Release\jcc\sources\jccenv.o > -DPYTHON -specs > =msvcr90 -fno-strict-aliasing -Wno-write-strings > writing build\temp.win32-2.6\Release\jcc\sources\jcc.def > C:\MinGW\bin\g++.exe -mno-cygwin -shared > -Wl,--out-implib,build\lib.win32-2.6\jcc\jcc.lib -s > build\temp.win32-2.6\Release\jcc\sources\jcc.o build\temp.win32-2.6 > \Release\jcc\sources\jccenv.o > build\temp.win32-2.6\Release\jcc\sources\jcc.def -LC:\Devel\Python26\libs > -LC:\Devel\Python26\PCbuild -lpython26 -lmsvcr90 -o buil > d\lib.win32-2.6\jcc.dll -LC:\Devel\Java\jdk1.6.0_14/lib -ljvm -Wl,-S > -Wl,--out-implib,jcc\jcc.lib > Creating library file: jcc\jcc.lib > c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o:cygming-crtbegin.c:(.text+0 > xe): undefined reference to `GetModuleHandleA@4' > c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o:cygming-crtbegin.c:(.text+0 > x23): undefined reference to `GetProcAddress@8' > c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o:cygming-crtbegin.c:(.text+0 > x51): undefined reference to `GetModuleHandleA@4' > c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o:cygming-crtbegin.c:(.text+0 > x66): undefined reference to `GetProcAddress@8' > c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o:cygming-crtbegin.c:(.text+0 > x9a): undefined reference to `GetModuleHandleA@4' > c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o:cygming-crtbegin.c:(.text+0 > xaf): undefined reference to `GetProcAddress@8' > build\temp.win32-2.6\Release\jcc\sources\jcc.o:jcc.cpp:(.text$_ZNK6JCCEnv10g > et_vm_envEv[JCCEnv::get_vm_env() const]+0xf): undefined reference to > `TlsGetValue@4' > > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text+0x10): > undefined reference to `TlsAlloc@0' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text+0x29): > undefined reference to `TlsSetValue@8' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text+0x24d7): > undefined reference to `InitializeCriticalSection@4' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text+0x254c): > undefined reference to `EnterCriticalSection@4' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text+0x263a): > undefined reference to `LeaveCriticalSection@4' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text+0x2677): > undefined reference to `LeaveCriticalSection@4' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text+0x26f2): > undefined reference to `EnterCriticalSection@4' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text+0x27e5): > undefined reference to `LeaveCriticalSection@4' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text$_ZN4lock > D1Ev[lock::~lock()]+0x18): undefined reference to `LeaveCriticalSection@4' > build\temp.win32-2.6\Release\jcc\sources\jccenv.o:JCCEnv.cpp:(.text$_ZN4lock > D0Ev[lock::~lock()]+0x19): undefined reference to `LeaveCriticalSection@4' > c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../libmingw32.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 > >