Problem
The Linux release binary (platform-cli_1.0.1_linux_amd64.tar.gz) dynamically links against glibc and requires version 2.38+:
platform-cli: /lib64/libc.so.6: version `GLIBC_2.38' not found (required by platform-cli)
This is because ubuntu-latest on GitHub Actions is Ubuntu 24.04 (glibc 2.39). The binary won't run on:
- Amazon Linux 2023 (glibc 2.34)
- Ubuntu 22.04 (glibc 2.35)
- Debian 12 (glibc 2.36)
- RHEL 9 / Rocky 9 (glibc 2.34)
Root Cause
The release workflow uses CGO_ENABLED=1 (required for blst and libevm) with the default dynamic linker on ubuntu-latest. The resulting binary is dynamically linked against the CI runner's glibc.
Suggested Fix
Statically link the Linux binaries using musl. In .github/workflows/release.yml, for the Linux amd64 build:
- Install
musl-tools: sudo apt-get install -y musl-tools
- Set
CC=musl-gcc
- Add
-extldflags '-static' to ldflags
This produces a fully static binary that runs on any Linux distro regardless of glibc version.
Environment
- platform-cli v1.0.1, linux/amd64 release binary
- Amazon Linux 2023 (glibc 2.34, kernel 6.1)
- Workaround: building from source works fine
Problem
The Linux release binary (
platform-cli_1.0.1_linux_amd64.tar.gz) dynamically links against glibc and requires version 2.38+:This is because
ubuntu-lateston GitHub Actions is Ubuntu 24.04 (glibc 2.39). The binary won't run on:Root Cause
The release workflow uses
CGO_ENABLED=1(required for blst and libevm) with the default dynamic linker onubuntu-latest. The resulting binary is dynamically linked against the CI runner's glibc.Suggested Fix
Statically link the Linux binaries using musl. In
.github/workflows/release.yml, for the Linux amd64 build:musl-tools:sudo apt-get install -y musl-toolsCC=musl-gcc-extldflags '-static'to ldflagsThis produces a fully static binary that runs on any Linux distro regardless of glibc version.
Environment