python / cpython

The Python programming language
https://www.python.org
Other
63.16k stars 30.24k forks source link

crach link c++ extension by mingw #40475

Closed 9add156f-3eaf-4024-8808-2264b4750b8d closed 19 years ago

9add156f-3eaf-4024-8808-2264b4750b8d commented 20 years ago
BPO 981773
Nosy @loewis, @tonal
Files
  • cygwinccompiler.py.patch: diff file
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['library'] title = 'crach link c++ extension by mingw' updated_at = user = 'https://github.com/tonal' ``` bugs.python.org fields: ```python activity = actor = 'loewis' assignee = 'none' closed = True closed_date = None closer = None components = ['Distutils'] creation = creator = 'shura_zam' dependencies = [] files = ['6061'] hgrepos = [] issue_num = 981773 keywords = ['patch'] message_count = 5.0 messages = ['46266', '46267', '46268', '46269', '46270'] nosy_count = 5.0 nosy_names = ['loewis', 'jepler', 'mdehoon', 'furrykef', 'shura_zam'] pr_nums = [] priority = 'normal' resolution = 'out of date' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue981773' versions = [] ```

    9add156f-3eaf-4024-8808-2264b4750b8d commented 20 years ago
    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,

    9dd6b116-0b30-4f36-938a-5d6ffefdc969 commented 20 years ago

    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.

    55d0ffc2-fce1-41a4-b95d-e65af04b8210 commented 20 years ago

    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...

    9f3c0eea-4ce9-40be-aa11-1ed14a251ceb commented 19 years ago

    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.

    61337411-43fc-4a9c-b8d5-4060aede66d0 commented 19 years ago

    Logged In: YES user_id=21627

    Apparently, shura_zam silently agrees that the problem was solved, rejecting the patch as outdated.