Title: fails building C++ extensions when configured --without-cxx
Type: behavior Stage: test needed
Components: Build Versions: Python 2.6
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, doko, georg.brandl
Priority: normal Keywords: patch

Created on 2004-02-22 09:41 by doko, last changed 2010-07-10 10:47 by georg.brandl. This issue is now closed.

Messages (3)
msg60466 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2004-02-22 09:41
building C++ extensions with python configured
--without-cxx fails, because the installed
config/Makefile has CXX set to the empty string.
However at least on Linux it does work to build the
python binary without C++ for not depending on
libstdc++ but load/build a module which depends on
libstdc++ (which gets linked by g++).

Editing the generated config/Makefile does solve the
Another solution might be to pass LDSHARED in the
environment to distutils as it is already done for CC,
CFLAGS, etc, but this requires interaction by the
builder of the module.

--- Lib/distutils/ 2003-02-10
15:02:33.000000000 +0100
+++ Lib/distutils/  2004-02-03
10:53:21.000000000 +0100
@@ -153,6 +153,10 @@
             cc = os.environ['CC']
         if os.environ.has_key('CXX'):
             cxx = os.environ['CXX']
+        if os.environ.has_key('LDSHARED'):
+            ldshared = os.environ['LDSHARED']
+        if os.environ.has_key('CCSHARED'):
+            ccshared = os.environ['CCSHARED']
         if os.environ.has_key('CPP'):
             cpp = os.environ['CPP']
msg109735 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-09 13:40
This can be closed as a duplicate as Lib/distutils/ already refers to LDSHARED and CCSHARED.
msg109847 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-10 10:47
Thanks, closing.
Date User Action Args
2010-07-10 10:47:39georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg109847

resolution: out of date
2010-07-09 13:40:30BreamoreBoysetnosy: + BreamoreBoy
messages: + msg109735
2009-02-13 04:20:46ajaksu2setkeywords: + patch
stage: test needed
type: behavior
versions: + Python 2.6
2004-02-22 09:41:31dokocreate