Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

aarch64 build #69

Open
rhenwood-arm opened this issue Dec 4, 2018 · 8 comments
Open

aarch64 build #69

rhenwood-arm opened this issue Dec 4, 2018 · 8 comments

Comments

@rhenwood-arm
Copy link

Hi @chearon,

As per your invitation in README.md, I would find an AArch64 (aka Arm64) build useful!

I had a look at Dockerfile. The Wheezy base image dependency is inconvenient: it is an unsupported version and not readily available on AArch64. I substituted Stretch for Wheezy and removed the 4.7 version hold on g++. It got as far as the glib compile and then:

configure: error: 
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

I got distracted and haven't looked further after that.

NOTE: In terms of CI/CD systems that have Aarch64 as a supported architecture, I know of (in no particular order):
Shippable.com
http://docs.shippable.com/platform/tutorial/workflow/run-ci-builds-on-arm/#running-jobs-on-arm-machines
CodeFresh.io
https://codefresh.io/docs/docs/incubation/arm-support/
Drone.io
https://docs.drone.io/config/pipeline/multi-platform/
Resin.io
https://www.balena.io/docs/reference/base-images/base-images/#-a-name-what-is-inside-a-what-s-inside-a-balena-base-image

@rhenwood-arm
Copy link
Author

I added gettext, and the build is continuing now...

@chearon
Copy link
Member

chearon commented Dec 5, 2018

It's based on Wheezy intentionally to support a really old libc. Stretch is probably too new 😕. If it's possible to compile and use an old libcon a newer OS we could use a newer OS, but that isn't something I've had time to try yet.

You don't necessarily need ARM hardware to compile to ARM either, my plan was to use cross-compiler tools. I'd absolutely love it if someone got that working! It just involves getting the right compiler and setting CXX etc.

@rhenwood-arm
Copy link
Author

Thanks for the prompt reply.

I assume that your goal by keeping libc old is to achieve maximum coverage of Linux distros. Are there any other benefits of your current libc choice?

From my digging, Wheezy uses eglibc 2.13. Wheezy and eglibc are both discontinued - so I would like to make the case to consider an upgrade :)

@chearon
Copy link
Member

chearon commented Dec 5, 2018

Yeah, I should have said that, it's to support older distros since executables are compatible with newer libc but not older (I guess because they add symbols but never remove them).

If you look through the issues there were a lot of problems when I compiled against a new libc. Even today #44 remains open because someone is using CentOS 6.9, which a still-supported distro that uses a libc from 2010 and I couldn't go that far back.

From my digging, Wheezy uses eglibc 2.13. Wheezy and eglibc are both discontinued - so I would like to make the case to consider an upgrade :)

It shouldn't matter, though since the binaries we ship will link against whichever libc you have on your distro.

So all that said, the only options I can think of are to either try and compile an old libc on a new distro or try and get cross-compiling working with Wheezy.

@rhenwood-arm
Copy link
Author

Thanks for your thoughts.

I started this thread because I think AArch64 (announced by Arm in 2011) is the most popular Arm architecture to run node-canvas-prebuilt in production. I had a look at compiling libc 2.13 (from 2010) and it confidently asserts: configure: error: The aarch64 is not supported. It looks like one would need to go to libc 2.17 (from 2012) to get aarch64 support.

There certainly are armhf platforms around (i.e. rpi). I see a discussion on that topic here: #9

To avoid confusion, I guess discussion of the armhf build should take place against #9 ?

@chearon
Copy link
Member

chearon commented Dec 7, 2018

Nodejs supports armv61, armv71, and arm64. I'm guessing arm64 is what they're naming AArch64, and you're saying one of the other ones is the one asked for in #9?

We could maybe just have a completely separate docker image for ARM builds that runs on a newer OS+libc. I wish a new compiler could just target a libc version but it doesn't look easy to do that.

If we found out that nodejs binaries support a newer libc than the one I'm supporting, I'd be okay with upgrading Wheezy too, but I haven't figured out how to determine that yet.

@dmvt
Copy link

dmvt commented Apr 19, 2019

I also mentioned this in issue 9, but I need an arm64 build for Linux on DEX with the Galaxy S10+

@ghost
Copy link

ghost commented Sep 30, 2022

Is there any update on this. Since M1 has native docker support canvas get issues with docker images in arm64 platform

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants