Support for macOS aarch64
Installation on Apple M1 hardware running node.js v15.3.0 fails with the following message:
Error: 404 status code downloading tarball https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/darwin-arm64.tar.gz
Presumably ARM64 binaries are not currently being built for the macOS platform. Is this something that could be supported?
+1
I've looked into this a bit. Leaving some links:
https://groups.google.com/g/discuss-webrtc/c/s6-f6OtU4wM/m/b8FEQmjTCQAJ
building chromium for arm macs: https://chromium.googlesource.com/chromium/src/+/master/docs/mac_arm64.md#building-on-arm-macs
+1
+1
+1
+1
@kevzettler were you able to build successfully using those links?
@waah42 I was able to build successfully but wasn't able to test or verify the build.
+1, I would like this too
+1
+1
+1
+1
+1
@waah42 I was able to build successfully but wasn't able to test or verify the build.
@kevzettler Could you please include reproducible build steps for others to follow such that we are able to build upon your progress, thanks!
@taylorjdawson I left the links. Thats what I followed. That was months ago and have lost memory and further context. I imagine the chromium codebase has continued developing as well. Good luck.
@kevzettler do we need to build the whole of Chromium for this to work, or is there a way to build only WebRTC.framework?
@corwin-of-amber I think that @kevzettler has made it clear that he's posted everything he knows and beyond that we're on our own. That being said, after looking into this myself the chromium links are more of a guide on what flags need to be set when building. The commands that @kevzettler used to try and compile are in this issue #690 -- He never posted the working commands but if you start there you might be able to get it to work.
If you do happen to build the correct binaries please share them here as this is in the spirit of Open Source 🙂
any updates on this?
Update: I have been able to build wrtc.node on M1 (native). I will post my patches in my fork of node-webrtc.
Mainly, @kevzettler's error came from this part of the build files: https://github.com/node-webrtc/node-webrtc/blob/685aa433623b9bf98e8c7c0124e7864e01b883e6/CMakeLists.txt#L145
Need to skip target_os="linux" in case you're building for macOS.
https://github.com/corwin-of-amber/node-webrtc/tree/port/macos-arm64
Note: building on an M1 machine requires a newer version of depot tools and a newer branch of Chromium. So the latter is set to branch_heads/4500 with the appropriate source changes.
Building for M1 on an Intel Mac works fine with the original depot tools and branch_heads/4280. So this is a viable alternative in case problems ensue.
any status update on this? I'm running into this issue and have no idea how to proceed. It's been awhile since it was reported for the first time, hopefully it's resolved some how by now?
I have a solution using an existing binary that I use described here.
@dmitryame @boblund, there is a port made by @koush (I helped) which uses a newer version of Chromium that is M1-compatible. You can use it by npm i @koush/wrtc. (See the discussion in https://github.com/node-webrtc/node-webrtc/issues/698).
Also looks like someone found a way to install it using @mapbox/node-pre-gyp (@k8w, see https://github.com/node-webrtc/node-webrtc/issues/729#issuecomment-1162849267).
Open since 2021 one jan. wanted to install orbit-db and ipfs Same error ;-( . Does not work with Rosetta either. Workaround Switch to my old Mac 2012 for OrbitDB. Here it works. Hopefully this error is fixed some day. Has anybody made experience with docker ? I think maybe on a linux devcontainer it will run.
Error on M1
node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/darwin-arm64.tar.gz
node-pre-gyp ERR! stack at Request.
no error on Catalina
Found another workaround Use a interactive docker container linked to your directory and derived from a M1 image
FROM --platform=linux/arm64 node:16-alpine
the error does not appear here. So no need to carry my old 2012 MAC with me ;-) I think the error comes from the platform specific build of the electron extension for webrtc
Has anyone been able to compile it for a M2 mac ?
See https://github.com/node-webrtc/node-webrtc/pull/766