You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
configure should pick /usr/bin/g++ automatically if present #89072
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:
assignee=Noneclosed_at=Nonecreated_at=<Date2021-08-13.07:31:29.458>labels= ['build', '3.9']
title='configure should pick /usr/bin/g++ automatically if present'updated_at=<Date2021-08-13.07:31:29.458>user='https://bugs.python.org/pmenzel'
[copied from closed (out of date) issue https://bugs.python.org/issue25946]
Reproduced with Python 3.9.6.
./configureboth printschecking for g++... no` and
WARNING:
By default, distutils will build C++ extension modules with "g++".
If this is not intended, then set CXX on the configure command line.
if /usr/bin/g++ is present and executable which doesn't seem to be constructive because it's quite common that one wants to use /usr/bin/g++ as CXX compiler if available. In case incompatibilities exists with other C++ compilers there should a check and more detailed error message.
Furthermore the error message doesn't explain if a part of distutils won't be build because the message sounds like the C++ extension is built, but does it work without a C++ compiler?
Specifying CXX environment variable or --with-cxx-main=/usr/bin/g++configure option works fine.
Activity
pmenzel commentedon Aug 13, 2021
[copied from closed (out of date) issue https://bugs.python.org/issue25946]
Reproduced with Python 3.9.6.
./configure
both printschecking for g++... no` andif
/usr/bin/g++is present and executable which doesn't seem to be constructive because it's quite common that one wants to use/usr/bin/g++as CXX compiler if available. In case incompatibilities exists with other C++ compilers there should a check and more detailed error message.Furthermore the error message doesn't explain if a part of distutils won't be build because the message sounds like the C++ extension is built, but does it work without a C++ compiler?
Specifying
CXXenvironment variable or--with-cxx-main=/usr/bin/g++configureoption works fine.hugovk commentedon Oct 26, 2026
Fixed by #148298 / #148294.