This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: distutils - compiling C++ ext in cyg or mingw w/ std Python
Type: Stage:
Components: Distutils Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: hyeshik.chang, mdboom, paul.moore
Priority: normal Keywords:

Created on 2004-01-14 21:55 by mdboom, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch mdboom, 2004-01-14 21:55 Patch for distutils/cygwinccompiler.py (1.24)
Messages (3)
msg19693 - (view) Author: Michael Droettboom (mdboom) * Date: 2004-01-14 21:55
When compiling C++ extensions with Cygwin (Cygwin.dll
or MingW), the linker is erroneously set to cc, rather
than gcc.  Even though cc is a symlink to gcc, the
standard Python distribution is a standard Windows
executable which can not follow Cygwin symlinks, so
distutils displays the following error:

   command 'cc' failed: Invalid argument 

confusingly indicating cc.exe can not be found.

The error occurs because there is no compiler_cxx in
CygwinCCompiler to override the value in the
UnixCCompiler base class, as there is for compiler,
compiler_so etc...

The included patch (against revision 1.24 in CVS of
distutils/cygwinccompiler.py) adds this override and
fixes the error.

Thanks to Paul Moore for helping me track this down.
msg19694 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2004-06-05 18:19
Logged In: YES 
user_id=113328

Reviewed the patch - it looks OK to me. The current
behaviour is not useful (there is no cc command in mingw for
Windows). No documentation changes should be needed, and I
can't see an obvious test that could be added (there are no
distutils tests that I can see at the moment).

I recommend applying this patch.
msg19695 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-06-05 18:39
Logged In: YES 
user_id=55188

Fixed in CVS. Thank you for the reporting!

Misc/NEWS 1.992
Lib/distutils/cygwinccompiler.py 1.25
History
Date User Action Args
2022-04-11 14:56:02adminsetgithub: 39822
2004-01-14 21:55:20mdboomcreate