I'd appreciate if we could backport this upstream commit into rawhide: commit 12078e78f6e4a21f344e4eaff529e1ff3b97734f Author: Sam James <sam> Date: Sat Nov 5 08:30:31 2022 +0000 gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (#99085) It fixes an error in the C99 tester. I noted in the spec file that you want to keep various releases in sync (and I'm not entirely sure how your patch management system works), otherwise I'd have done it myself. The other Python versions probably need this, too.
How fast do you actually need this landed in rawhide proper? Would waiting a ~month for the next release not do? This has been backported upstream to 3.10+. We will probably end up backporting it the older ones.
(In reply to Miro Hrončok from comment #1) > How fast do you actually need this landed in rawhide proper? Would waiting a > ~month for the next release not do? I hope to reduce the number of impacted packages substantially, but it will be a while until Python stands out. Realistically, it will take more than a month unfortunately. On the other hand, every little bit helps …
A new batch of Python updates was released today. Hopefully, they contain this fix at least for 3.10+.
$ git l v3.12.0a3 | grep 'Fix implicit int compiler warning' * 12078e78f6e 2022-11-05 Sam James - gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (#99085) $ git l v3.11.1 | grep 'Fix implicit int compiler warning' * 573b4518867 2022-11-05 Erlend E. Aasland - [3.11] gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (GH-99085) (#99118) $ git l v3.10.9 | grep 'Fix implicit int compiler warning' * 0d5b25bd874 2022-11-06 Erlend E. Aasland - [3.10] gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (GH-99085) (#99119)
Cool, thanks!
> The other Python versions probably need this, too. Is there a copr repo we can use to test our backports?
(In reply to Miro Hrončok from comment #7) > > The other Python versions probably need this, too. > > Is there a copr repo we can use to test our backports? <https://fedoraproject.org/wiki/Toolchain/PortingToModernC#Special_COPR_repository_with_instrumented_GCC> There's also a rawhide side tag with the same (and that one has all Fedora architecture).
Miro, are you going to backport this further? Earlier Python releases are still in the buildroot, and are impacted as well. Thanks.
Since nothing depends on older Python 3, it has not been a priority for us. The plan is to eventually do it (where "eventually" might even mean "once they actually FTBFS"). Is it a priority for you? If so, we can prioritize it. I guess ~10 packages depend on Python 2, so if that is blocking you, we can do it first. For example, Python 3.7 is scheduled to be retired from F40 https://fedoraproject.org/wiki/Changes/RetirePython3.7 and so is https://fedoraproject.org/wiki/Changes/PortingToModernC -- so backporting this to 3.7 would be wasted effort.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
Can we close this issue since it has been fixed?
Oh, Python 2.7 needs extra fix: https://github.com/fedora-python/cpython/pull/57
Everything seems to be building fine at this moment. python3.6 seems to be fine 🤷
Florian contacted me. Apparently, the packages build succesfully, but the configure check for PTHREAD_SCOPE_SYSTEM fails and hence a feature is not used. We have not investigated the actual outcome, but the backport is still needed.
The error log entries I have are these: python2.7: conftest.c:117: implicit-function-declaration: exit python2.7: conftest.c:286: implicit-function-declaration: exit python2.7: conftest.c:288: implicit-function-declaration: exit python2.7: conftest.c:304: implicit-function-declaration: close python2.7: /builddir/build/BUILD/Python-2.7.18/Modules/_tkinter.c:1178: incompatible-pointer-types python3.6: conftest.c:134: implicit-function-declaration: exit python3.6: conftest.c:368: implicit-function-declaration: exit python3.6: conftest.c:367: implicit-function-declaration: exit python3.6: conftest.c:381: implicit-function-declaration: exit python3.6: conftest.c:379: implicit-function-declaration: nice python3.6: conftest.c:384: implicit-function-declaration: close python3.8: conftest.c:137: implicit-int python3.9: conftest.c:142: implicit-int I built these Python package versions in rawhide: python2.7 python3.6 python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 So half of them are already fixed. I hope that's the complete set of relevant Python versions. Full build logs are available here: https://gitlab.com/fweimer-rh/fedora-modernc-logs/-/tree/main/logs/p Compilers with the instrumentation: https://fedoraproject.org/wiki/Toolchain/PortingToModernC#Special_COPR_repository_with_instrumented_GCC
Working on python3.9 and python3.8.
https://src.fedoraproject.org/rpms/python3.9/pull-request/154 https://src.fedoraproject.org/rpms/python3.8/pull-request/104
FEDORA-2023-3a9703dc94 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-3a9703dc94
FEDORA-2023-3a9703dc94 has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-424aabfb7a has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-424aabfb7a
FEDORA-2023-424aabfb7a has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
This leaves: python2.7: conftest.c:117: implicit-function-declaration: exit python2.7: conftest.c:286: implicit-function-declaration: exit python2.7: conftest.c:288: implicit-function-declaration: exit python2.7: conftest.c:304: implicit-function-declaration: close python2.7: /builddir/build/BUILD/Python-2.7.18/Modules/_tkinter.c:1178: incompatible-pointer-types And: python3.6: conftest.c:134: implicit-function-declaration: exit python3.6: conftest.c:368: implicit-function-declaration: exit python3.6: conftest.c:367: implicit-function-declaration: exit python3.6: conftest.c:381: implicit-function-declaration: exit python3.6: conftest.c:379: implicit-function-declaration: nice python3.6: conftest.c:384: implicit-function-declaration: close We have https://github.com/python/cpython/commit/90c6facebd5666fec85f125ee2795b48b30319a4 (nice and close) And https://github.com/python/cpython/commit/674fa0a740151e0416c9383f127b16014e805990 (exit) The TkInter might require a custom fix, the code on Python 3 changed a lot.
> The TkInter might require a custom fix, the code on Python 3 changed a lot. This should work: - return Tcl_NewUnicodeObj(inbuf, size); + return Tcl_NewUnicodeObj((const Tcl_UniChar *)inbuf, size); There's a bunch of code before that to make sure the cast is valid in practice.
Florian, could you please verify https://src.fedoraproject.org/rpms/python3.6/pull-request/76 is complete?
FEDORA-2023-05da542b48 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-05da542b48
FEDORA-2023-05da542b48 has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
(In reply to Miro Hrončok from comment #23) > This leaves: > > python2.7: conftest.c:117: implicit-function-declaration: exit > python2.7: conftest.c:286: implicit-function-declaration: exit > python2.7: conftest.c:288: implicit-function-declaration: exit > python2.7: conftest.c:304: implicit-function-declaration: close > python2.7: /builddir/build/BUILD/Python-2.7.18/Modules/_tkinter.c:1178: > incompatible-pointer-types > > And: > > python3.6: conftest.c:134: implicit-function-declaration: exit > python3.6: conftest.c:368: implicit-function-declaration: exit > python3.6: conftest.c:367: implicit-function-declaration: exit > python3.6: conftest.c:381: implicit-function-declaration: exit > python3.6: conftest.c:379: implicit-function-declaration: nice > python3.6: conftest.c:384: implicit-function-declaration: close What should we do about python2.7? We are down to: conftest.c:117: implicit-function-declaration: exit conftest.c:286: implicit-function-declaration: exit conftest.c:288: implicit-function-declaration: exit conftest.c:304: implicit-function-declaration: close /builddir/build/BUILD/Python-2.7.18/Modules/_tkinter.c:1178: incompatible-pointer-types This could be the result of better GCC instrumentation which suppresses more meaningless errors.
> What should we do about python2.7? It should be fixed. I plan to do that, but there are more urgent things before my PTO at the end of the year. I will get to it next year.
Here we go, as expected, python2.7 now FTBFS: /builddir/build/BUILD/Python-2.7.18/Modules/_tkinter.c:1178:38: error: passing argument 1 of ‘Tcl_NewUnicodeObj’ from incompatible pointer type [-Wincompatible-pointer-types]
(In reply to Miro Hrončok from comment #30) > Here we go, as expected, python2.7 now FTBFS: > > /builddir/build/BUILD/Python-2.7.18/Modules/_tkinter.c:1178:38: error: > passing argument 1 of ‘Tcl_NewUnicodeObj’ from incompatible pointer type > [-Wincompatible-pointer-types] Yeah. Please note that GCC 14 will not flag the errors that cause the configure script go wrong. For now, my instrumented GCC 13 compiler still works for that, but after the mass rebuild, it will likely be uninstallable on rawhide. You'd have to manually diff config.log and config.h against Fedora 39 to see if there are any regressions caused by autoconf checks going wrong.
https://src.fedoraproject.org/rpms/python2.7/pull-request/68 is open and ready for testing. Florian, could you please submit it to your instrumented GCC 13 compiler as well?
FEDORA-2024-7fe88314a5 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-7fe88314a5
FEDORA-2024-7fe88314a5 has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.