Skip to content

feat: #2392: add arm based ubuntu runner #2494

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

Closed

Conversation

dsdeboer
Copy link

@dsdeboer dsdeboer commented Mar 11, 2025

Thanks for contributing!

  • Have you updated CHANGELOG.md?

Due to the public availability of the new ubuntu-arm runner on GithubActions I think this is the appropriate time to also include the prebuild for this architecture.

@mistic
Copy link

mistic commented Jun 16, 2025

@chearon would you be able to take a look at this and move this PR forward?

@chearon
Copy link
Collaborator

chearon commented Jun 16, 2025

I wish it was this easy, but all of the dependencies have to be built for ARM as well. This isn't going to work.

My long term plan is to use Zig's build system so that we can cross-compile easily, but that will require trimming dependencies first.

@mistic
Copy link

mistic commented Jun 16, 2025

@chearon what are the dependencies that currently do not support arm? Is it something in the underlying images used to run the prebuilds? If you could left some pointers would be helpful. We are in need for that and likely could help to look into this as well

@chearon
Copy link
Collaborator

chearon commented Jun 16, 2025

Yes. Here's the Dockerfile we use for x86 currently1. The image from it is referenced on line 59R in the diff of this PR. I think you'd need to get an image built for arm64 first, because I don't know how the current one could work with x86. If you're lucky, that Dockerfile will build unmodified, but probably not.

I'll certainly help move it along if you/someone wants to take it on, but I'd personally rather work on cross-compiling since the current solution has been a huge pain.

1Dependencies have to be manually built against an old glibc to create a binary that works on the most operating systems. If you publish the libraries from apt-get, they'll cause linker errors on any previous versions of glibc.

@mistic
Copy link

mistic commented Jun 16, 2025

@chearon I believe I got a working image with the changes I'm proposing in the Dockerfile at #2516.

On top of that the image in use for the arm64 build context will have to be changed in this PR at https://github.com/Automattic/node-canvas/pull/2494/files#diff-c18dd11250e4e0f0d19035ce56dd87584b7d4f9803ff95437d4831a6d92e938aR59 .

Be free to produce your own images and publish those based out of the Dockerfile changes PR.

It's not optimal neither a long term solution as the one you have in mind by using Zig all around. But it should be enough to unblock this for now in the same build terms used for all the other current artifacts. 😃

@chearon
Copy link
Collaborator

chearon commented Jun 19, 2025

Thanks for kicking this off @dsdeboer and @mistic. I'll make the necessary changes to this PR separately. Hopefully we get an arm64 release today!

@chearon chearon closed this Jun 19, 2025
@dsdeboer dsdeboer deleted the feat/add-arm-prebuild-step branch June 19, 2025 12:40
@mistic
Copy link

mistic commented Jun 19, 2025

Thanks for the cooperation @chearon , really much appreciated 🙏

@chearon
Copy link
Collaborator

chearon commented Jun 19, 2025

No problem. I don't have hardware to test it, but 3.1.1 is published with ARM binaries. Tests passed on the runner so I assume it's OK.

Only catch is the ARM tarball is 20MiB, whereas x86 is 10MiB. For some reason the binary depended on libicu data, so that got bundled.

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

Successfully merging this pull request may close these issues.

3 participants