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

🐛 aarch64-linux-gnu/libc.so.6: version `GLIBC_2.29' not found #530

Closed
1 task done
GiancarlosIO opened this issue Oct 15, 2023 · 6 comments
Closed
1 task done

Comments

@GiancarlosIO
Copy link

GiancarlosIO commented Oct 15, 2023

Environment information

OS: linux-arm64
@biomejs/biome: "1.2.2

(i can't run biome rage because it fails with the same error)

What happened?

Hi there
I'm experiencing the following error in CI using linux-arm64 when running biome check . 😢

@my-app/cli:lint: /builds/my-team/frontend/team-frontend-apps/node_modules/.pnpm/@[email protected]/node_modules/@biomejs/cli-linux-arm64/biome: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.29' not found (required by /builds/my-team/frontend/team-frontend-apps/node_modules/.pnpm/@[email protected]/node_modules/@biomejs/cli-linux-arm64/biome)
. prepare: @my-app/cli:lint:  ELIFECYCLE  Command failed with exit code 1.

Thanks

Expected result

It should check the files without errors

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico
Copy link
Member

Unfortunately we don't support Tier 2 platforms yet :(

https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-2-with-host-tools

We would like to support some of them, but unfortunately we don't have the knowledge and bandwidth to do so. It would be great if someone else would help in achieving that.

@faultyserver
Copy link
Contributor

faultyserver commented Oct 30, 2023

We ran into a similar issue initially trying to get biome to run in our CI and the root of this specific error is that the binary is compiled on a version of linux that's newer than where it's trying to be run. In this case, it seems like biome is being compiled on an OS with GLIBC_2.29 as a minimum target, but your OS most likely has an older version like 2.28 or less.

Context

If you take a look at the glibc timeline, you can see that glibc 2.29 was released in 2019. Most linux distributions then started shipping with it as the baseline soon after, like Ubuntu 20.04 (released in 2020), Debian 11 (released in 2021), and so on.

Nowadays, even the previous LTS versions of those OSes are now end-of-life (ubuntu 18.04 in april 2023, debian 10 in june 2022), and most CI providers and other vendors are no longer allowing new VMs to be created with those old OSes.

Diagnosing

You can figure out which version of glibc your OS has installed by running ldd --version. You'll get an output like:

$ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.4) 2.35

Here, I'm on ubuntu 22.04, released last year, with glibc 2.35.

If your result from this command is something higher than glibc 2.29, then there may be another issue causing your system to resolve glibc differently or possibly something else even more obtuse.

Resolution

glibc is not a package that you can really upgrade without doing a full OS upgrade. You can, but it's really not recommended as it can break a lot of core system functionality.

Since (almost) all of the OSes that ship with glibc < 2.29 are now end of life, the best thing to consider is upgrading your OS to a still-supported LTS version, any of which nowadays should have a newer glibc and thus be able to run biome as expected (or at least solve this specific error).

The other option is that Biome could intentionally build versions of the package with an old OS, but again, since they are no longer supported, I don't think GitHub Actions will even let you build on an old enough version of linux anymore. Even if the package was built for the target architecture, the lack of a newer glibc version would still cause this error to come up.

@GiancarlosIO
Copy link
Author

@faultyserver Thanks so much for the detailed explanation. I'll talk with our infra team to try to upgrade the so version that we are using in our CI.

Thanks again!

@axieum
Copy link

axieum commented Aug 13, 2024

Unfortunately, if you're using dynamic Jenkins agents, you'll need to wait for a RHEL 9 image before you can use this project in your CI.

For this reason, we've had to drop Biome JS until openshift/jenkins#1766 is resolved.

@johnpyp
Copy link

johnpyp commented Aug 15, 2024

This could also potentially be addressed by using a container overlay like is used for manylinux that has an older version of glibc, see this blog post about a similar solution: https://kobzol.github.io/rust/ci/2021/05/07/building-rust-binaries-in-ci-that-work-with-older-glibc.html

Alternatively, building with musl and routing based on the system glibc might work?

@johnpyp
Copy link

johnpyp commented Aug 15, 2024

What swc does here should actually be quite portable - They use the official napi-rs images (e.g here in their build action). The napi-rs image uses manylinux itself for maximum compatibility

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

No branches or pull requests

5 participants