Problem
The current build targets Ubuntu which uses GLIBC v2.39
Many docker images (incl all STD node images) are based on Debian using GLIBC 2.36
Suggestions
ℹ️ The following suggestion came from Gemini - I have not manually verified them but they appear correct based on my limited knowledge about this topic.
- Build static binaries that do not depend on GLIBC (recommended)
Gemini: If you don't want to manage different OS versions, the most common "Go way" to fix GLIBC errors is to stop using GLIBC entirely. You can build a static binary that includes all necessary libraries inside the file.
- name: Build Static Binary
run: CGO_ENABLED=0 go build -ldflags="-s -w" -o karate-linux-static .
- Add build for debian
Gemini: If the project strictly requires CGO (e.g., for certain networking or encryption features), you must build the binary on the oldest OS you intend to support.
You can modify the jobs section of the release.yml to include a job that runs inside a Debian container:
build-debian:
runs-on: ubuntu-latest
container:
image: golang:1.23-bookworm # This image has GLIBC 2.36
steps:
- uses: actions/checkout@v4
- name: Build for Debian
run: go build -v -o karate-debian-amd64 .
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: karate-debian
path: karate-debian-amd64
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: karate-linux-modern # For Ubuntu 24.04+
- os: ubuntu-22.04
artifact_name: karate-linux-debian # This will use GLIBC 2.35 (compatible with Debian 12)
Problem
The current build targets Ubuntu which uses GLIBC v2.39
Many docker images (incl all STD node images) are based on Debian using GLIBC 2.36
Suggestions
ℹ️ The following suggestion came from Gemini - I have not manually verified them but they appear correct based on my limited knowledge about this topic.