Bug 2044291 - python3.7 fails to build on all arches (_decimal can't be built)
Summary: python3.7 fails to build on all arches (_decimal can't be built)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python3.7
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Python Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2038848
Blocks: F36FTBFS
TreeView+ depends on / blocked
 
Reported: 2022-01-24 11:36 UTC by Karolina Surma
Modified: 2022-02-03 12:13 UTC (History)
7 users (show)

Fixed In Version: python3.7-3.7.12-7.fc36
Clone Of:
Environment:
Last Closed: 2022-02-03 12:13:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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