Visitar URL original
gh-82924: configure: on darwin add CoreFoundation to flags before checking for gettext by jpc · Pull Request #17090 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20260306181032/https://github.com/python/cpython/pull/17090
Skip to content
/ cpython Public

gh-82924: configure: on darwin add CoreFoundation to flags before checking for gettext#17090

Closed
jpc wants to merge 1 commit intopython:mainfrom
jpc:darwin-gettext-detection
Closed

gh-82924: configure: on darwin add CoreFoundation to flags before checking for gettext#17090
jpc wants to merge 1 commit intopython:mainfrom
jpc:darwin-gettext-detection

Conversation

@jpc
Copy link

@jpc jpc commented Nov 8, 2019 •

macOS needs to link to CoreFoundation for gettext to work. We reorder the autoconf tests so CoreFoundation is added to LIBS earlier and the -lintl test does not fail (which would exclude it from the final set of flags).

Btw. the whole test seems fishy: if compilation fails it does not mean -lintl is not needed, for this we would need to test a gettext function without -lintl. Basically two tests (with and without -lintl) are needed to properly diagnose the situation. The test in question had been written in 2009 as a fix for the https://bugs.python.org/issue6154 bug report.

This may be an issue only with non-Framework builds (since Homebrew manages to build a framework-based Python on macOS without any special shenigans) but I had not tested it.

https://bugs.python.org/issue38743

…gettext

macOS needs to link to CoreFoundation for gettext to work. We reorder the
autoconf tests so CoreFoundation is added to LIBS earlier and the -lintl test
does not fail (which would exclude it from the final set of flags).
@ronaldoussoren
Copy link
Contributor

I don't understand why this PR is needed (ignoring the branch conflict), as far as I know there is no libintl on macOS, making this a no-op.

@jpc
Copy link
Author

jpc commented Feb 29, 2024

Hi, thanks for the comment. This was 3 years ago so I don't remember all the context but I think the problem is that gettext only works if you link to CoreFoundation. Otherwise the code tries -lintl which fails. I think it only affected traditional UNIX-like builds of Python (and not Framework-based builds).

Someone seems to describe a similar problem here: https://github.com/orgs/Homebrew/discussions/3291 ?

@picnixz picnixz changed the title bpo-38743: configure: on darwin add CoreFoundation to flags before checking for gettext gh-82924: configure: on darwin add CoreFoundation to flags before checking for gettext Dec 2, 2024
@picnixz
Copy link
Member

picnixz commented Dec 2, 2024

@ronaldoussoren What should we do with this issue and PR?

@erlend-aasland
Copy link
Contributor

Closing, as the linked issue is closed.

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.

8 participants