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

Apple Silicon GitHub release? #1088

Closed
karlhepler opened this issue Aug 23, 2022 · 6 comments · Fixed by #1552
Closed

Apple Silicon GitHub release? #1088

karlhepler opened this issue Aug 23, 2022 · 6 comments · Fixed by #1552

Comments

@karlhepler
Copy link

Looking in the GitHub releases, I don't see one for Apple Silicon. I might be overlooking it? I'm not sure. If I'm overlooking it, please let me know which artifact supports Apple Silicon. If it's not there, then would it be too much trouble to ask for it to be built into the GitHub releases in the near future?

@themkat
Copy link
Contributor

themkat commented Aug 23, 2022

I think this will be very easy to implement once Github Actions has Apple Sillicon runners:
actions/runner-images#2187
github/roadmap#528

From what I can see, it does not have an exact release yet. Set for the future in the roadmap. Only supported for self-hosted runners as of now.

Another option would be to cross-compile, but that would probably require some more setup.

@sharkdp
Copy link
Owner

sharkdp commented Aug 23, 2022

We already use cargo cross for cross-compilation. But I'm not sure if aarch64-apple-darwin is supported out of the box. It seems like it needs some macOS SDK?! (cross-rs/cross#508)

Would be easy to check though, if someone wants to pick this up. Just try to add the new architecture somewhere here:

- { os: ubuntu-20.04, target: arm-unknown-linux-gnueabihf , use-cross: true }
- { os: ubuntu-20.04, target: arm-unknown-linux-musleabihf, use-cross: true }
- { os: ubuntu-20.04, target: aarch64-unknown-linux-gnu , use-cross: true }
- { os: ubuntu-20.04, target: i686-unknown-linux-gnu , use-cross: true }
- { os: ubuntu-20.04, target: i686-unknown-linux-musl , use-cross: true }
- { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu , use-cross: true }
- { os: ubuntu-20.04, target: x86_64-unknown-linux-musl , use-cross: true }
- { os: macos-latest , target: x86_64-apple-darwin }
# - { os: windows-2019, target: i686-pc-windows-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found
- { os: windows-2019, target: i686-pc-windows-msvc }
- { os: windows-2019, target: x86_64-pc-windows-gnu }
- { os: windows-2019, target: x86_64-pc-windows-msvc }

@carlocab
Copy link

carlocab commented Sep 1, 2022

It seems like it needs some macOS SDK?! (cross-rs/cross#508)

The macOS SDK is installed on GitHub Actions macOS runners. (You actually probably need it to use Rust at all on macOS.)

@rami3l
Copy link

rami3l commented Sep 10, 2022

@sharkdp Just coming by and I want to mention that it's possible to have ASi binaries compiled today on GitHub CI (I didn't even bother with cargo cross), and this is what I have been doing with my own project for months:

     - name: Set macOS environment variables
        # if: runner.os == 'macOS'
        run: |
          echo "SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path)" >> $GITHUB_ENV
          echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version)" >> $GITHUB_ENV
      - name: Test build for aarch64
        run: cargo build --verbose --release --locked --target=aarch64-apple-darwin
     

https://github.com/rami3l/pacaptr/blob/71eca518382fd24c26bef05b45b9173921e4cc18/.github/workflows/test.yml#L84-L97

... and then you can easily make a fat binary with the lipo tool:

lipo -create -output {out} {in1} {in2}

knpwrs added a commit to LetsChurch/lets.church that referenced this issue Jan 3, 2023
Until this is fixed: sharkdp/fd#1088
@FulanXisen
Copy link

Brew provide the package, but I also hope the arm64 darwin release.

> whereis fd
fd: /opt/homebrew/bin/fd
> file /opt/homebrew/bin/fd
/opt/homebrew/bin/fd: Mach-O 64-bit executable arm64

@sharkdp
Copy link
Owner

sharkdp commented Oct 21, 2023

I'm personally not going to work on this, but please go ahead and add this to the CI pipeline if you are interested.

tmccombs added a commit to tmccombs/fd that referenced this issue May 7, 2024
tmccombs added a commit to tmccombs/fd that referenced this issue May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants