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

Support for darwin-arm64 #8346

Closed
kingkong404 opened this issue Nov 11, 2020 · 15 comments
Closed

Support for darwin-arm64 #8346

kingkong404 opened this issue Nov 11, 2020 · 15 comments
Labels
build build system or continuous integration related deno_core Changes in "deno_core" crate are needed feat new feature (which has been agreed to/accepted)

Comments

@kingkong404
Copy link

Hey, are there plans to support Apple Silicon?

@lucacasonato
Copy link
Member

Yes. But we need support in rusty_v8 first: denoland/rusty_v8#520. To get that working, we need to be able to build and test macos ARM64 binaries on CI. So that means either using QEMU, or waiting for GitHub to support macOS arm64 native runners.

@lucacasonato lucacasonato changed the title Apple Silicon Support Support for darwin-arm64 Nov 11, 2020
@lucacasonato lucacasonato added build build system or continuous integration related deno_core Changes in "deno_core" crate are needed feat new feature (which has been agreed to/accepted) labels Nov 11, 2020
@Dygear
Copy link
Contributor

Dygear commented Nov 12, 2020

There is also a few bugs within the dependency tree that are also failing to build.

error: failed to run custom build command for `ring v0.16.15`

Caused by:
  process didn't exit successfully: `/Users/dygear/deno/target/debug/build/ring-6754f2719fc74212/build-script-build` (exit code: 101)

[snip]

  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:18:17: error: unexpected token in '.section' directive
  .section .rodata
                  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:28:1: error: unknown directive
  .hidden GFp_aes_hw_set_encrypt_key
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:29:1: error: unknown directive
  .type GFp_aes_hw_set_encrypt_key,%function
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:161:1: error: unknown directive
  .size GFp_aes_hw_set_encrypt_key,.-GFp_aes_hw_set_encrypt_key
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:163:1: error: unknown directive
  .hidden GFp_aes_hw_encrypt
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:164:1: error: unknown directive
  .type GFp_aes_hw_encrypt,%function
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:191:1: error: unknown directive
  .size GFp_aes_hw_encrypt,.-GFp_aes_hw_encrypt
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:193:1: error: unknown directive
  .hidden GFp_aes_hw_decrypt
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:194:1: error: unknown directive
  .type GFp_aes_hw_decrypt,%function
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:221:1: error: unknown directive
  .size GFp_aes_hw_decrypt,.-GFp_aes_hw_decrypt
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:223:1: error: unknown directive
  .hidden GFp_aes_hw_ctr32_encrypt_blocks
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:224:1: error: unknown directive
  .type GFp_aes_hw_ctr32_encrypt_blocks,%function
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:403:1: error: unknown directive
  .size GFp_aes_hw_ctr32_encrypt_blocks,.-GFp_aes_hw_ctr32_encrypt_blocks
  ^
  /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:407:19: error: unexpected token in '.section' directive
  .section .note.GNU-stack,"",%progbits
                    ^
  thread 'main' panicked at 'execution failed', /Users/dygear/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.15/build.rs:664:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

So, we have a few mountains to climb first. But they are working on it! briansmith/ring#1063 and rust has to settle on a triple target for it as well rust-lang/rust#73628

@Zlitus
Copy link

Zlitus commented Nov 17, 2020

When I download the latest x86 binary from here, everything run fine with rosetta2 👍. Waiting for a ARM64 native build, but all good in the meantime.

@frankhale
Copy link

Once support is in place for Apple Silicon will it be possible to run on a ARM64 board like Raspberry Pi 4? Or will this require additional work?

@kitsonk
Copy link
Contributor

kitsonk commented Nov 17, 2020

@frankhale that is issue #1846, they are distinct issues.

@kitsonk
Copy link
Contributor

kitsonk commented Dec 8, 2020

It is not "sustainable" at the moment and still experimental so we will keep this issue open.

@jimmont
Copy link

jimmont commented Jan 19, 2021

for anyone wanting apple-silicon support, simply install Rust then

cargo install deno --locked

on my m1 macbook air this results with Finished release [optimized] target(s) in 5m 27s and deno runs as expected

@frankhale
Copy link

frankhale commented Jan 19, 2021

@jimmont I'm a Rust noob, I've been using cargo build --release and am curious why everyone keeps mentioning to use cargo install deno --locked. What is the difference?

@Dygear
Copy link
Contributor

Dygear commented Jan 19, 2021

Looks like that forces rust to ignore the network if it can and cherry pick the exact upstream version requested by the cargo toml lock file.

You can find more about that here. https://doc.rust-lang.org/cargo/commands/cargo-build.html#manifest-options

Great question!

@frankhale
Copy link

Thank you @Dygear, I'll check out that doc you mentioned!!!

@balupton
Copy link
Contributor

balupton commented Apr 27, 2022

On https://github.com/denoland/deno/releases there is a deno-aarch64-apple-darwin.zip asset, so seems this can be closed right?

@bartlomieju
Copy link
Member

See #8346 (comment)

@lino-levan
Copy link
Contributor

Any update on this? Are we waiting for github/roadmap#528 for a "more sustainable solution"?

@bartlomieju
Copy link
Member

Yes, right now it requires manual work on release from the maintainers to provide an M1 build.

@crowlKats
Copy link
Member

We now have automated releases for apple silicon, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build system or continuous integration related deno_core Changes in "deno_core" crate are needed feat new feature (which has been agreed to/accepted)
Projects
None yet
Development

No branches or pull requests