mesonbuild / meson-python

Meson PEP 517 Python build backend
https://mesonbuild.com/meson-python/
MIT License
126 stars 65 forks source link

macOS cross file is missing Objective-C compiler #468

Closed QuLogic closed 1 year ago

QuLogic commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

dnicolodi commented 1 year ago

Can you please test if #470 works as expected?

QuLogic commented 1 year ago

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 commented 1 year ago

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