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

Build wheels for macOS arm64 (Apple Silicon) #218

Merged
merged 44 commits into from
Jan 3, 2024

Conversation

sarlinpe
Copy link
Collaborator

@sarlinpe sarlinpe marked this pull request as ready for review December 21, 2023 12:36
@sarlinpe sarlinpe marked this pull request as draft December 21, 2023 22:49
@sarlinpe
Copy link
Collaborator Author

sarlinpe commented Dec 21, 2023

The arm64 wheels are broken because brew binaries are compiled for x86_64, so delocate fails - see the doc:

brew will not install the right arch for cross compilation of Apple Silicon wheels.

Homebrew also limits the compatibility of x86_64 wheels - see the logs:

2023-12-15T16:12:08.8876930Z ld: warning: dylib (/usr/local/lib/libflann.dylib) was built for newer macOS version (13.0) than being linked (10.9)
2023-12-15T16:12:08.8905560Z ld: warning: dylib (/usr/local/lib/liblz4.dylib) was built for newer macOS version (13.0) than being linked (10.9)
2023-12-15T16:12:08.9017020Z ld: warning: dylib (/usr/local/lib/libmetis.dylib) was built for newer macOS version (13.0) than being linked (10.9)
2023-12-15T16:12:08.9021240Z ld: warning: dylib (/usr/local/lib/libfreeimage.dylib) was built for newer macOS version (13.0) than being linked (10.9)
2023-12-15T16:12:08.9195260Z ld: warning: dylib (/usr/local/lib/libceres.2.2.0.dylib) was built for newer macOS version (13.0) than being linked (10.9)
2023-12-15T16:12:09.0070470Z ld: warning: dylib (/usr/local/lib/libglog.0.6.0.dylib) was built for newer macOS version (13.0) than being linked (10.9)
2023-12-15T16:12:09.0153530Z ld: warning: dylib (/usr/local/lib/libgflags.2.2.2.dylib) was built for newer macOS version (13.0) than being linked (10.9)

We could maybe install all dependencies with vcpkg instead.

@sarlinpe
Copy link
Collaborator Author

  • Install dependencies with VCPKG instead of Homebrew
    • Reduces the wheel size from 27 MB to 9 MB
    • Supports macOS >= 10.9 (previously only 12.x)
  • Builds wheels for arm64 - successfully tested

@sarlinpe sarlinpe marked this pull request as ready for review December 29, 2023 19:07
@sarlinpe sarlinpe merged commit 3f2b219 into master Jan 3, 2024
5 checks passed
@sarlinpe sarlinpe deleted the sarlinpe/macos-arm64-ci branch January 3, 2024 08:34
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.

None yet

2 participants