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

Fix meson build on macOS in sandbox #11522

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

YorikSar
Copy link
Contributor

Motivation

Workaround at src/libstore/meson.build#L429-L434 by @Ericson2314 from #11302 erroneously used macos instead of darwin to distinguish macOS, while meson docs list only darwin: https://mesonbuild.com/Reference-tables.html#operating-system-names.

Context

Original thread: #2503 (comment)

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Workaround at src/libstore/meson.build#L429-L434 by @Ericson2314 from
NixOS#11302 erroneously used `macos` instead
of `darwin` to distinguish macOS, while meson docs list only `darwin`:
https://mesonbuild.com/Reference-tables.html#operating-system-names.

Original thread: NixOS#2503 (comment)
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Thank you so much!

@yannham
Copy link
Contributor

yannham commented Sep 17, 2024

Nitpick: this isn't entirely true. macos is listed in subsytems in https://mesonbuild.com/Reference-tables.html#subsystem-names-since-120 which says that it should cover OsX, while darwin is a superset including iOS. This is why I thought this wasn't the culprit initially, but if it solves the issue 🤷‍♂️ in anycase darwin is just more generic, so I don't think there's any particular risk here.

@YorikSar
Copy link
Contributor Author

@yannham The title there differs though: the first table lists system names, the second - subsystem names. It doesn't point to the function at the table, but https://mesonbuild.com/Cross-compilation.html#machine-entries points to .subsystem() function that I assume is supposed to return those strings.

@Ericson2314
Copy link
Member

@YorikSar Yeah I think it will accept macos as a configuration input, but the result of host_machine.system() will still be darwin.

@yannham
Copy link
Contributor

yannham commented Sep 17, 2024

Ah, I see. Of course it can't be both darwin and macos so what I said doesn't make sense 🤦‍♂️ still, the documentation could be clearer, as currently it doesn't mention subsystem() at all (while the section on system says explicitly that those are the result of calling the method .system()). Anyway, thanks for the fix and the clarification!

@Ericson2314 Ericson2314 merged commit 00013c7 into NixOS:master Sep 17, 2024
11 checks passed
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.

3 participants