Bug 1943359 - Unbundle libmpdec/mpdecimal (or at least provide bundled(libmpdec)/bundled(mpdecimal))
Summary: Unbundle libmpdec/mpdecimal (or at least provide bundled(libmpdec)/bundled(mp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python3.10
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Python Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-25 21:27 UTC by Miro Hrončok
Modified: 2022-02-23 03:33 UTC (History)
8 users (show)

Fixed In Version: python3.10-3.10.0~b1-2.fc35 python3.10-3.10.0~b2-1.fc33 python3.10-3.10.0~b2-1.fc34
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-09 02:44:39 UTC
Type: Bug


Attachments (Terms of Use)

Description Miro Hrončok 2021-03-25 21:27:33 UTC
Python bundles libmpdec:

  https://github.com/python/cpython/tree/master/Modules/_decimal/libmpdec

libmpdec is mpdecimal in Fedora (possibly):

  https://src.fedoraproject.org/rpms/mpdecimal

Let's try to unbandle it and if it fails, at least provide bundled(libmpdec) or bundled(mpdecimal).

(This also applies for older Pythons.)

Comment 1 Charalampos Stratakis 2021-03-29 15:19:00 UTC
Some very draft testing by trying to build by removing the folder:

/home/Harris/dev/cpython/Modules/_decimal/_decimal.c:32:10: fatal error: mpdecimal.h: No such file or directory
   32 | #include "mpdecimal.h"
      |          ^~~~~~~~~~~~~
compilation terminated.

After installing mpdecimal-devel:

building '_decimal' extension
gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -DCONFIG_64=1 -DASM=1 -I/home/Harris/dev/cpython/Modules/_decimal/libmpdec -I./Include -I. -I/usr/local/include -I/home/Harris/dev/cpython/Include -I/home/Harris/dev/cpython -c /home/Harris/dev/cpython/Modules/_decimal/_decimal.c -o build/temp.linux-x86_64-3.10/home/Harris/dev/cpython/Modules/_decimal/_decimal.o
gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -DCONFIG_64=1 -DASM=1 -I/home/Harris/dev/cpython/Modules/_decimal/libmpdec -I./Include -I. -I/usr/local/include -I/home/Harris/dev/cpython/Include -I/home/Harris/dev/cpython -c _decimal/libmpdec/basearith.c -o build/temp.linux-x86_64-3.10/_decimal/libmpdec/basearith.o
gcc: error: _decimal/libmpdec/basearith.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.

Comment 2 Miro Hrončok 2021-03-29 15:20:36 UTC
Try --with-system-libmpdec

Comment 3 Charalampos Stratakis 2021-03-29 15:37:27 UTC
(In reply to Miro Hrončok from comment #2)
> Try --with-system-libmpdec

Well I don't know why I didn't think of checking the configure script. The option exists and everything builds fine.

Comment 9 Miro Hrončok 2021-03-30 11:26:44 UTC
Note by Victor: When we ubunudle, we should switch the Fedora buildbots to do the same.

We should also talk to the mpdecimal Fedora maintainer about our plan.

Comment 11 Charalampos Stratakis 2021-05-18 16:18:40 UTC
This issue affects only python3, python2 doesn't bundle libmpdec.

Comment 12 Miro Hrončok 2021-05-26 10:56:14 UTC
All Python 3 packages < 3.10 now provide bundled(mpdecimal) and bundled(libmpdec) in rawhide. Backports exist but not all have been built.

Python 3.10 (python3.10-3.10.0~b1-2 and further) uses the system mpdecimal. Me and cstratak now co-maintain mpdecimal in Fedora.

On rawhide, there are CI tests in mpdecimal that run Python's test for the decimal module: https://src.fedoraproject.org/rpms/mpdecimal/blob/rawhide/f/tests/tests_python.yml

They use the "main" Python version, which is 3.9 for now, so the tests are kinda useless at this moment, but we plan to update to Python 3.10 really soon.

Comment 13 Fedora Update System 2021-05-26 12:52:24 UTC
FEDORA-2021-0ea585e459 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-0ea585e459

Comment 14 Fedora Update System 2021-05-26 12:52:25 UTC
FEDORA-2021-66690837c0 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-66690837c0

Comment 15 Fedora Update System 2021-05-27 01:32:13 UTC
FEDORA-2021-0ea585e459 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-0ea585e459`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-0ea585e459

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2021-05-27 01:39:29 UTC
FEDORA-2021-66690837c0 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-66690837c0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-66690837c0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2021-06-02 01:35:49 UTC
FEDORA-2021-40c604baa0 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-40c604baa0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-40c604baa0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 18 Fedora Update System 2021-06-02 01:41:43 UTC
FEDORA-2021-7c9181adff has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-7c9181adff`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-7c9181adff

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2021-06-09 02:44:39 UTC
FEDORA-2021-40c604baa0 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 20 Fedora Update System 2021-06-09 03:06:31 UTC
FEDORA-2021-7c9181adff has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2022-02-23 03:30:06 UTC
FEDORA-2022-94a79eab1a has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-94a79eab1a

Comment 22 Fedora Update System 2022-02-23 03:33:25 UTC
FEDORA-2022-94a79eab1a has been pushed to the Fedora 37 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.