Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Python 3.11.4: Running "make test" fails under gcc 4.8.5 because both -std=gnu11 and -std=c++11 are specified when compiling _testcpp11ext #105776

Copy link
Copy link
Closed
@gtzampanakis

Description

@gtzampanakis
Issue body actions

In Python 3.11.4, running "make test" fails under gcc 4.8.5 because both -std=gnu11 and -std=c++11 are specified when compiling _testcpp11ext.

Run the following:

./configure
make
make test EXTRATESTOPTS=test_cppext

Output:

0:00:12 load avg: 0.92 [1/1/1] test_cppext failed (2 failures)
test test_cppext failed -- multiple errors occurred; run in verbose mode for details
running build_ext
building '_testcpp03ext' extension
creating build
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/home
creating build/temp.linux-x86_64-cpython-311/home/httpd
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test
gcc -std=gnu11 -pthread -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/httpd/wgvd-net/delme/Python-3.11.4/build/test_python_130531æ/test_python_worker_130534æ/tempcwd/env/include -I/home/httpd/wgvd-net/delme/Python-3.11.4/Include -I/home/httpd/wgvd-net/delme/Python-3.11.4 -c /home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/_testcppext.cpp -o build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/_testcppext.o -Werror -std=c++03
cc1plus: error: command line option ‘-std=gnu11’ is valid for C/ObjC but not for C++ [-Werror]
cc1plus: all warnings being treated as errors
error: command '/usr/bin/gcc' failed with exit code 1
running build_ext
building '_testcpp11ext' extension
creating build
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/home
creating build/temp.linux-x86_64-cpython-311/home/httpd
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test
gcc -std=gnu11 -pthread -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/httpd/wgvd-net/delme/Python-3.11.4/build/test_python_130531æ/test_python_worker_130534æ/tempcwd/env/include -I/home/httpd/wgvd-net/delme/Python-3.11.4/Include -I/home/httpd/wgvd-net/delme/Python-3.11.4 -c /home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/_testcppext.cpp -o build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/_testcppext.o -Werror -std=c++11
cc1plus: error: command line option ‘-std=gnu11’ is valid for C/ObjC but not for C++ [-Werror]
cc1plus: all warnings being treated as errors
error: command '/usr/bin/gcc' failed with exit code 1

== Tests result: FAILURE ==

1 test failed:
    test_cppext
0:00:12 load avg: 0.92
0:00:12 load avg: 0.92 Re-running failed tests in verbose mode
0:00:12 load avg: 0.92 Re-running test_cppext in verbose mode (matching: test_build_cpp03, test_build_cpp11)
test_build_cpp03 (test.test_cppext.TestCPPExt.test_build_cpp03) ...
Run: /home/httpd/wgvd-net/delme/Python-3.11.4/python -X dev -m venv env
Run: env/bin/python -X dev /home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/setup_testcppext.py build_ext --verbose -std=c++03
running build_ext
building '_testcpp03ext' extension
creating build
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/home
creating build/temp.linux-x86_64-cpython-311/home/httpd
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test
gcc -std=gnu11 -pthread -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/httpd/wgvd-net/delme/Python-3.11.4/build/test_python_130531æ/tempcwd/env/include -I/home/httpd/wgvd-net/delme/Python-3.11.4/Include -I/home/httpd/wgvd-net/delme/Python-3.11.4 -c /home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/_testcppext.cpp -o build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/_testcppext.o -Werror -std=c++03
cc1plus: error: command line option ‘-std=gnu11’ is valid for C/ObjC but not for C++ [-Werror]
cc1plus: all warnings being treated as errors
error: command '/usr/bin/gcc' failed with exit code 1
ERROR
test_build_cpp11 (test.test_cppext.TestCPPExt.test_build_cpp11) ...
Run: /home/httpd/wgvd-net/delme/Python-3.11.4/python -X dev -m venv env
Run: env/bin/python -X dev /home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/setup_testcppext.py build_ext --verbose
running build_ext
building '_testcpp11ext' extension
creating build
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/home
creating build/temp.linux-x86_64-cpython-311/home/httpd
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib
creating build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test
gcc -std=gnu11 -pthread -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/httpd/wgvd-net/delme/Python-3.11.4/build/test_python_130531æ/tempcwd/env/include -I/home/httpd/wgvd-net/delme/Python-3.11.4/Include -I/home/httpd/wgvd-net/delme/Python-3.11.4 -c /home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/_testcppext.cpp -o build/temp.linux-x86_64-cpython-311/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/_testcppext.o -Werror -std=c++11
cc1plus: error: command line option ‘-std=gnu11’ is valid for C/ObjC but not for C++ [-Werror]
cc1plus: all warnings being treated as errors
error: command '/usr/bin/gcc' failed with exit code 1
ERROR

======================================================================
ERROR: test_build_cpp03 (test.test_cppext.TestCPPExt.test_build_cpp03)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/test_cppext.py", line 24, in test_build_cpp03
    self.check_build(True, '_testcpp03ext')
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/test_cppext.py", line 39, in check_build
    self._check_build(std_cpp03, extension_name)
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/test_cppext.py", line 80, in _check_build
    run_cmd('Build', cmd)
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/test_cppext.py", line 64, in run_cmd
    subprocess.run(cmd, check=True)
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['env/bin/python', '-X', 'dev', '/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/setup_testcppext.py', 'build_ext', '--verbose', '-std=c++03']' returned non-zero exit status 1.

======================================================================
ERROR: test_build_cpp11 (test.test_cppext.TestCPPExt.test_build_cpp11)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/test_cppext.py", line 21, in test_build_cpp11
    self.check_build(False, '_testcpp11ext')
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/test_cppext.py", line 39, in check_build
    self._check_build(std_cpp03, extension_name)
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/test_cppext.py", line 80, in _check_build
    run_cmd('Build', cmd)
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/test_cppext.py", line 64, in run_cmd
    subprocess.run(cmd, check=True)
  File "/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['env/bin/python', '-X', 'dev', '/home/httpd/wgvd-net/delme/Python-3.11.4/Lib/test/setup_testcppext.py', 'build_ext', '--verbose']' returned non-zero exit status 1.

----------------------------------------------------------------------

Your environment

Python 3.11.4
CentOS Linux release 7.9.2009 (Core)
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.