-
Notifications
You must be signed in to change notification settings - Fork 3.2k
macOS: Errors when cross compiling for arm64 #6573
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
Comments
I have tried your build command (without the |
No, I was using the Xcode-supplied CMake 3.18... switching to the homebrew installed CMake 3.19 resolved it 🤦♂️ Would it be possible to add a check for the CMake version and aborting the build with a clear error when compiling for macOS/arm64 with CMake < 3.19 for people like me? |
We do have the CMake version requirements listed here https://github.com/microsoft/onnxruntime/blob/master/BUILD.md#macos, however it will be nice to raise the error in the building script for this scenario. |
I will submit a PR and publish a test package tomorrow. |
Once PR #8754 is merged, you can build it in a way like:
If you want a universal binary, please change the last part to
|
Closing this as compiling is now supported. Please reactivate if there are still issues. |
Describe the bug
I want to compile onnxruntime for new arm64 macs to build a universal onnxruntime binary. I do that with this command:
which is basically the same command as successfully used for our x86_64 mac builds. During compilation it fails with
The goal is to combine the x86_64 and arm64 build into a universal binary dylib using
lipo
.Urgency
Medium. We are currently working on porting our dependencies to universal binaries to create native M1 optimised versions of our software but this is still work in progress
System information
To Reproduce
Execute build command as above
Expected behavior
Successful compilation of an arm64 library
The text was updated successfully, but these errors were encountered: