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: crach link c++ extension by mingw
Type: Stage:
Components: Distutils Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: furrykef, jepler, loewis, mdehoon, shura_zam
Priority: normal Keywords: patch

Created on 2004-06-29 06:42 by shura_zam, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
cygwinccompiler.py.patch shura_zam, 2004-08-09 10:45 diff file
Messages (5)
msg46266 - (view) Author: Alexandr Zamaraev (shura_zam) Date: 2004-06-29 06:42
if cource of exttension module writen in C++
setup break and say:

cc -mno-cygwin -shared -s build\temp.win32-2.3
\Release\dybaseapi.o 
build\temp.win32-2.3\Release\..\src\btree.o 
build\temp.win32-2.3\Release\..\src\database.o 
build\temp.win32-2.3\Release\..\src\dybase.o 
build\temp.win32-2.3\Release\..\src\file.o 
build\temp.win32-2.3\Release\..\src\pagepool.o 
build\temp.win32-2.3\Release\dybaseapi.def 
-LC:\Lang\Python23\libs -LC:\Lang\Python23\PCBuild 
-lpython23 -o build\lib.win32-2.3\dybaseapi.pyd
error: command 'cc' failed: No such file or directory

I patch cygwinccompiler.py for resolve:

*** C:\Lang\Python23\work\Python-2.3.4
\Lib\distutils\cygwinccompiler.py	Mon Apr 14 
19:51:26 2003
--- C:\Lang\Python23\work\cygwinccompiler2.py
	Tue Jun 29 13:00:23 2004
***************
*** 108,113 ****
--- 108,114 ----
          # XXX optimization, warnings etc. should be 
customizable.
          self.set_executables(compiler='gcc -mcygwin -O -
Wall',
                               compiler_so='gcc -mcygwin -
mdll -O -Wall',
+                              compiler_cxx='g++ -mcygwin -O -
Wall',
                               linker_exe='gcc -mcygwin',
                               linker_so=('%s -mcygwin %s' %
                                          (self.linker_dll, 
shared_option)))
***************
*** 295,300 ****
--- 296,302 ----
  
          self.set_executables(compiler='gcc -mno-
cygwin -O -Wall',
                               compiler_so='gcc -mno-cygwin -
mdll -O -Wall',
+                              compiler_cxx='g++ -mno-cygwin -
O -Wall',
                               linker_exe='gcc -mno-cygwin',
                               linker_so='%s -mno-cygwin %s %
s'
                                          % (self.linker_dll, 
shared_option,
msg46267 - (view) Author: Jeff Epler (jepler) Date: 2004-08-07 14:29
Logged In: YES 
user_id=2772

Please attach your diff, rather than pasting it into the
text box.  The diff is hopelessly mangled, and cannot be
applied for testing.
msg46268 - (view) Author: Kef Li Eric MARCVS X (furrykef) Date: 2004-08-20 17:33
Logged In: YES 
user_id=536129

I do hope this patch is integrated. As it is, I'm going to
have to tell my users to patch distutils by hand...
msg46269 - (view) Author: Michiel de Hoon (mdehoon) * Date: 2005-01-30 09:59
Logged In: YES 
user_id=488897

It seems that this bug has been fixed in Python 2.4. Using
this Python version:
'2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)]'
a C++ extension compiled correctly with mingw32. Could you
check if the compilation error still occurs with Python 2.4?
Compilation still fails with Python 2.3.5c1, but I doubt
that this bug can be fixed before the final 2.3.5 release.
msg46270 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-03-03 09:36
Logged In: YES 
user_id=21627

Apparently, shura_zam silently agrees that the problem was
solved, rejecting the patch as outdated.
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40475
2004-06-29 06:42:28shura_zamcreate