[Distutils] Compiling extensions with MingW32 / python.org binary

Michael Droettboom mdboom at jhu.edu
Wed Jan 14 11:15:57 EST 2004


I've come across a possible bug with --compiler=mingw32 and 
--compiler=cygwin support when using the standard python.org 2.3.3 
.exe.  (I do this so I can distribute binary installers that work with 
the standard Python distribution, but don't want to buy MS Visual Studio...)

It seems that the linker command being used is cc.exe, which on Cygwin 
1.5.5-1 is actually a symlink to gcc.exe.  This works fine if your 
Python interpreter was compiled with Cygwin, because it handles the 
symlink correctly.  However, when using the python.org interpreter, you 
get a:

   command 'cc' failed: Invalid argument

error.  Making cc.exe a real copy of gcc.exe fixes the problem.

Looking in cygwinccompiler.py, it seems that the linker is getting set 
to 'gcc', so it must be getting changed to 'cc' at somewhere else in the 
heirarchy...  Any ideas?  I'd be happy to submit a patch if this is in 
fact a new bug.

Note also, that things worked correctly in Python 2.2.3.  It is only 
when I moved to Python 2.3 that this error occurred.

Michael Droettboom




More information about the Distutils-SIG mailing list