8000 On linux, statically link all libraries including GLIBC by ChadKillingsworth · Pull Request #326 · google/closure-compiler-npm · GitHub
[go: up one dir, main page]

Skip to content

On linux, statically link all libraries including GLIBC #326

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

Merged
merged 23 commits into from
Jun 2, 2025

Conversation

ChadKillingsworth
Copy link
Collaborator

Currently, GLIBC must not only be installed on the host, but has to be compatible with the version the image was built with. Static linking avoids both of these issues at the cost of a slightly larger image size.

Example GLIBC incompatible error:

Error writing to stdin of the compiler. write EPIPE /node_modules/google-closure-compiler-linux/compiler: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found

Currently, GLIBC must not only be installed on the host, but has to be compatible with the version the image was built with. Static linking avoids both of these issues at the cost of a slightly larger image size.
@ChadKillingsworth
Copy link
Collaborator Author

I realized this isn't what we want at all.

@ChadKillingsworth ChadKillingsworth deleted the static-linking-linux branch May 30, 2025 12:56
@ChadKillingsworth ChadKillingsworth restored the static-linking-linux branch May 30, 2025 13:26
Required to patch recent CVE. Once a package is updated, this can be switched to a standard package install.
@ChadKillingsworth ChadKillingsworth marked this pull request as draft May 30, 2025 16:56
@ChadKillingsworth ChadKillingsworth marked this pull request as ready for review May 30, 2025 19:30
@ChadKillingsworth
Copy link
Collaborator Author

Following the instructions on the GraalVM site, on Linux VMs we can statically link most libraries to enable greater compatibility. On x86 architectures a full static image with no dependencies is created. On Linux arm64 architectures, everything except GLIBC is statically linked.

@ChadKillingsworth ChadKillingsworth force-pushed the static-linking-linux branch 2 times, most recently from 58d4169 to cc55fa7 Compare May 31, 2025 18:44
@rishipal rishipal self-assigned this Jun 2, 2025
@rishipal rishipal merged commit c3cbd58 into master Jun 2, 2025
1 check passed
@ChadKillingsworth ChadKillingsworth deleted the static-linking-linux branch June 2, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0