Bug 2260316 - openscap fails to build with Python 3.13: error: implicit declaration of function ‘PyEval_InitThreads’
Summary: openscap fails to build with Python 3.13: error: implicit declaration of func...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openscap
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Ambroz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2291569 (view as bug list)
Depends On:
Blocks: F41FTBFS F41FailsToInstall PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-01-25 08:54 UTC by Karolina Surma
Modified: 2024-07-08 09:48 UTC (History)
13 users (show)

Fixed In Version: openscap-1.3.10-4.fc41
Clone Of:
Environment:
Last Closed: 2024-07-08 09:48:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2024-01-25 08:54:06 UTC
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.

Comment 1 Michal Ambroz 2024-01-26 02:28:24 UTC
https://github.com/OpenSCAP/openscap/issues/2077

Comment 2 Michal Ambroz 2024-01-26 02:32:27 UTC
Evgeny do I assume it right you are already dealing with this upstream?

Comment 3 Evgeny Kolesnikov 2024-01-30 19:49:46 UTC
No, we do not. It is highly unlikely it would be an upstream priority until it hits Rawhide.

Comment 4 Michal Ambroz 2024-01-31 21:02:18 UTC
mkey ... thanks for info.
I will take the ticket for now, not sure I would be able to change the interface myself.

Comment 5 Aoife Moloney 2024-02-15 23:12:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 6 Karolina Surma 2024-06-12 14:56:53 UTC
*** Bug 2291569 has been marked as a duplicate of this bug. ***

Comment 7 Michal Ambroz 2024-06-14 08:57:48 UTC
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

Comment 8 Miro Hrončok 2024-07-07 12:46:50 UTC
For the record, this built but is stuck on gating:

https://bodhi.fedoraproject.org/updates/FEDORA-2024-fe32aa49f9

You might know better if we should waive the results.

Comment 9 Jan Černý 2024-07-08 09:43:08 UTC
I have waived the CI


Note You need to log in before you can comment on or make changes to this bug.