Skip to content

gh-116869: Fix test_cext for Free Threading #117043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 19, 2024

@vstinner
Copy link
Member Author

!buildbot ARM64 MacOS M1 NoGIL

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit b641d4b 🤖

The command will test the builders whose names match following regular expression: ARM64 MacOS M1 NoGIL

The builders matched are:

  • ARM64 MacOS M1 NoGIL PR

@vstinner
Copy link
Member Author

Oh, there is another error:

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      CC env var: 'gcc'
      CFLAGS env var: <missing>
      extra_compile_args: ['-Werror', '-DMODULE_NAME=_test_limited_c11_cext', '-std=c11', '-DPy_LIMITED_API=0x30d00a5']
      running bdist_wheel
      running build
      running build_ext
      building '_test_limited_c11_cext' extension
      creating build
      creating build/temp.macosx-14.0-arm64-cpython-313-pydebug
      gcc -fno-strict-overflow -Wsign-compare -g -Og -Wall -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/build/test_python_59797æ/tempcwd/env/include -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build -c extension.c -o build/temp.macosx-14.0-arm64-cpython-313-pydebug/extension.o -Werror -DMODULE_NAME=_test_limited_c11_cext -std=c11 -DPy_LIMITED_API=0x30d00a5
      In file included from extension.c:7:
      In file included from /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/Python.h:58:
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:317:22: error: call to undeclared function '_Py_atomic_load_uint32_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
                           ^
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:321:25: error: call to undeclared function '_Py_atomic_load_ssize_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
                              ^
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:432:5: error: call to undeclared function '_Py_atomic_store_ssize_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          _Py_atomic_store_ssize_relaxed(&ob->ob_size, size);
          ^
      3 errors generated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

@vstinner
Copy link
Member Author

!buildbot ARM64 MacOS M1 NoGIL

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 821326d 🤖

The command will test the builders whose names match following regular expression: ARM64 MacOS M1 NoGIL

The builders matched are:

  • ARM64 MacOS M1 NoGIL PR

@vstinner
Copy link
Member Author

In fact, test_build_limited() and test_build_c11() fail with:

      gcc -fno-strict-overflow -Wsign-compare -g -Og -Wall -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/build/test_python_89802æ/tempcwd/env/include -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build -c extension.c -o build/temp.macosx-14.0-arm64-cpython-313-pydebug/extension.o -DMODULE_NAME=_test_limited_c11_cext -std=c11 -DPy_LIMITED_API=0x30d00a5
      In file included from extension.c:7:
      In file included from /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/Python.h:58:
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:317:22: error: call to undeclared function '_Py_atomic_load_uint32_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
                           ^
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:321:25: error: call to undeclared function '_Py_atomic_load_ssize_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
                              ^
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:432:5: error: call to undeclared function '_Py_atomic_store_ssize_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          _Py_atomic_store_ssize_relaxed(&ob->ob_size, size);
          ^
      3 errors generated.

and

      gcc -fno-strict-overflow -Wsign-compare -g -Og -Wall -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/build/test_python_89802æ/tempcwd/env/include -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include -I/Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build -c extension.c -o build/temp.macosx-14.0-arm64-cpython-313-pydebug/extension.o -DMODULE_NAME=_test_limited_c11_cext -std=c11 -DPy_LIMITED_API=0x30d00a5
      In file included from extension.c:7:
      In file included from /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/Python.h:58:
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:317:22: error: call to undeclared function '_Py_atomic_load_uint32_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          uint32_t local = _Py_atomic_load_uint32_relaxed(&ob->ob_ref_local);
                           ^
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:321:25: error: call to undeclared function '_Py_atomic_load_ssize_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          Py_ssize_t shared = _Py_atomic_load_ssize_relaxed(&ob->ob_ref_shared);
                              ^
      /Users/ec2-user/buildbot/buildarea/pull_request.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Include/object.h:432:5: error: call to undeclared function '_Py_atomic_store_ssize_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          _Py_atomic_store_ssize_relaxed(&ob->ob_size, size);
          ^
      3 errors generated.

@vstinner
Copy link
Member Author

!buildbot ARM64 MacOS M1 NoGIL

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 4096df8 🤖

The command will test the builders whose names match following regular expression: ARM64 MacOS M1 NoGIL

The builders matched are:

  • ARM64 MacOS M1 NoGIL PR

@vstinner
Copy link
Member Author

!buildbot ARM64 MacOS M1 NoGIL

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 4096df8 🤖

The command will test the builders whose names match following regular expression: ARM64 MacOS M1 NoGIL

The builders matched are:

  • ARM64 MacOS M1 NoGIL PR

@vstinner vstinner merged commit d5ebf8b into python:main Mar 19, 2024
@vstinner vstinner deleted the test_cext_gil_disabled branch March 19, 2024 22:23
vstinner added a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
Don't check for warnings on Free Threading.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants