-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
Please add binary for arm64 #903
Comments
Hmm, actually, I'm having trouble build from source in some cases as well. /srv/walnut/core/node_modules/sqlite3 # uname -m
aarch64
/srv/walnut/core/node_modules/sqlite3 # npm rebuild sqlite3
/srv/walnut/core/node_modules/sqlite3 # node -r sqlite3
module.js:538
throw err;
^
Error: Cannot find module '/srv/walnut/core/node_modules/sqlite3/lib/binding/node-v57-linux-arm64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/srv/walnut/core/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3) I don't think it even tried to build from source when I initially ran Any ideas how I can debug |
There is no |
Yes, this would really help users. To make providing an arm64 binary sustainable for each release, we'd need an automated way of doing this. Do you have suggestions on how to script building for arm64 on travis (or similar free CI infra)?
Odd, @creationix can you try passing |
Assuming your CI server has support for FROM arm64v8/node:carbon
COPY qemu-aarch64-static /usr/bin/qemu-aarch64-static
RUN apt-get update
RUN apt-get install -y git build-essential
RUN git clone --depth=1 https://github.com/mapbox/node-sqlite3.git
WORKDIR /node-sqlite3
RUN make See this article for more details on using qemu for cross-compiling with docker. |
Another raspberry pi 3 node-sqlite user here. Pre-built would be wonderful 👍 |
One more raspberry pi 3 user here. |
another user is added to the order |
I guess this could be built on qemu , check this related change: |
yet another non amd64 user |
Relate to: #1028 |
and another ARM user here. I've been trying all sorts of tricks to get this to build on my raspi without success. Please add pre built binary to the repo... thanks a lot! |
And another one user. Couldn't make it work on a raspberry pi zero w. |
have you tried to build in docker ? may I also request this package to land in debian too |
Hi,
Regards, |
Well I used this PR to build offline: @songzhuang you can try to see how this can be adapted for arm64 for @k1r0s Good luck |
Hi, any idea where to download binary for arm64 ? |
I managed to build current version using docker, it tooks me less than 8min I shared file at: Patch to come next Relate-to: #1138 |
Bug: TryGhost#903 Change-Id: Ic91292879deed92fcffd90d7b2d79f551c5b06f4 Signed-off-by: Philippe Coval <[email protected]>
It took less than 10 min to build on Ubuntu 18.04 x86_64 If merged other arch will come next, and then automated by CI. Bug: TryGhost#903 Forwarded: TryGhost#1147 Change-Id: Ic91292879deed92fcffd90d7b2d79f551c5b06f4 Signed-off-by: Philippe Coval <[email protected]>
It took less than 10 min to build on Ubuntu 18.04 x86_64 If merged other arch will come next, and then automated by CI. Bug: TryGhost#903 Forwarded: TryGhost#1147 Change-Id: Ic91292879deed92fcffd90d7b2d79f551c5b06f4 Signed-off-by: Philippe Coval <[email protected]>
It took less than 10 min to build on Ubuntu 18.04 x86_64 If merged other arch will come next, and then automated by CI. Bug: #903 Forwarded: #1147 Change-Id: Ic91292879deed92fcffd90d7b2d79f551c5b06f4 Signed-off-by: Philippe Coval <[email protected]>
With docker buildx it is quite easy to build binaries for multiple platforms. We are currently using it for building docker images for all platforms. We could incorporate it into the CI for easily generating pre-built binaries for SQLite. I think it would be as easy as cloning this repository, running A matrix could then cover all the platforms e.g. |
Any update? |
@louisabraham I created this PR that adds binaries, feel free to review and test the binaries. #1362 |
Thank you so much, they work! |
Any progress in making the binaries officially available?
Note linux/arm64 binaries are very important for the upcoming Docker Desktop for Apple Silicon M1 as those will run natively there. |
@n1ru4l thanks for the PR. I could successfully generate the binaries using I'm almost there... How can I specify to node-pre-gyp that he should take my local file instead of fetching it over the distant repo? |
You have to place it in a very specific folder so that the cache is hit. I don't remember the exact path though. |
Thanks for the heads up. The location is shown in the error log file of npm just before the 403 response: [...]
npm ERR! node-pre-gyp info check checked for "root/project/server/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node" (not found) So all you have to do is to extract the node_sqlite3.node file from the tar.gz produced by docker buildx and place it in the I hope they pull your PR soon to avoid this! |
I wanted to workaround this while doing an npm ci which sadly meant I couldn't put the .node file in its final location. This will let you host the binaries somewhere:
It'll try and download from http://somehost/sqlite3/v5.0.1/napi-v6-linux-arm64.tar.gz (the filename is the same name as the folder in lib/binding napi-v[NAPI_VERSION]-linux-[ARCH]) |
Thanks for the workaround @tom-boothman, for some reason placing the file locally would sometimes not work for me, probably because I must use an older version of node-pre-gyp. |
This has been shipped in |
I'm trying to use this module on some arm64 devices and our build times are really long because there is no prebuilt binary for us.
I'm using the new LTS version of node.
You can reproduce this on a raspberry pi 3 using https://github.com/bamarni/pi64 which gives a 64-bit kernel. It does eventually compile from source, but every time uses about 15 minutes of time.
The text was updated successfully, but these errors were encountered: