-
Notifications
You must be signed in to change notification settings - Fork 69
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
Cross compiling build error with fortran, MacOS-arm64, and cibuildwheel. #548
Comments
A quick hint on this: SciPy uses Cirrus CI, which provides native macOS arm64 runners. There's some |
Does Xcode come with a fortran compiler capable of cross compilation? |
Thanks @rgommers , I hadn't realized that Cirrus Ci had macOS arm64 runners. I was hesitant to add another CI provider, but I now see that it will likely be much easier than cross compiling on macOS. |
I'm new to apple, but I don't believe Xcode comes with any Fortran compiler. I was planning on using gfortran for that reason. I'm going to close this issue since I see that it is best to avoid cross compiling altogether in this case. Thank you for your help! |
Fortran compilers are indeed a major issue, on macOS and even more on Windows. Apple doesn't provide one, and the Gfortran builds one can find try to keep compatibility with Apple's Clang, but there are regularly issues when there's an OS update. They also require specific macOS SDK versions, and for wheels require bundling This is all messy, and I recommend looking at this very recent PR that streamlined this as much as possible: numpy/numpy#25253. |
Switching to Cirrus CI and following the configuration files from Scipy/Numpy fixed my issues and I can now build wheels for macOS-arm64. Thanks for your help! Now that macOS-arm64 is in a good place, I'll have to give the window wheels another shot. I got close before (again basically just coping the workflow from Scipy), but got stuck on linking errors related to "relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol". I see that you recently modified the meson.build files in Scipy for windows, so I'll make the corresponding changes in my project to see if that does the trick. Thanks again for all your help! |
That sounds like progress, thanks for the update @joanibal. The "relocation truncated" issue doesn't ring a bell for me. |
Hello,
I'm trying to create apple silicon python wheels for my application using
cibuildwheel
,meson-python
, and amacos-12
github runner.However, I can not seem to figure out how to do this.
In particular I can't get passed this error
Indeed the meson cross file does not mention fortran and it would seem that it is hard coded here.
I'm new to meson, so my apologies if I overlooked something basic.
Most of the CI I have setup for building wheels is based on Scipy since it has a similar set of dependencies (LAPACK and gfortran). I have tried to mirror what they have done to create
MacOS-arm64
wheels, but their process forMacOS-arm64
wheels was much less clear to me.Thank you for any help!
The text was updated successfully, but these errors were encountered: