[issue1597850] Cross compiling patches for MINGW
Luke Kenneth Casson Leighton
report at bugs.python.org
Mon Oct 6 16:52:28 CEST 2008
Luke Kenneth Casson Leighton <lkcl at lkcl.net> added the comment:
what's not explained, and isn't clear, is exactly whether you're
supposed to - or even _capable_ of - cross-compiling the _entire_
python sourcecode base with mingw32, or whether you're supposed to
get _just_ the python.exe interpreter, and, maybe if you're lucky,
libpython.a (or libpython.dll - whatever).
i got quite a long way, as you can see, in cross-compiling
posixmodule.c _by mistake_ - before realising that the whole
python sourcecode base is completely inadequately set up for
cross-compiling, but is specialised "hard-coded" to compile
python under msvc _only_.
so, when doing the cross-compile, it was actually being detected
as a _unix_ compile, not a _win32_ compile.
#define WIN32 wasn't even being listened to.
the end result was that entire areas of posixmodule.c were
being compiled when they shouldn't have been.
later, i tried to correctly #define WIN32 (or whatever was
required), only to find that the mingw32 libraries don't
support many of the necessary functions. for example, it's
assumed that crypto libraries exist, and many other things.
all in all, it didn't go too well :)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list