Johann Hanne added the comment:
Two corrections for the "configure;make" workaround:
- WRONG: Remove the created pyconfig.h and replace PC/pyconfig.h with the
manually modified version I'm attaching
- CORRECT: Remove PC/pyconfig.h and replace the created pyconfig.h with the
ma
Johann Hanne added the comment:
> However, if the patch doesn't manage to make "configure;make" work, it's IMO
> useless.
No, it's not, for two reasons:
- Embedding Python by just compiling/linking all the .c files in seems to be a
major feature to me; so fixin
Johann Hanne added the comment:
- Why is the generated pyconfig.h not good enough? Could we modify the
./configure script instead?
Probably setup.py needs to be extended; I did not have a deep look into the
build system though
- the "empty.c" should remain empty... Why not use PC
Johann Hanne added the comment:
As promised, here comes the list of modules which successfully compile with
MinGW:
./Python-3.1.3/PC/import_nt.o
./Python-3.1.3/PC/_subprocess.o
./Python-3.1.3/PC/dl_nt.o
./Python-3.1.3/PC/msvcrtmodule.o
./Python-3.1.3/PC/winreg.o
./Python-3.1.3/Parser/pgen.o
Johann Hanne added the comment:
> Traditionally, MingW-compiled Python binaries would often be
binary-incompatible
I don't plan to distribute a MinGW compiled package as an alternative to the
official MSVC based build. In my particular use case, I compile everything into
a single exe
Johann Hanne added the comment:
Ok, I see. And no, this is *not* my intention. I will post the list of
successfully compiled objects files and the linker result on Monday as
promised. If it turns out I lied, feel free to put me into the hall of shame.
After all, the Win32 platform is not
Johann Hanne added the comment:
>Will it then also link something?
Sure - it actually builds a python.exe which is fully working for me. If you
need a proof, please let me know, I have no problem uploading it somewhere...
Is there a reason you are so sceptical? After all, Python for Linux
Johann Hanne added the comment:
>When the patch is applied, what's the resulting status of mingw compilation?
It compiles all C files which I require. Not sure if this is really *all* C
files, but at least very close to all. I will post a list of object files I get
o
New submission from Johann Hanne :
Some C files fail to compile with mingw, mostly due to missing preprocessor
statements:
- Modules/_ctypes/callproc.c
When using the bundled non-msvc libffi, ffi_call has no return value, so only
use it when compiled with msvc.
- Modules/_pickle.c
There are
Johann Hanne added the comment:
Well... ok. Although I already regard the patch as a strict bugfix (it fixes
compilation of some C modules on MinGW), I'll go forward and create a patch for
Python 3.2 which fixes compilation of all C modules on MinGW (all which are
supposed to work on
Johann Hanne added the comment:
Why exactly are you skeptical? Because it doesn't fix everything in one go? The
other changes are also minimal (I'm not even sure if it requires more source
changes, maybe I have just to get my #defines right). If you prefer to see a
single patch whi
Johann Hanne added the comment:
I've revised the patch to use "defined(_MSC_VER) || defined(__MINGW32__)" as
suggested.
And no, it does not solve all mingw compilition issues, but most of them. I've
tried to only address the most obvious ones, which are *very* unlikely to
Johann Hanne added the comment:
> What's the objective of this patch? I.e. what precisely is it supposed to
> achieve?
So the answer is: It will fix compiling with gcc/MinGW by fixing the 3 issues
described.
--
___
Python tra
Johann Hanne added the comment:
Python 2.7 will currently not compile with MinGW for the outlined reasons.
* There are several "#if defined(_MSC_VER)" macros which surround Windows
specific code/preprocessor fragments. But _MSC_VER is only defined with the
Visual Studio compiler
New submission from Johann Hanne :
There are a number of mingw compile issues which are easily fixed
* some "_MSC_VER" #if's should be "MS_WINDOWS" instead
* for cross-compiling, windows.h should be all-lowercase
* mingw has a strcasecmp, so private implementatio
15 matches
Mail list logo