-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support for MacOS Apple Silicon build for the ank CLI #80
Comments
I have tested crossbuilds in our current devcontainer for MacOS x86_64 and arm64 Silicon and both builds work. I have documented all the steps here below and the build(s) could be added to the CI / CD pipeline, but before few points must be clarified: # Install build dependencies
apt install \
clang \
gcc \
g++ \
cmake \
zlib1g-dev \
libmpc-dev \
libmpfr-dev \
libgmp-dev
# Add macOS Rust target
rustup target add x86_64-apple-darwin aarch64-apple-darwin
mkdir target && cd target
git clone https://github.com/tpoechtrager/osxcross
cd osxcross
# download cross compilation MacOSX here https://github.com/joseluisq/macosx-sdks/releases
wget -nc https://github.com/joseluisq/macosx-sdks/releases/download/13.3/MacOSX13.3.sdk.tar.xz
mv MacOSX13.3.sdk.tar.xz tarballs/
UNATTENDED=yes OSX_VERSION_MIN=10.7 ./build.sh
Insert the following to cargo.toml
[target.aarch64-apple-darwin]
linker = "aarch64-apple-darwin22.4-clang"
ar = "aarch64-apple-darwin22.4-ar"
[target.x86_64-apple-darwin]
linker = "x86_64-apple-darwin14-clang"
ar = "x86_64-apple-darwin14-ar"
If you've used a different macOS SDK version, you might need to replace darwin14 with darwinXY. To check what binary to use, look in osxcross/target/bin.
# Add --release to build in release mode
PATH="/workspaces/ankaios/target/osxcross/target/bin:$PATH" \
cargo build --target x86_64-apple-darwin
PATH="/workspaces/ankaios/target/osxcross/target/bin:$PATH" \
cargo build --target aarch64-apple-darwin Which version of MacOS SDK do we want to support? I know that arm64 Silicon crossbuild requires macOS 11.0 SDK (or later) Further I must check if we can optimize the workflow by for example preinstall clang into the devcontainer. Also we must change the install script accordingly and the question is the testing on target(s). |
While I see the need for the Ankaios CLI running on Mac/darwin, I am not sure about the server and agent as we need a Linux to run those. Even if we create binaries for server and agent, in which context will those run? |
@windsource also suggested windows support for the CLI |
I propose to add the following variants to the release which contain the
The last variant is for the growing number of laptops with Snapdragon X CPUs. In order not to blow up the dev container maybe we can add the toolchains on the fly in Github action. |
When we support the CLI for Windows, shell completions must be adapted as well for Powershell and Cmd. |
I have spitted the Windows part in a new issue #419. This issue keeps existing for MacOS. |
Description
Pre-built binaries
ank
CLI would be nice to have for MacOS. As the arm64 Silicon is quite dominant, we should support that in the first place.Goals
Having MacOS pre-built binaries of the CLI in release.
Final result
Summary
To be filled when the final solution is sketched.
Tasks
The text was updated successfully, but these errors were encountered: