-
Notifications
You must be signed in to change notification settings - Fork 134
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 plan #886
Comments
I wouldn't imagine we need to make too many changes, they're just arm right? |
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. |
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. |
Specifically, among other things we need to verify...
The answer is likely yes to |
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. |
There's probably some non-trivial work to do to teach GYP to generate ARM projects for XCode |
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.
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. |
Added to the checklist |
As part of this, let's explore also adding Windows ARM64 to the CI test matrix. |
@AshCripps can you check with our OSX infra donator to see if they have any plans to include ARM64 support. |
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 |
https://ci.nodejs.org/job/node-test-commit-windows-arm64/ History: |
@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). |
@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. |
Message from macstadium with regards to supporting apple sillicon in ORKA (our current "modern" macos hosting solution)
So they plan to try support it but no guarantees yet as its still early days |
It’d be great if someone could test nvm on the new hardware and let me know if there’s anything that needs fixing. |
I've submitted a request for a developer transition kit to Apple via the Node.js Apple Developer account. I also included a link back to this issue in the notes.
Since we've had extensive testing on ARM64 for Linux for quite a while now and some limited testing for Windows now I don't imagine there'll be major problems on the code and dependency side of things. It's all the toolchain pieces I'm more concerned about. |
Re Windows ARM64: the problem is hardware availability. We've been relying on laptops on @joaocgreis' desk to do the testing and unofficial builds. Because it's mainly designed for use on laptops there's not really many other options just yet. |
Awesome. Do you need me to do anything foundation-wise? |
For now we have to wait for review now from Apple. If they accept that we're a good "investment" they'll send an invoice and arrange delivery. I can get the Foundation to pay for it (Brian has a billing account in the team we have in our Apple Developer account and I think can pay from there—perhaps you need to authorise it on behalf of the TSC?). I'll keep this thread updated with any progress (it's going through build@iojs.org so Michael and others can see any progress too). I could host it with the Pi cluster, since it's likely got a limited lifetime that's probably not a big deal. It could go to nearForm with our other Macs but I suspect this is going to need much more custom handling and fiddling than a standard MacMini. Apple do have language about this being "Apple owned" so it might be something we have to ship back to them at a certain date. Hopefully MacStadium comes through with Orka but I'm betting that's going to be a massive investment for them and might take time. It'd probably be wise of us to plan on investing in new hardware sometime in 2021 to support this to parallel the MacMinis we have at nearForm as a backup. Hopefully they have an ARM MacMini out alongside their new Macbooks. |
Thanks @rvagg |
@ljharb FWIW we have am ARM DTK machine and trying to use nvm gives the following error:
|
@jedrichards well we don't have official darwin-arm64 releases, if we did nvm would work fine :) If you're in the mood for more testing, trying to build node from source would be useful. |
The last quoted line from the nvm log said "... trying source.". Did it, and if so what happened? |
That's as much info as I have at the mo (I don't personally have the DTK). I'll ask for more info, and request that they try building from source too. |
More context to @jedrichards' comment: it turns out that Node.js 12.6.0 fails building on the DTK: In file included from: ../deps/v8/src/base/platform/mutex.h:9:
In file included from: ../deps/v8/src/base/lazy-instance:73:
In file included from: ../deps/v8/src/base/macros.h:11:
In file included from: ../deps/v8/src/base/format-macro.h:27:
#error Target architecture arm64 is only supported on arm64 and x64host
In file included from: ../deps/v8/src/libplatform/delayed-task-queue.cc:5:
In file included from: ../deps/v8/src/libplatform/delayed-task-queue.h:12:
In file included from: ../deps/v8/src/base/macros.h:11:
In file included from: ../deps/v8/src/base/format-macro.h:27:
#error Target architecture arm64 is only supported on arm64 and x64host
In file included from: ../deps/v8/src/libplatform/task-queue.cc:5:
In file included from: ../deps/v8/src/libplatform/task-queue.h:11:
In file included from: ../deps/v8/src/base/macros.h:11:
In file included from: ../deps/v8/src/base/format-macro.h:27:
#error Target architecture arm64 is only supported on arm64 and x64host After changing the Node.js version in |
@jedrichards nvm automatically installs from source if the binary fails, so that's the output i'm interested in :-) thanks! |
I am a front-end developer. Is it suitable to use Apple M1 ARM chip? |
@FuncWei it depends on what you're doing exactly, but to me, it's not totally ready yet. I have problems during yarn install of my node 12.x project. Also Docker is not working yet |
I came across this handy site that shows the current status of a number of apps, languages, developer tools, etc. Might help other people that come across this issue. |
@FuncWei for me everything I need works great. Btw I don't need docker. |
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)) You can verify using: I was able to get a correct arm build using homebrew, however. Note that cd /opt
sudo mkdir homebrew
sudo chown -R $(whoami) homebrew
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
cd /opt/homebrew/bin
./brew install -s node (also helpful: https://stackoverflow.com/questions/64951024/how-can-i-run-two-isolated-installations-of-homebrew/64951025#64951025) It should start building, and it will take around 20 minutes. Now if you run |
I used |
Running I tried uninstalling and reinstalling |
Yes, and this website https://doesitarm.com/ |
Anyone have step-by-step instructions? |
@playvici: #886 (comment) |
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 |
@playvici |
do i need to uninstall x86 brew and reinstall as arm? |
I really need node v12 in mac silicon |
@playvici it depends on you. I keep both the versions. So, I use > brewin install... for x86 binaries Add this to end of your zshrc/bashrc file after installing both versions.
You can try installing something with brew install (for native M1), if that fails install it with brewin (Intel using Rosetta). |
To install Node 15.x arm64 on M1, you need:
|
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. |
@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". |
V16 shipped with M1 support so closing :) |
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 :)).
The text was updated successfully, but these errors were encountered: