-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
node20 (and other version) binary used for running actions should be fully statically linked (including libc) #922
Comments
Hey, we do not build static binaries and have no plans to do so (we do not build anything from source code at all), if you are using alternative libc we are unlikely to offer any help, because musl is not prioritised across major linux distributions and all the builds are gibc-centric, as far as I am aware, there are no official node ports to support musl even |
transferring to setup-node, might be they have anything to add, but I guess not much. |
While I recognize that in many respects alpine is the "odd distro out", it's extremely widely used for building containers. Similarly, older libc from distributions like Red Hat are still widely used in the enterprise. As an open source maintainer, I need to support a wide variety of platforms for my software. The reason I suggest static linking, and not official support for these platforms, is precisely to minimize the ongoing work for for the Actions team. |
Hello @alex |
Thanks. Please let me know if there's any other questions I can answer.
…On Mon, Dec 18, 2023, 10:13 AM Marko Zivic ***@***.***> wrote:
Hello @alex <https://github.com/alex>
Thank you for creating this issue. We will investigate it and come back to
you with our findings.
—
Reply to this email directly, view it on GitHub
<#922 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBBTTGR53WI3ZT3MGCLYKBMSXAVCNFSM6AAAAABAXUCAE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRQG43TKNJUGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello @alex ! Thank you for reporting. The Hope this clarifies! :) |
I understand the role that I originally filed this bug against the runner image, because this impacts the use of any |
Node.js project provides an official Alpine container, source: https://github.com/nodejs/docker-node That official Alpine container, ironically, contains an unofficial build of Node.js build inside, source: https://github.com/nodejs/unofficial-builds We've been using the official Node.js Alpine containers in production for many years now. Perhaps these unofficial builds could be downloaded and used for the Alpine scenarios that you need, although I wonder if it's up to |
Hello @alex. I've tried to investigate the issue deeper and it seems like the errors encountered are due to the fact that the Node.js binary built for Actions is linked dynamically against libc. When this binary is used in environments with a different libc or in Alpine Linux containers (which use musl libc), the symbols can't be resolved, causing errors. As @dominykas mentioned for alpine images unofficial-builds.nodejs.org builds are used or nodejs is built from source code. |
I think we're talking past each other: I cannot control the binary that's used for running an action via the |
setup-node is just an action - it does things that other actions (incl. Your own) can do. And it downloads node for you. There might be some caching involved and while I haven't tried it, I'm fairly certain you can bring your own node to your workflow? Ref:
You could also execute whatever you need executing using docker inside an Alpine based image - while it wouldn't be as tidy as a simple setup-node in YAML, this is not a limitation that can't be worked around? |
I think it would be helpful for me to restate the problem I'm trying to solve from the top, as there appears to be some confusion:
This is why I originally filed this issue on the runner workflow. It was moved here because the Hopefully this alleviates some of the confusion, I am not a user of |
On deeper review, I'm not convinced setup-node is actually involved in this process, and I think it'd be more appropriate to move this issue to the actions/runner repo. |
We are facing the very same problem: We have to build binaries against old centos, against musl, ... and the provided node fails to run in these containers. I strongly suggest either one of the two options being implemented:
Thanks for consideration |
Just to give you an idea: We are trying to build TeX Live binaries for various architecture/os combinations (we support about 15 of those). To make binaries run on all kind of systems, we need to compile on as old systems as possible (depending on the required GCC compiler). That leads to the following errors:
So even building for old systems does not work, which makes the container approach deeply flawed. |
This is happening in GitHub actions that use older systems: actions/setup-node#922 Trying this suggestion which is to use an older version of the checkout action, but I really don't know if that will work. Signed-off-by: David Cantrell <dcantrell@redhat.com>
Hello everyone. Thank you all for the insightful discussion on this issue. We've thoroughly examined all the given inputs, but it's clear that the request falls outside of the scope of the |
Would it be possible to move this to the actions/runner repo? That's the appropriate place for it, and it'd be good to preserve the discussion here, rather than refiling it. |
@priyagupta108 would it be possible to move this to the actions/runner repo (or wherever is appropriate)? |
There is already a similar issue here: actions/runner#2906 |
Description
Currently the
node
binary that's used to run external actions dynamically links against libc. This has the effect that when used with containers, actions break because of libc symbols not being available:Error relocating /__e/node20/bin/node: fcntl64: symbol not found
/__e/node20/bin/node: /lib64/libm.so.6: version 'GLIBC_2.27' not found (required by /__e/node20/bin/node)
, etc.In order to insulate the node binary from containers it's running in, it should be fully statically linked.
This can be accomplished with
--fully-static
argument toconfigure
when buildingnode
(https://github.com/nodejs/node/blob/main/configure.py#L155-L160)Platforms affected
Runner images affected
Image version and build link
Current runner version: '2.311.0'
Is it regression?
No
Expected behavior
node
binary can be invoked inside of alpine containers or other environments with different libcActual behavior
Crashes with various dynamic linking errors
Repro steps
alpine
orpyca/cryptography-manylinux2014
that has a different libc (musl and old, respectively)actions/checkout@v4
The text was updated successfully, but these errors were encountered: