Skip to content
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

GLIBC_2.32' and GLIBC_2.34' not found error in AlmaLinux OS 8 and CentOS Stream 8. #280

Closed
hideishi-m opened this issue Jan 16, 2023 · 8 comments · Fixed by #281
Closed

Comments

@hideishi-m
Copy link

From 20230103.0.0 google-closure-compiler-linux fails with the following error on AlmaLInux OS 8 as well as CentOS Stream 8 (aka RHEL8 platforms).

/root/node_modules/google-closure-compiler-linux/compiler: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /root/node_modules/google-closure-compiler-linux/compiler)
/root/node_modules/google-closure-compiler-linux/compiler: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /root/node_modules/google-closure-compiler-linux/compiler)

It does not happen with 20221102.0.1. Note that RHEL8 uses glibc-2.28.

Following is the Dockerfile to reproduce.

FROM almalinux:8
# FROM quay.io/centos/centos:stream8

WORKDIR /root

RUN dnf -y module enable nodejs:18
RUN dnf -y install nodejs
RUN npm install google-closure-compiler

CMD [ "/root/node_modules/google-closure-compiler-linux/compiler", "--version" ]

Following is the output with 20221102.0.1 without any errors.

Closure Compiler (http://github.com/google/closure-compiler)
Version: v20221102

Possibly related to #272 ?

@ChadKillingsworth
Copy link
Collaborator

Yes this changed with #272. In order to support multiple glibc versions, we are now dynamically linking against it. That means that the distribution requires having glibc installed.

There's no good way to support multiple glibc versions and static link to it. We had to choose one or the other.

@hideishi-m
Copy link
Author

Hello @ChadKillingsworth ,
I'm not against distribution of dynamically linked binary.
Because RHEL8 (and its compatible platforms) uses lower version of glibc, I'm hoping that if it is possible to build the dynamically linked binary on build environment with lower version of glibc. This will remedy to run google-closure-compiler-linux on RHEL8 environment.

@ChadKillingsworth
Copy link
Collaborator

Here's the GRAAL documentation on dynamically linked GLIBC: https://www.graalvm.org/22.2/reference-manual/native-image/guides/build-static-executables/#frequently-asked-questions

There's very little control.

@hideishi-m
Copy link
Author

hideishi-m commented Jan 17, 2023

Sure, you have - at least - some sort of control.
The root cause is that ubuntu-latest image is shipped with glibc-2.35 which mandates 2.32 and 2.34 ABI.
On the other hand, ubuntu-20.04 image is shipped with glibc-2.31 which is compatible with glibc-2.28.
If you could use ubuntu-20.04 image instead of ubunto-latest image for building the binary, this will link against glibc which is not bound to 2.32 nor 2.34.
Unless GRAAL mandates glibc-2.32+, using ubuntu-20.04 image could be an option.

@ChadKillingsworth
Copy link
Collaborator

I'm open to switching the build image. My only concern is at some point this will have to change. I'm wanting to target the largest possible number of users without creating a large maintenance burden.

@hideishi-m
Copy link
Author

hideishi-m commented Jan 19, 2023

By the way, because the root cause of #272 was the same as #280 that building image has been swithced from ubuntu-20.04 (former latest) to ubuntu-22.04 (current latest), it is also possible to go back to the static build as it was in 20221102.0.1.
Using static build may be better from the number of users perspective as we see in #277 where it uses alpine based image which may not bundle the required version of glibc.

@hideishi-m
Copy link
Author

Linux binary built in this pipeline https://github.com/google/closure-compiler-npm/actions/runs/3952305234 works perfectly!
Thank you for the fix, and await patiently to be released as npm in the next round.

@ChadKillingsworth
Copy link
Collaborator

We publish a nightly version, so you don't technically have to wait for a major release:
https://www.npmjs.com/package/google-closure-compiler/v/20230122.0.0-nightly

I may go back and revisit static linking with this info. It's definitely preferred.

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 a pull request may close this issue.

2 participants