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

geth 1.14.6 requires newer glibc #30115

Closed
Crypto2 opened this issue Jul 3, 2024 · 17 comments
Closed

geth 1.14.6 requires newer glibc #30115

Crypto2 opened this issue Jul 3, 2024 · 17 comments
Labels

Comments

@Crypto2
Copy link

Crypto2 commented Jul 3, 2024

It should be noted in the release notes that the official binary for geth requires a newer glibc

@alex2grad
Copy link

The Linux 64-bit pre-built binaries v1.14.6 require GLIBC_2.34.
The prev version required GLIBC_2.17.
The GNU C Library version 2.34 is less then 3 years old and many Linux distributions still have older versions of GLIBC.
It would be nice if we can download static linking pre-built binaries for Linux 64-bit.

@karalabe
Copy link
Member

karalabe commented Jul 5, 2024

glibc cannot be statically linked, at least not in Go.

I guess the issue stems from us updating our builders to a newer Ubuntu version. (cc @holiman). Though tbh, I'm not sure what we can meaningfully do here. Using an old version of glibs is just as arbitrary as using a new one, isn't it?

@alex2grad
Copy link

alex2grad commented Jul 5, 2024

The docker image ethereum/client-go:alltools-latest has statically linked binaries for Linux 64-bit

#file geth
geth: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=339b91232aaf970656908d202da063425d3f0fc6, with debug_info, not stripped

#ldd geth
not a dynamic executable

So the project already supports static linking.

@karalabe
Copy link
Member

karalabe commented Jul 5, 2024 via email

@alex2grad
Copy link

Static executables don't carry dynamic dependencies or libc version and could run on any Linux.

For example I run geth executable from docker image ethereum/client-go:alltools-v1.14.6
on Slackware 15.0 x86_64

#./geth --version
geth version 1.14.6-stable-aadddf3a

#./geth version-check
INFO [07-06|17:32:57.091] Checking vulnerabilities version=Geth/v1.14.6-stable-aadddf3a/linux-amd64/go1.22.4 url=https://geth.ethereum.org/docs/vulnerabilities/vulnerabilities.json
No vulnerabilities found

#uname -a
Linux alex-dev 6.6.36 #1 SMP Thu Jun 27 11:32:11 EDT 2024 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux

#cat /etc/os-release
NAME=Slackware
VERSION="15.0"
ID=slackware
VERSION_ID=15.0
PRETTY_NAME="Slackware 15.0 x86_64"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:15.0"
HOME_URL="http://slackware.com/"
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
VERSION_CODENAME=stable

@jcjc7777
Copy link

jcjc7777 commented Jul 9, 2024

I had the same issue on the ARM64 binary. I am on 22.04 and don't know how to upgrade GLIBC to the version requested by geth so I will downgrade until I figure out how to upgrade or something is put in the release notes.

@Alleysira
Copy link

Same problem happens in Ubuntu-20.04 in wsl, it seems not solved yet.

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found

@Neurone
Copy link
Contributor

Neurone commented Aug 1, 2024

Same issue here with native Ubuntu 20.04 (full updated). Can this StackOverflow answer be the solution?

replace FROM go:1.21 with FROM go:1.21.0-bullseye

@agathakazar
Copy link

Ran into this on Debian 11 which has glibc 2.31, a release note would've been nice unless it's a bug

@trojan20161207
Copy link

trojan20161207 commented Aug 8, 2024

I met this question,too. My ec2's linux system is AWS linux 2,and the glibc version is glibc-2.26-63.amzn2.0.1.x86_64.
When I use the v1.13.14 version is ok,so I have to rollout to v1.13.

@fjl
Copy link
Contributor

fjl commented Aug 14, 2024

Sorry, we kind of dropped the ball here and forgot about this issue in the last release. We didn't intentionally break compatibility with older glibc versions, so it could be classified as a bug. Let me summarize the affected distributions:

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Debian 11
  • AWS Linux 2

For these distributions, the binary provided on geth.ethereum.org does not launch.

@fjl
Copy link
Contributor

fjl commented Aug 20, 2024

The issue has been investigated further, and returning to Ubuntu 18.04 Bionic on builders is not an option for us. Travis CI has deprecated this version and only supports Ubuntu 20.04 and 22.04 going forward. We will stick to Ubuntu 20.04 Focal, and this means we are bound to the glibc version provided by it.

The only other available option would be publishing fully static builds. It is possible to build Geth as a statically-linked executable, but we have not tested glibc in static mode. AFAIK it will still retain a reference to certain dynamic glibc modules within the binary even if glibc itself is linked in statically.

@fjl
Copy link
Contributor

fjl commented Aug 20, 2024

I actually wonder how it could be that our pre-built Geth binary, built on Ubuntu 20.04, does not launch on that same version of Ubuntu.

@fjl
Copy link
Contributor

fjl commented Aug 20, 2024

Since #30319 has now been merged, builds should always happen on Ubuntu 20.04 Focal.
Anyone on Ubuntu 20.04 or 22.04, please try this build, which is the latest published one.

@namiloh
Copy link

namiloh commented Aug 20, 2024

The Linux 64-bit pre-built binaries v1.14.6 require GLIBC_2.34.
The prev version required GLIBC_2.17.
The GNU C Library version 2.34 is less then 3 years old

Focal uses glibc 2.31,afaict: https://launchpad.net/ubuntu/focal/+source/glibc

I think what happens might be that, according to @vivi365, the versions used on travis have been a tad random and nondeterministic, so sometimes it's been xenial, sometimes bionic, sometimes jammy. Which also could explain this:

I actually wonder how it could be that our pre-built Geth binary, built on Ubuntu 20.04, does not launch on that same version of Ubuntu.

@alex2grad
Copy link

alex2grad commented Aug 20, 2024

./geth --version
geth version 1.14.9-unstable-2a534ee1-20240820
objdump -T ./geth | grep -Eo 'GLIBC_\S+' | sed 's/.GLIBC_([.0-9]).*/\1/g' | sort -Vu|tail -1
2.17

./geth --version
geth version 1.14.8-stable-a9523b64
objdump -T ./geth | grep -Eo 'GLIBC_\S+' | sed 's/.GLIBC_([.0-9]).*/\1/g' | sort -Vu|tail -1
2.14

So the version 1.14.8-stable-a9523b64 depends on GLIBC version at least 2.14.
The version 1.14.9-unstable-2a534ee1-20240820 depends on GLIBC version at least 2.17.

Focal has GLIBC version 2.31
Bionic has GLIBC version 2.27
Xenial has GLIBC version 2.23
Trusty has GLIBC version 2.19

So even on Trusty the latest binary can run.

@holiman
Copy link
Contributor

holiman commented Aug 21, 2024

Thanks @alex2grad for the info!
Closing this, we're as compatible as we can be

@holiman holiman closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests