Skip to content

Apple Silicon plan #886

Closed
Closed

Description

@mcollina

I'm opening a tracking issue for our plan regarding apple silicon, including our dependencies.

It might be possible to source some development kits via the Foundation if we need them, as this was done in the past for our CI. Should we work in that direction?

We have a few high meta questions to answer: should we look to backport the support to 14.x or 12.x? Or are we targeting 15.x only?

I don't think there is a lot of time.

(If any person of Apple wants to join the discussion as you said you would this is a good spot :)).

Activity

  1. devsnek commented on Jun 24, 2020

    @devsnek
    Member

    I wouldn't imagine we need to make too many changes, they're just arm right?

  2. jasnell commented on Jun 24, 2020

    @jasnell
    Member

    This definitely should be connected to the Windows ARM64 support as well. We have support in for that, so I wouldn't expect there to be much left to do to support Apple Silicon but it's definitely something we need to audit and make sure we're fully supporting.

  3. ChALkeR commented on Jun 24, 2020

    @ChALkeR
    Member

    I'm not sure what is the problem we are trying to solve here.

    For example, what are the potential problems and what might be needed to be done, except for extending the CI matrix?

    Upd: ah, @jasnell comment from seconds ago explains it.

  4. jasnell commented on Jun 24, 2020

    @jasnell
    Member

    Specifically, among other things we need to verify...

    • Do all of our native dependencies support ARM64
      • brotli
      • cares
      • histogram
      • icu-small
      • llhttp
      • nghttp2
      • nghttp3
      • ngtcp2
      • openssl
      • uv
      • uvwasi
      • v8
      • zlib
    • Do all of our build tools support ARM64
      • python
      • gyp
      • c/c++ linter
      • cctest
      • icu
      • code-cache
      • snapshot
    • Do we have CI coverage
      • Apple Silicon
      • Windows ARM64

    The answer is likely yes to all most of these and we can likely check everything off but we should make sure.

  5. mcollina commented on Jun 24, 2020

    @mcollina
    SponsorMemberAuthor

    I'm not sure what is the problem we are trying to solve here.

    Logistics.

    My current issue as the CPC representative is to check if we need to try to buy a few dev kits and give them to collaborators and/or add them to our CI. Without the devices, we can't do much.

  6. targos commented on Jun 24, 2020

    @targos
    Member

    There's probably some non-trivial work to do to teach GYP to generate ARM projects for XCode

  7. richardlau commented on Jun 24, 2020

    @richardlau
    Member

    Without test machines for the CI any support would be experimental at best.

    @jasnell We'd also need to verify python and gyp in terms of build tools.

    We have a few high meta questions to answer: should we look to backport the support to 14.x or 12.x? Or are we targeting 15.x only?

    For backporting I think that really depends on what (if any) changes are required. I'm particularly concerned if we'll need to introduce branches in the gyp files to support ARM on macOS.

  8. jasnell commented on Jun 24, 2020

    @jasnell
    Member

    @jasnell We'd also need to verify python and gyp in terms of build tools.

    Added to the checklist

  9. jasnell commented on Jun 24, 2020

    @jasnell
    Member

    My current issue as the CPC representative is to check if we need to try to buy a few dev kits and give them to collaborators and/or add them to our CI. Without the devices, we can't do much.

    As part of this, let's explore also adding Windows ARM64 to the CI test matrix.

  10. mhdawson commented on Jun 24, 2020

    @mhdawson
    Member

    @AshCripps can you check with our OSX infra donator to see if they have any plans to include ARM64 support.

  11. sxa commented on Jun 24, 2020

    @sxa
    Member

    (If any person of Apple wants to join the discussion as you said you would this is a good spot :)).

    If this tweet I RT'd is legit (possibly from WWDC - I wasn't watching!) then they may already be looking at it: https://twitter.com/MarkVillacampa/status/1275200446764912643

  12. richardlau commented on Jun 24, 2020

    @richardlau
    Member

    My current issue as the CPC representative is to check if we need to try to buy a few dev kits and give them to collaborators and/or add them to our CI. Without the devices, we can't do much.

    As part of this, let's explore also adding Windows ARM64 to the CI test matrix.

    https://ci.nodejs.org/job/node-test-commit-windows-arm64/

    History:

  13. jasnell commented on Jun 24, 2020

    @jasnell
    Member

    @richardlau ... yeah, I know that job has existed but as far as I know and I could be mistaken) it is not run as part of regular CI runs, correct?

  14. richardlau commented on Jun 24, 2020

    @richardlau
    Member

    @richardlau ... yeah, I know that job has existed but as far as I know and I could be mistaken) it is not run as part of regular CI runs, correct?

    Correct. I think we even stopped producing unofficial builds for Windows ARM (AFAIK).

  15. jasnell commented on Jun 24, 2020

    @jasnell
    Member

    ...if we need to try to buy a few dev kits and give them to collaborators and/or add them to our CI. Without the devices, we can't do much.

    @mcollina ... likely a good idea, with priority going to members of the @nodejs/build team so that they can work out any possible issues getting things to compile and run.

  16. 48 remaining items

  17. ajonescodes commented on Dec 9, 2020

    @ajonescodes

    I use nvm and node v15.3.0 build from source.

    In my case, using nvm to build v15.3.0 from source still produced an x86 binary which would run via rosetta. (ref: nodejs/build#2474 (comment))

    I used nvm to install 15.3.0 and it gave me arm64. You might have somehow run your shell (bash or zsh) or terminal app in Rosetta before.

    Anyone have step-by-step instructions?

  18. andreialecu commented on Dec 9, 2020

    @andreialecu

    @playvici: #886 (comment)

  19. nschonni commented on Dec 9, 2020

    @nschonni
    Member

    I'd suggest locking this thread to collaborators and opening a separate issue over on https://github.com/nodejs/help/ for all the people that are just debugging their individual setups

  20. AdityaChaudhary commented on Dec 14, 2020

    @AdityaChaudhary

    @playvici
    Here https://ported2m1.com/app/kcnaqU7k7CMDVmQWuvPa
    I was able to install it through brew.

  21. ajonescodes commented on Dec 19, 2020

    @ajonescodes

    @playvici
    Here https://ported2m1.com/app/kcnaqU7k7CMDVmQWuvPa
    I was able to install it through brew.

    do i need to uninstall x86 brew and reinstall as arm?

  22. ElliotQi commented on Dec 20, 2020

    @ElliotQi

    I really need node v12 in mac silicon

  23. AdityaChaudhary commented on Dec 22, 2020

    @AdityaChaudhary

    @playvici
    Here https://ported2m1.com/app/kcnaqU7k7CMDVmQWuvPa
    I was able to install it through brew.

    do i need to uninstall x86 brew and reinstall as arm?

    @playvici it depends on you. I keep both the versions.
    I have added an alias for it, brewin

    So, I use > brewin install... for x86 binaries
    And > brew install... for M1 binaries

    Add this to end of your zshrc/bashrc file after installing both versions.

    # Brew Intel
    alias brewin="arch -x86_64 /usr/local/bin/brew"
    
    # Brew native
    export PATH=/opt/homebrew/bin:$PATH
    

    You can try installing something with brew install (for native M1), if that fails install it with brewin (Intel using Rosetta).

  24. LukaGiorgadze commented on Jan 4, 2021

    @LukaGiorgadze

    To install Node 15.x arm64 on M1, you need:

    1. Install latest version of homebrew
      /bin/bash -c "$(curl -fsSL https://github.com/raw/Homebrew/install/HEAD/install.sh)"
    2. brew install node
    3. check version by node -p process.arch this should print arm64
  25. locked as off topic and limited conversation to collaborators on Jan 4, 2021
  26. mhdawson commented on Jan 4, 2021

    @mhdawson
    Member

    As per #886 (comment) I went ahead and locked the issue to collaborators. Please open new issues in nodejs/help to discuss debugging individual setups.

  27. mcollina commented on Jan 25, 2021

    @mcollina
    SponsorMemberAuthor

    @nodejs/build It would be good to have an update on the progress of getting an official build out. I could not find any easy-to-follow tracking issue.

    @nodejs/tsc as we can see, this is a highly requested feature. I think we might want to flag it as a "Strategic Initialive".

  28. mhdawson commented on Apr 22, 2021

    @mhdawson
    Member

    V16 shipped with M1 support so closing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions