Skip to content

gh-115119: Fix libmpdec detection when pkg-config files are missing#150502

Open
stratakis wants to merge 2 commits into
python:mainfrom
stratakis:libmpdec_liiiiink
Open

gh-115119: Fix libmpdec detection when pkg-config files are missing#150502
stratakis wants to merge 2 commits into
python:mainfrom
stratakis:libmpdec_liiiiink

Conversation

@stratakis
Copy link
Copy Markdown
Contributor

@stratakis stratakis commented May 27, 2026

The fallback for systems with no mpdecimal .pc files used AC_LINK_IFELSE directly, which relied on LIBMPDEC_LIBS being set. On failure this was empty so the link test ran without -lmpdec.

Use AC_CHECK_HEADER and AC_CHECK_LIB instead.

…sing

The fallback for systems with no mpdecimal .pc files used AC_LINK_IFELSE
directly, which relied on LIBMPDEC_LIBS being set. On failure this was empty
so the link test ran without -lmpdec.

Use AC_CHECK_HEADER and AC_CHECK_LIB instead.
@stratakis
Copy link
Copy Markdown
Contributor Author

Found when trying to test what configure options to add for my buildbots and I saw the _decimal module wasn't actually building on centos stream 9 and 10, because they ship mpdecimal 2.5.1, hence no .pc files.

I followed the convention of other libraries.

@skirpichev skirpichev self-requested a review May 27, 2026 02:44
@skirpichev
Copy link
Copy Markdown
Member

Could you please add a news entry?

Copy link
Copy Markdown
Member

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

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

LGTM (modulo news entry)

Thanks for fixing this, it was my fault to believe, that pkg-config support was introduced in v2.5.0. But it was v4.0.0.

(Tested with v2.5.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants