ava-labs / ava-labs/platform-cli

Linux release binary requires glibc 2.38+, fails on Amazon Linux 2023 and older distros

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## 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:

1. Install `musl-tools`: `sudo apt-get install -y musl-tools`
2. Set `CC=musl-gcc`
3. 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.