Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-115119: Fall back to bundled libmpdec if system libmpdec is not found #119196

Merged
merged 1 commit into from
May 20, 2024

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented May 20, 2024

$ brew unlink libmpdec
$ ./configure --with-system-libmpdec | grep -E "(decimal|mpdec)"
checking for --with-system-libmpdec... yes
checking for libmpdec >= 2.5.0... no
configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
checking for --with-decimal-contextvar... yes
checking for decimal libmpdec machine... universal
checking for stdlib extension module _decimal... yes
$ grep 'DECIMAL_.*FLAGS' Makefile
MODULE__DECIMAL_CFLAGS=-I$(srcdir)/Modules/_decimal/libmpdec -DUNIVERSAL=1
MODULE__DECIMAL_LDFLAGS=-lm $(LIBMPDEC_A)

$ ./configure | grep -E "(decimal|mpdec)"
checking for --with-system-libmpdec... yes
checking for libmpdec >= 2.5.0... no
configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
checking for --with-decimal-contextvar... yes
checking for decimal libmpdec machine... universal
checking for stdlib extension module _decimal... yes
$ grep 'DECIMAL_.*FLAGS' Makefile
MODULE__DECIMAL_CFLAGS=-I$(srcdir)/Modules/_decimal/libmpdec -DUNIVERSAL=1
MODULE__DECIMAL_LDFLAGS=-lm $(LIBMPDEC_A)

$ ./configure --without-system-libmpdec | grep -E "(decimal|mpdec)"
checking for --with-system-libmpdec... no
configure: WARNING: the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; consider using a system installed mpdecimal library.
checking for --with-decimal-contextvar... yes
checking for decimal libmpdec machine... universal
checking for stdlib extension module _decimal... yes
$ grep ‘DECIMAL_.*FLAGS’ Makefile
MODULE__DECIMAL_CFLAGS=-I$(srcdir)/Modules/_decimal/libmpdec -DUNIVERSAL=1
MODULE__DECIMAL_LDFLAGS=-lm $(LIBMPDEC_A)

$ brew link libmpdec
$ ./configure --with-system-libmpdec | grep -E "(decimal|mpdec)"
checking for --with-system-libmpdec... yes
checking for libmpdec >= 2.5.0... yes
checking for --with-decimal-contextvar... yes
checking for stdlib extension module _decimal... yes
$ grep ‘DECIMAL_.*FLAGS’ Makefile
MODULE__DECIMAL_CFLAGS=-I/opt/homebrew/Cellar/mpdecimal/4.0.0/include
MODULE__DECIMAL_LDFLAGS=-L/opt/homebrew/Cellar/mpdecimal/4.0.0/lib -lmpdec -lm

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit c537d8b 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 20, 2024
Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented May 20, 2024

Thanks for the review, Ned! FTR, the buildbot failures all seem unrelated1

Footnotes

  1. buildbot/PPC64LE Fedora Stable Refleaks PR is another regression I introduced in sqlite3; PR is already up merged 😄

@erlend-aasland
Copy link
Contributor Author

I'll wait for Zach to chime in before landing.

@vstinner
Copy link
Member

cc @hroncok who had issues with this issue.

@erlend-aasland
Copy link
Contributor Author

Merging, as per Ned's comment on Discord.

@erlend-aasland erlend-aasland merged commit 642b25b into python:main May 20, 2024
121 of 126 checks passed
@erlend-aasland erlend-aasland deleted the libmpdec-fallback branch May 20, 2024 14:58
@miss-islington-app

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 20, 2024
…not found (pythonGH-119196)

(cherry picked from commit 642b25b)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
@bedevere-app
Copy link

bedevere-app bot commented May 20, 2024

GH-119217 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 20, 2024
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request May 20, 2024
erlend-aasland added a commit that referenced this pull request May 20, 2024
erlend-aasland added a commit that referenced this pull request May 20, 2024
… not found (GH-119196) (#119217)

(cherry picked from commit 642b25b)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants