Description
Configure option --with-cxx-main=/usr/bin/clang++ not working
My environment
- CPython versions tested on:
Latest 3.12.0.a0 tried on other but CC=/usr/bin/clang not working on those, so pointless to try - Operating system and architecture:
fedora 5.17.13-300.fc36.x86_64
Configure options
--with-cxx-main=/usr/bin/clang++ CC=/usr/bin/clang
runs and gives at end:
configure: creating Modules/Setup.local
configure: creating Makefile
configure:
Then:
make
/usr/bin/clang++ -c -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c
clang-14: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
error: invalid argument '-std=c11' not allowed with 'C++'
make: *** [Makefile:1373: Programs/python.o] Error 1
See Discuss report
Tried configure with --with-cxx-main=/usr/bin/g++ CC=/usr/bin/gcc
then
make
cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++
cc1plus: warning: command-line option ‘-std=c11’ is valid for C/ObjC but not for C++
Shows source files being compiled and linked and actually builds python executable, so this works.