[Python-Dev] Status of C compilers for Python on Windows

Paul Moore p.f.moore at gmail.com
Fri Oct 10 14:05:11 CEST 2014


On 10 October 2014 10:50, Victor Stinner <victor.stinner at gmail.com> wrote:
> Is MinGW fully compatible with MSVS ABI? I read that it reuses the
> MSVCRT, but I don't know if it's enough. I guess that a full ABI
> compatibility means more than just using the C library, calling
> convention and much more.

MinGW can be made to build ABI-compatible extensions. Whether this
will continue with MSVC 15 I don't know, as it requires a change to
add an interface library for the relevant msvcrXX runtime. And the
MinGW community is somewhat fragmented these days, with the core
project not supporting 64-bit and various external projects doing so.

Having said all this, it *is* possible with some effort to use MinGW
to build Python extensions. As noted, the numpy developers have done a
lot of work on this as some of the libraries they need must be built
with mingw. And the state of distutils support for mingw is very sad,
as well, IIRC (last time I looked there were a number of open bugs,
and very little movement on them).

Rather than put effort into more build options for CPython, I think it
would be much more beneficial to the Windows community if effort was
put into:

1. Improving support for compiling *extensions* with mingw and its
64-bit cousins, in a way that is compatible with a standard MSVC-built
Python. This would involve sorting through and applying some of the
distutils changes, as well as working with the mingw projects to
ensure they will offer support for the MSVC15 runtime ina  timely
manner.
2. Looking at ways to support cross-compiling Windows extensions from
Linux using mingw. I've no idea how practical this would be, but if
Linux developers could provide Windows builds without having to
maintain a Windows environment, that would be great.

As I say, I have no personal interest here, as I use MSVC, but I know
the above two options are commonly asked for.

Paul


More information about the Python-Dev mailing list