openscap fails to build with Python 3.13.03.
Mitigating the distutils issue made it possible for this error to appear:
/builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/swig/python3/CMakeFiles/_openscap_py.dir/openscapPYTHON_wrap.c: In function ‘rule_result_output_callback_wrapper’:
/builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/swig/python3/CMakeFiles/_openscap_py.dir/openscapPYTHON_wrap.c:3896:14: error: implicit declaration of function ‘PyEval_CallObject’; did you mean ‘PyObject_CallObject’? [-Wimplicit-function-declaration]
3896 | result = PyEval_CallObject(func,arglist);
| ^~~~~~~~~~~~~~~~~
| PyObject_CallObject
/builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/swig/python3/CMakeFiles/_openscap_py.dir/openscapPYTHON_wrap.c: In function ‘xccdf_policy_model_register_output_callback_py’:
/builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/swig/python3/CMakeFiles/_openscap_py.dir/openscapPYTHON_wrap.c:4072:5: error: implicit declaration of function ‘PyEval_InitThreads’; did you mean ‘PyEval_SaveThread’? [-Wimplicit-function-declaration]
4072 | PyEval_InitThreads();
| ^~~~~~~~~~~~~~~~~~
| PyEval_SaveThread
According to https://docs.python.org/3.13/whatsnew/3.13.html:
Remove PyEval_InitThreads() and PyEval_ThreadsInitialized() functions, deprecated in Python 3.9.
Since Python 3.7, Py_Initialize() always creates the GIL:
calling PyEval_InitThreads() did nothing and PyEval_ThreadsInitialized() always returned non-zero.
(Contributed by Victor Stinner in https://github.com/python/cpython/issues/105182.)https://docs.python.org/3.13/whatsnew/3.13.html
For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06941745-openscap/
For all our attempts to build openscap with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/openscap/
Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/
Let us know here if you have any questions.
Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.
Hello Evgeny,
issue already hit the rawhide.
I can see that the PyEval_InitThreads was already removed upstream in https://github.com/OpenSCAP/openscap/pull/2114/
But still the issue with PyObject_CallObject doesn't seem to be addressed.
Should we expect release 1.3.11 soon?
Thank you
Michal Ambroz
openscap fails to build with Python 3.13.03. Mitigating the distutils issue made it possible for this error to appear: /builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/swig/python3/CMakeFiles/_openscap_py.dir/openscapPYTHON_wrap.c: In function ‘rule_result_output_callback_wrapper’: /builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/swig/python3/CMakeFiles/_openscap_py.dir/openscapPYTHON_wrap.c:3896:14: error: implicit declaration of function ‘PyEval_CallObject’; did you mean ‘PyObject_CallObject’? [-Wimplicit-function-declaration] 3896 | result = PyEval_CallObject(func,arglist); | ^~~~~~~~~~~~~~~~~ | PyObject_CallObject /builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/swig/python3/CMakeFiles/_openscap_py.dir/openscapPYTHON_wrap.c: In function ‘xccdf_policy_model_register_output_callback_py’: /builddir/build/BUILD/openscap-1.3.9/redhat-linux-build/swig/python3/CMakeFiles/_openscap_py.dir/openscapPYTHON_wrap.c:4072:5: error: implicit declaration of function ‘PyEval_InitThreads’; did you mean ‘PyEval_SaveThread’? [-Wimplicit-function-declaration] 4072 | PyEval_InitThreads(); | ^~~~~~~~~~~~~~~~~~ | PyEval_SaveThread According to https://docs.python.org/3.13/whatsnew/3.13.html: Remove PyEval_InitThreads() and PyEval_ThreadsInitialized() functions, deprecated in Python 3.9. Since Python 3.7, Py_Initialize() always creates the GIL: calling PyEval_InitThreads() did nothing and PyEval_ThreadsInitialized() always returned non-zero. (Contributed by Victor Stinner in https://github.com/python/cpython/issues/105182.) https://docs.python.org/3.13/whatsnew/3.13.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06941745-openscap/ For all our attempts to build openscap with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/openscap/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.13: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/ Let us know here if you have any questions. Python 3.13 is planned to be included in Fedora 41. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.