mafintosh / utp-native

Native bindings for libutp
MIT License
102 stars 38 forks source link

No native build on apple silicon m1 #37

Open stefanodecillis opened 3 years ago

stefanodecillis commented 3 years ago

Hi,

I'm getting this error:

No native build was found for platform=linux arch=arm64 runtime=node abi=93 uv=1 armv=8 libc=glibc node=16.0.0 seeder_1 | loaded from: /app/webtorrent-pocp/node_modules/utp-native

There is a version of this package running on arm64?

mafintosh commented 3 years ago

I'm using in my M1. Looking at the error, are you on linux?

stefanodecillis commented 3 years ago

Thank you for the fast reply! I'm on m1 but I'm using Docker

mafintosh commented 3 years ago

Ah I see. I guess we need to add a prebuild for Linux M1 then. Is it easy to get Docker running on the M1 now? Since there is no M1 support on Actions yet, I've been doing the M1 builds myself.

stefanodecillis commented 3 years ago

How do you do your own M1 builds? Tbh now docker works really good on M1. There are few stupid bugs (happend twice in one month) and I'm not facing problems with containers. This was my first problem

mafintosh commented 3 years ago

Oh nice, I'll try to get it setup when I have some free time. To build it do:

git clone git://github.com/mafintosh/utp-native
cd utp-native
npm run fetch-libutp
npm install
npm run prebuild
rm -rf build
npm test # to see that it works

If the build works we can add it to the releases :)

stefanodecillis commented 3 years ago

I'm trying to do that procedure but I get timed out running fetch-libutp. Not sure if it's a problem of permissions

mafintosh commented 3 years ago

Weird. You just have to clone https://github.com/mafintosh/libutp inside deps/libutp

stefanodecillis commented 3 years ago

Yeah but it tries to download it with git (and not with http) so "probably" it goes timed out for the permissions on the repository. I will try today to clone the directory with http without using npm run fetch-libutp and then try again