You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
My work on embedded systems has lead me to believe that emulation is no substitution for compiling on the real deal, so I wait the 15+ minutes out when I need it.
I'm open to trying something like Qemu, but it would probably be easier for me to set up a Pi as a build server than to learn Qemu and what special compile options I'd need to pass and such.
What are the advantages of Qemu that make you prefer that solution?
@coolaj86 does it not come down to automation, automation, automation and repeatability? If I were to take a binary for sqlite3 instead of source, then I'd definitely want it to have been built through the 'trusted' channels - not a third party. Having said that something really needs to be done #597
The build takes a ridiculous amount of time to complete especially on the Pi Zero - that I'd give up on sqllite or use python. Please provide a binary through npm to support continued use.
I've automated an ARM build with Vagrant, Docker (as opposed to chroot in @bander9289's approach) and QEMU which is one option for an overall npm install use case for ARM targets - whilst being able to build on a more powerful machine. I haven't open sourced it yet but this is the general idea that I use for sqlite3 and bcrypt:
Spin up a single-core vagrant box with "debian/jessie64"
Install docker-engine and qemu-user-static in the vm
Spin up a docker container with docker run -it --volume /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static philipz/rpi-raspbian bash
Install build-essential and nodejs in the container
npm install inside the container
I was not able to get a full QEMU ARM VM running but I did have success with the QEMU User Mode emulation as above. So it runs only the docker process under ARM emulation rather than providing a full virtual machine.
One major drawback of either QEMU approach is that is only supports a single thread, so for example I could not install Git LFS within the ARM docker container as Go binaries cannot be run through QEMU due to the concurrency aspects of the language. So my advice is do as much as you can within the "host VM" then delegate the ARM portions to the container.
Maybe some of the above could help for the Travis build? Cross-compilation would be ideal but it didn't seem straight forward to me, that's why I went the QEMU route instead as it also covers other npm modules at the same time.
Cross-post from #996: this comment looks like it has a workable path for an ARM environment on Travis: travis-ci/travis-ci#3376 (comment) similar to @skl's solution, except it looks like a "docker in docker." Have not tested myself.
I created #1362 which seems a bit less complicated and also provides alpine binaries. The only thing missing is anyone reviewing it and a repo maintainer setting S3 bucket credentials.
Reacted by James, Devin Brown, Alexander Wunschik and Thom Nichols
Activity
springmeyer commentedon May 4, 2015
We build all binaries on travis (for linux and mac) and appveyor (for windows). What would be very useful is a travis job that used
qemuor something like it to build rpi binaries. @bander9289 has been experimenting with this (and I've been meaning to learn but not had time yet): mapnik/mapnik-packaging@master...bander9289:master#diff-7142a27433410bb3f7e3ae34a1674807R16@coolaj86 - interested in providing a pull request adding rpi build support to travis.yml?
/cc @mojodna who may also be interested in this effort.
sethfitz commentedon May 5, 2015
Hmm. Interested I am, yet not yet needing it. Thanks.
coolaj86 commentedon May 5, 2015
My work on embedded systems has lead me to believe that emulation is no substitution for compiling on the real deal, so I wait the 15+ minutes out when I need it.
I'm open to trying something like Qemu, but it would probably be easier for me to set up a Pi as a build server than to learn Qemu and what special compile options I'd need to pass and such.
What are the advantages of Qemu that make you prefer that solution?
alexellis commentedon Feb 10, 2016
@coolaj86 does it not come down to automation, automation, automation and repeatability? If I were to take a binary for sqlite3 instead of source, then I'd definitely want it to have been built through the 'trusted' channels - not a third party. Having said that something really needs to be done #597
marvinroger commentedon Dec 21, 2016
Scaleway baremetals ARMv7 servers, might help here. Each build, assuming it would last less than 59 minutes, would cost €0.006.
Moreover, with their CLI, create, start and SSH into a server is as easy as:
Note I am not affiliated to them in any way, that's just how I handle my personal Docker builds. 😉
kkaefer commentedon Dec 21, 2016
Note that we don't have build on ARMv7; instead we could also cross-compile.
alexellis commentedon Dec 21, 2016
The build takes a ridiculous amount of time to complete especially on the Pi Zero - that I'd give up on sqllite or use python. Please provide a binary through npm to support continued use.
skl commentedon Feb 14, 2017
I've automated an ARM build with Vagrant, Docker (as opposed to chroot in @bander9289's approach) and QEMU which is one option for an overall
npm installuse case for ARM targets - whilst being able to build on a more powerful machine. I haven't open sourced it yet but this is the general idea that I use for sqlite3 and bcrypt:"debian/jessie64"docker-engineandqemu-user-staticin the vmdocker run -it --volume /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static philipz/rpi-raspbian bashbuild-essentialandnodejsin the containernpm installinside the containerI was not able to get a full QEMU ARM VM running but I did have success with the QEMU User Mode emulation as above. So it runs only the docker process under ARM emulation rather than providing a full virtual machine.
One major drawback of either QEMU approach is that is only supports a single thread, so for example I could not install Git LFS within the ARM docker container as Go binaries cannot be run through QEMU due to the concurrency aspects of the language. So my advice is do as much as you can within the "host VM" then delegate the ARM portions to the container.
Maybe some of the above could help for the Travis build? Cross-compilation would be ideal but it didn't seem straight forward to me, that's why I went the QEMU route instead as it also covers other npm modules at the same time.
StefanScherer commentedon Feb 14, 2017
@skl What about using Travis or at least using the steps described here: https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
skl commentedon Feb 14, 2017
Thanks for the article, uses the same principal and applies it to Travis. Just in my case I need private builds for work.
springmeyer commentedon Jun 23, 2018
Anyone want to try getting qemu running on travis (within docker as a bonus) so we can start building and publishing binaries for ARM/rasp?
thom-nic commentedon Jun 25, 2018
Cross-post from #996: this comment looks like it has a workable path for an ARM environment on Travis: travis-ci/travis-ci#3376 (comment) similar to @skl's solution, except it looks like a "docker in docker." Have not tested myself.
rzr commentedon Jul 23, 2018
An other option would be to submit a deb package of node-sqlite3 to debian then use if on raspbian...
Well I can try to hack to Docker file to build package.
Edit:
https://tracker.debian.org/pkg/node-sqlite3
while not in Raspbian yet ?
http://archive.raspberrypi.org/debian/pool/main/n/
build: Support docker to build ARM package
build: Support docker to build ARM package
30 remaining items
tools: Crossbuild for ARMv7
tools: Crossbuild for ARMv7 (#1169)
build: Add run.sh helper script for docker
build: Support docker to build binary package
xPaw commentedon Jul 1, 2020
#1147 was merged, is there any blocker on hooking that up to the CI?
build: Install files to be deployed
build: Add run.sh helper script for docker
build: Support docker to build binary package
build: Support docker to build binary package
build: Add run.sh helper script for docker
build: Support docker to build binary package
build: Install files to be deployed (#1352)
n1ru4l commentedon Jul 22, 2020
I created #1362 which seems a bit less complicated and also provides alpine binaries. The only thing missing is anyone reviewing it and a repo maintainer setting S3 bucket credentials.
daniellockyer commentedon Apr 14, 2022
This is done, pending release - please see my comment here: #1362 (comment) 🙂