nodejs / unofficial-builds

Unofficial binaries for Node.js
https://unofficial-builds.nodejs.org
242 stars 50 forks source link

Statically linked binaries for armv6 #14

Closed deftdawg closed 4 years ago

deftdawg commented 4 years ago

It would be very helpful if we could get statically linked node binaries to run on systems with older versions of libc/glibc.

./configure --fully-static can be used to build statically linked versions of node binaries.

I have built static node arm5 on an X86_64 using qemu-arm-static using the above flag, however they only run on arm7 because of the illegal instruction problem described here. Efforts to build natively on a Pi Zero W (armv6) fail because memory is exhausted attempting to link binaries.

I've not yet been able to get the recipes of this project to do a build, I will continue to work on trying to get a static binary, however in the meantime I hope you'll consider adding a statically linked binary build.

If I'm not mistaken the modifications may be as simple as cloning the armv6l and adding --fully-static to line 13 of run.sh and kicking off your CI to build it.

rvagg commented 4 years ago

I'm not too keen on this, fully static is not something we test at all in Node's CI and I don't know what the implications are going to be for compiling addons against the binary either. Plus, it'll make the binary very large too.

How old is the system you're trying to run on? Is it not feasable to update the base system? At some point you have to bite the bullet because it becomes increasingly impractical to pull in newer software. Versioning libc + gcc is a pain in the backside but we've tried to target as old as we possibly can to allow compilation of the C++ features V8 is pulling in.

deftdawg commented 4 years ago

no worries, I understand... I'm off in the woods using Ubuntu Mavericks (glibc 2.11) on a Tesla Model S. I can make something newer run in a chroot, but I'd prefer to do static link if I can.

I'll continue to tinker, feel free to close this as won't fix.

rvagg commented 4 years ago

Wow, yeah support for maverick ended 2012 so you're stretching it pretty hard there.

Will close for now but happy to hear from other people that may have similar needs. It's hard to balance all the factors involved but it's useful to know anecdotally what people are wanting out of these builds.