[PyQt] Sip-4.14.7 XP build fails while linking
Mathias.Born at gmx.de
Mathias.Born at gmx.de
Thu Aug 15 09:27:24 BST 2013
On 15.08.2013, 08:44:36 Michael Hartung wrote:
> Hi everybody,
> trying to build sip-4.14.7 on XP/Python 3.2.2/mingw32-make.exe version:
> GNU Make 3.82.90/g++.exe version: 4.8.0
> with:
> 1. C:\\Python32\\python.exe configure.py --platform win32-g++
> result:
> This is SIP 4.14.7 for Python 3.2.2 on win32.
> The SIP code generator will be installed in c:\Python32.
> The sip module will be installed in c:\Python32\Lib\site-packages.
> The sip.h header file will be installed in c:\Python32\include.
> The default directory to install .sip files in is c:\Python32\sip.
> The platform/compiler configuration is win32-g++.
> Creating siplib\sip.h...
> Creating siplib\siplib.c...
> Creating siplib\siplib.sbf...
> Creating sipconfig.py...
> Creating top level Makefile...
> Creating sip code generator Makefile...
> Creating sip module Makefile...
> 2. mingw32-make.exe
> result:
> mingw32-make[1]: Entering directory 'c:/InstallTemp/sip-4.14.7/sipgen'
> makefile:29: warning: overriding recipe for target '.c.o'
> makefile:26: warning: ignoring old recipe for target '.c.o'
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o main.o main.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o
> transform.o transform.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o gencode.o
> gencode.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o
> extracts.o extracts.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o export.o
> export.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o heap.o heap.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o parser.o
> parser.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o lexer.o
> lexer.c
> g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
> -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -Wl,-s -o
> sip.exe main.o transform.o gencode.o
> extracts.o export.o heap.o parser.o lexer.o
> mingw32-make[1]: Leaving directory 'c:/InstallTemp/sip-4.14.7/sipgen'
> mingw32-make[1]: Entering directory 'c:/InstallTemp/sip-4.14.7/siplib'
> makefile:29: warning: overriding recipe for target '.c.o'
> makefile:26: warning: ignoring old recipe for target '.c.o'
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
> -Ic:\Python32\include -o siplib.o siplib.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
> -Ic:\Python32\include -o apiversions.o apiversions.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
> -Ic:\Python32\include -o descriptors.o descriptors.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
> -Ic:\Python32\include -o qtlib.o qtlib.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
> -Ic:\Python32\include -o threads.o threads.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
> -Ic:\Python32\include -o objmap.o objmap.c
> gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
> -Ic:\Python32\include -o voidptr.o voidptr.c
> g++ -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I.
> -Ic:\Python32\include -o bool.o bool.cpp
> g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
> -Wl,-enable-runtime-pseudo-reloc -shared -Wl,-subsystem,console -Wl,-s
> -o sip.pyd siplib.o apiversions.o descriptors.o qtlib.o threads.o
> objmap.o voidptr.o bool.o -Lc:\Python32\libs -lpython32
> siplib.o:siplib.c:(.text+0x9a): undefined reference to
> `_imp___Py_NoneStruct'
> siplib.o:siplib.c:(.text+0x824): undefined reference to `_imp__PyType_Type'
> ...
> siplib.o:siplib.c:(.text+0xa102): undefined reference to
> `_imp__PyExc_RuntimeError'
> siplib.o:siplib.c:(.text+0xa12f): undefined reference to `_imp__PyType_Type'
> c:/qt/qt5.1.0/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/ld.exe:
> siplib.o: bad reloc address 0x0 in section `.data'
> collect2.exe: error: ld returned 1 exit status
> makefile:36: recipe for target 'sip.pyd' failed
> mingw32-make[1]: *** [sip.pyd] Error 1
> mingw32-make[1]: Leaving directory 'c:/InstallTemp/sip-4.14.7/siplib'
> makefile:3: recipe for target 'all' failed
> mingw32-make: *** [all] Error 2
> Any help is appreciated.
> Thanks in advance
Hi,
I take it you are using an official Python binary?
That's built with MS c-compiler.
The key here is to observe how the linker looks for "_imp__PyType_Type",
while the import library provided by the official distribution
lists this as "__imp__PyType_Type".
If I remeber correctly, that's a known mingw issue when building
extensions for an MS-built Python.
I can't recall more details, but you'll find plenty of stuff about this
on the web.
Best Regards,
Mathias
More information about the PyQt
mailing list