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

Version 0.5.0 fails to start on Linux: version `GLIBC_2.34' not found #121

Closed
amotl opened this issue Jan 19, 2024 · 4 comments · Fixed by #122
Closed

Version 0.5.0 fails to start on Linux: version `GLIBC_2.34' not found #121

amotl opened this issue Jan 19, 2024 · 4 comments · Fixed by #122

Comments

@amotl
Copy link
Member

amotl commented Jan 19, 2024

Problem

# /usr/local/bin/cratedb-prometheus-adapter -config.file /etc/cratedb-prometheus-adapter/config.yml
/usr/local/bin/cratedb-prometheus-adapter: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/bin/cratedb-prometheus-adapter)
/usr/local/bin/cratedb-prometheus-adapter: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /usr/local/bin/cratedb-prometheus-adapter)

Thanks for reporting, @WalBeh.

@amotl
Copy link
Member Author

amotl commented Jan 19, 2024

Maybe it was the wrong choice to bump the Golang version on the Docker containers running the builds? See 5c745a8.

@amotl
Copy link
Member Author

amotl commented Jan 19, 2024

Overview of glibc versions. Build machines (previous/now) vs. runtime machine. That's probably the culprit: The program is linked to glibc 2.36, thus it is not compatible with previous versions, right?

# Golang 1.16
$ docker run --rm -it golang:1.16 ldd --version
ldd (Debian GLIBC 2.31-13+deb11u2) 2.31

# Golang 1.21
$ docker run --rm -it golang:1.21 ldd --version
ldd (Debian GLIBC 2.36-9+deb12u3) 2.36

# Debian 11
$ docker run --rm -it debian:bullseye-slim ldd --version
ldd (Debian GLIBC 2.31-13+deb11u7) 2.31

@amotl
Copy link
Member Author

amotl commented Jan 19, 2024

We'd need to go back to Golang 1.18 with the vanilla baseline OCI images.

# Golang 1.18
$ docker run --rm -it golang:1.18 ldd --version
ldd (Debian GLIBC 2.31-13+deb11u5) 2.31

# Golang 1.19
$ docker run --rm -it golang:1.19 ldd --version
ldd (Debian GLIBC 2.36-9+deb12u1) 2.36

# Golang 1.20
$ docker run --rm -it golang:1.20 ldd --version
ldd (Debian GLIBC 2.36-9+deb12u3) 2.36

By choosing a Debian-flavored release, we can still use Golang 1.20, but also better select the glibc version.

$ docker run --rm -it golang:1.20-buster ldd --version
ldd (Debian GLIBC 2.28-10+deb10u2) 2.28
$ docker run --rm -it golang:1.20-bullseye ldd --version
ldd (Debian GLIBC 2.31-13+deb11u7) 2.31

@amotl
Copy link
Member Author

amotl commented Jan 19, 2024

GH-122, and a subsequent release, will resolve this issue.

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.

1 participant