Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Support macos-arm64 target for new M1 chips #1023

Closed
edwardfoyle opened this issue Jan 5, 2021 · 5 comments
Closed

Support macos-arm64 target for new M1 chips #1023

edwardfoyle opened this issue Jan 5, 2021 · 5 comments

Comments

@edwardfoyle
Copy link

edwardfoyle commented Jan 5, 2021

As more and more ARM-based macs come online, it would be a great boon if pkg supported macos-arm64 out of the box.

I'm also open to workarounds for compiling macos arm64 binaries in the meantime. I didn't see any prebuilt binaries in this project: https://github.com/yao-pkg/pkg-binaries/releases/tag/node12 but maybe there's another project somewhere that is hosting a macos-arm64 binary?

@renebrandel
Copy link

Yeah, I think this is important. Almost everyone on my team has the M1 now.

@jesec
Copy link
Contributor

jesec commented Jan 20, 2021

I compiled a working macOS arm64 binary that has pkg patches. See https://github.com/jesec/pkg-fetch/releases/tag/v2.7.

However, due to #66 and mandatory code signing requirement on arm64, the result executable of pkg is immediately killed by kernel on launch.

I am working to port dotnet/runtime@038d5ec to JavaScript and pkg.

@depombo
Copy link

depombo commented Apr 9, 2021

Yes! Is there an ETA for this?

jesec added a commit to vercel/pkg-fetch that referenced this issue May 10, 2021
Newer versions of Apple Clang automatically ad-hoc sign the compiled
executable, due to the new mandatory code signing requirement [1].

However, for final executable to be signable, base binary MUST NOT
have an existing signature.

This change strips the ad-hoc signature from compiled macOS base binary.

[1]: https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-universal-apps-release-notes

Refs: vercel/pkg#1164
Bug: vercel/pkg#1023
jesec added a commit to vercel/pkg-fetch that referenced this issue May 10, 2021
Newer versions of Apple Clang automatically ad-hoc sign the compiled
executable, due to the new mandatory code signing requirement [1].

However, for final executable to be signable, base binary MUST NOT
have an existing signature.

This change strips the ad-hoc signature from compiled macOS base binary.

[1]: https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-universal-apps-release-notes

Refs: vercel/pkg#1164
Bug: vercel/pkg#1023
@jesec
Copy link
Contributor

jesec commented May 21, 2021

This issue has been resolved by 0b55f9a and https://github.com/vercel/pkg-fetch/releases/tag/v3.1. Please let me know if it is still relevant.

@CMCDragonkai
Copy link

Can we get a universal nodejs binary? That way one can distribute the same binary for mac intel and mac M1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants