-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Build failure due to missing _Py_SINGLETON in static-extension-modules build (3.13 only) #119661
Comments
_Py_SINGLETON() cannot and must not be used outside CPython internals. If you use Argument Clinic, you can try to generate code using the limited C API instead. |
We are building CPython 3.13.0b1, the failure happens in the |
Can you attach generated Modules/clinic/_curses_panel.c.h file? |
Build command: |
We're building from the 3.13.0b1 tarball downloaded from python.org, which has that file (and presumably all of the other 'clinic' files) already generated and present in |
When the _Py_SINGLETON() is used, Argument Clinic now adds an explicit "pycore_runtime.h" include to get the macro. Previously, the macro may or may not be included indirectly by another include.
I wrote PR gh-119712 to add an explicit include to get the _Py_SINGLETON() macro. You can see that the PR changes Modules/clinic/_curses_panel.c.h to add: #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
# include "pycore_runtime.h" // _Py_SINGLETON()
#endif |
When the _Py_SINGLETON() is used, Argument Clinic now adds an explicit "pycore_runtime.h" include to get the macro. Previously, the macro may or may not be included indirectly by another include.
…hon#119712) When the _Py_SINGLETON() is used, Argument Clinic now adds an explicit "pycore_runtime.h" include to get the macro. Previously, the macro may or may not be included indirectly by another include. (cherry picked from commit 7ca74a7)
Thank you! We'll apply a local patch with the contents of that PR. |
…19712) (#119716) gh-119661: Add _Py_SINGLETON() include in Argumenet Clinic (#119712) When the _Py_SINGLETON() is used, Argument Clinic now adds an explicit "pycore_runtime.h" include to get the macro. Previously, the macro may or may not be included indirectly by another include. (cherry picked from commit 7ca74a7)
…hon#119712) When the _Py_SINGLETON() is used, Argument Clinic now adds an explicit "pycore_runtime.h" include to get the macro. Previously, the macro may or may not be included indirectly by another include.
…hon#119712) When the _Py_SINGLETON() is used, Argument Clinic now adds an explicit "pycore_runtime.h" include to get the macro. Previously, the macro may or may not be included indirectly by another include.
Bug report
Bug description:
While attempting to upgrade python-build-standalone to support Python 3.13 beta releases, we've run into a build failure which may be caused by Argument Clinic failing to ensure that all necessary
#include
directives are emitted into the source files it generates.The failure can be seen here. Granted this is a very unusual way to build CPython, but given some of the discussions at the recent Packaging Summit it may become more valuable soon :-)
It was suggested that @vstinner might have the knowledge needed to understand what is happening here, so apologies in advance for the direct ping :-)
I'm happy to include patches into that build tree to see if we can overcome the problem before the next beta release, and I'm also happy to make that branch writable by others who want to try to help troubleshoot.
CPython versions tested on:
3.13
Operating systems tested on:
Linux, macOS, Windows
Linked PRs
The text was updated successfully, but these errors were encountered: