Skip to content

macOS cross file is missing Objective-C compiler #468

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

Closed
QuLogic opened this issue Sep 2, 2023 · 5 comments · Fixed by #470
Closed

macOS cross file is missing Objective-C compiler #468

QuLogic opened this issue Sep 2, 2023 · 5 comments · Fixed by #470
Labels
enhancement New feature or request
Milestone

Comments

@QuLogic
Copy link
Member

QuLogic commented Sep 2, 2023

I'm porting Matplotlib to Meson/meson-python, and one thing we use on macOS that isn't used elsewhere is the objc compiler. When building arm64 wheels on macOS via GitHub Actions, cibuildwheel uses a cross-compiler.

Meson-python correctly sets up a cross C compiler and cross C++ compiler. However, meson fails to find the objc compiler.

I believe meson-python is missing an entry for it in its automatically-generated cross file.

@dnicolodi
Copy link
Member

It is easy to add an entry for the objc compiler (and maybe objcpp too, while we are at it). However, to what command should we set these? The obvious choice would be objc -arch $arch, but an objc command does not seem to exist.

dnicolodi added a commit to dnicolodi/meson-python that referenced this issue Sep 2, 2023
Allows $ARCHFLAGS enabled cross compilation of objc and objcpp.

Fixes mesonbuild#468.
@dnicolodi
Copy link
Member

Never mind, cc and c++ seem to do the trick.

@dnicolodi
Copy link
Member

Can you please test if #470 works as expected?

rgommers pushed a commit that referenced this issue Sep 5, 2023
Allows $ARCHFLAGS enabled cross compilation of objc and objcpp.

Fixes #468.
@rgommers rgommers added this to the v0.14.0 milestone Sep 5, 2023
@rgommers rgommers added the enhancement New feature or request label Sep 5, 2023
@QuLogic
Copy link
Member Author

QuLogic commented Sep 6, 2023

Thanks for the update, it looks like 0.14.0 was successful: https://github.com/matplotlib/matplotlib/actions/runs/6095062066/job/16537929593?pr=26621

@rgommers
Copy link
Contributor

rgommers commented Sep 7, 2023

Thanks for confirming. And great to see a working Matplotlib build!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants