Bug 2044291

Summary: python3.7 fails to build on all arches (_decimal can't be built)
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python3.7Assignee: Python Maintainers <python-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, mhroncok, python-maint, python-sig, thrnciar, torsava, vstinner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python3.7-3.7.12-7.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-03 12:13:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2038848    
Bug Blocks: 1992484    

Description Karolina Surma 2022-01-24 11:36:38 UTC
Python3.7 fails to build on all architectures with this error message:

File not found: /builddir/build/BUILDROOT/python3.7-3.7.12-5.fc36.i386/usr/lib/python3.7/lib-dynload/_decimal.cpython-37dm-<arch>-linux-gnu.so

The file in question doesn't exist because module _decimal is not built correctly.

builddir/build/BUILD/Python-3.7.12/Modules/_decimal/libmpdec/mpdecimal.c:333:1: error: inlining failed in call to ‘always_inline’ ‘mpd_iszero’: function not considered for inlining

Example build log: https://kojipkgs.fedoraproject.org//work/tasks/3879/81753879/build.log


Version-Release number of selected component (if applicable):
python3.7-3.7.12-5.fc36

How reproducible:
Run koji scratch build on python3.7

Comment 1 Miro Hrončok 2022-01-24 12:06:15 UTC
Funny that Python 3.8 built fine during the mass rebuild, but:

diff -ru python3.7/Python-3.7.12/Modules/_decimal/libmpdec/mpdecimal.h python3.8/Python-3.8.12/Modules/_decimal/libmpdec/mpdecimal.h
--- python3.7/Python-3.7.12/Modules/_decimal/libmpdec/mpdecimal.h	2021-09-04 05:49:21.000000000 +0200
+++ python3.8/Python-3.8.12/Modules/_decimal/libmpdec/mpdecimal.h	2021-08-30 16:26:41.000000000 +0200
@@ -135,6 +135,9 @@
   #elif defined(__x86_64__)
     #define CONFIG_64
     #define ASM
+  #elif defined(__arm64__)
+    #define CONFIG_64
+    #define ANSI
   #else
     #error "unknown architecture for universal build."
   #endif


Both builds happened with gcc-12.0.1-0.2.fc36.

Comment 2 Miro Hrončok 2022-01-25 10:37:35 UTC
This might help: https://src.fedoraproject.org/rpms/python3.7/pull-request/37

Comment 3 Miro Hrončok 2022-01-25 11:07:46 UTC
The workaround/fix is pushed and waiting to be built but blocked by bz2038848. Technically, this is fixed, but Koschei won't show until rebuilt.

Comment 4 Miro Hrončok 2022-01-25 11:09:36 UTC
It is possible that the bundled mpdecimal cannot be built with -O0 and GCC 12 but that should no longer bother us, as we unbundled it in 3.10+ (in bz1943359).

Comment 5 Fedora Update System 2022-02-03 12:10:11 UTC
FEDORA-2022-f550633b7d has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f550633b7d

Comment 6 Fedora Update System 2022-02-03 12:13:15 UTC
FEDORA-2022-f550633b7d has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.