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

curses: Ignore /usr/bin/ncurses5.4-config on macOS #13715

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

nirbheek
Copy link
Member

macOS mistakenly ships /usr/bin/ncurses5.4-config and a man page for it, but none of the headers or libraries are available in the location advertised by it. Ignore /usr/bin because it can only contain this broken configtool script. Homebrew is /usr/local or /opt/homebrew.

Xcode's command-line tools SDK does include curses, but the configtool in there is wrong too, and anyway we can't just randomly pick it up since the user must explicitly select that as a target by using a native file. The MacOSX SDK itself does not include curses.

We also can't ignore ncurses5.4-config entirely because it might be available in a different prefix.

@nirbheek nirbheek added OS:macos Issues specific to Apple Operating Systems like MacOS and iOS dependencies labels Sep 26, 2024
@@ -52,7 +52,7 @@
req_version = mesonlib.stringlistify(req_version_raw)
else:
req_version = []
tool, version = self.find_config(req_version, kwargs.get('returncode_value', 0))
tool, version = self.find_config(req_version, kwargs.get('returncode_value', 0), exclude_paths=exclude_paths)

Check warning

Code scanning / CodeQL

`__init__` method calls overridden method Warning

Call to self.
find_config
in __init__ method, which is overridden by
method GnuStepDependency.find_config
.
@nirbheek
Copy link
Member Author

This is a simple enough change, so I will merge in 1 week if there are no objections.

Copy link
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

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

I have a small request on the formatting of the docstrings, but code-wise this looks good to me. If you update the docstrings feel free to just push, it has my r-b

mesonbuild/programs.py Outdated Show resolved Hide resolved
@nirbheek nirbheek added this to the 1.5.3 milestone Oct 3, 2024
macOS mistakenly ships /usr/bin/ncurses5.4-config and a man page for
it, but none of the headers or libraries are available in the location
advertised by it. Ignore /usr/bin because it can only contain this
broken configtool script. Homebrew is /usr/local or /opt/homebrew.

Xcode's command-line tools SDK does include curses, but the configtool
in there is wrong too, and anyway we can't just randomly pick it up
since the user must explicitly select that as a target by using
a native file. The MacOSX SDK itself does not include curses.

We also can't ignore ncurses5.4-config entirely because it might be
available in a different prefix.
@nirbheek nirbheek merged commit d48602a into mesonbuild:master Oct 4, 2024
33 checks passed
@nirbheek nirbheek deleted the ncurses-macos branch October 4, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies OS:macos Issues specific to Apple Operating Systems like MacOS and iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants