Skip to content

Fix CGO_ENABLED in release build; remove unused goreleaser config#639

Merged
james-nesbitt merged 1 commit into
mainfrom
GH-638
Jun 2, 2026
Merged

Fix CGO_ENABLED in release build; remove unused goreleaser config#639
james-nesbitt merged 1 commit into
mainfrom
GH-638

Conversation

@james-nesbitt
Copy link
Copy Markdown
Collaborator

@james-nesbitt james-nesbitt commented Jun 1, 2026

What

Set CGO_ENABLED=0 in the release workflow build loop and remove two unused goreleaser config files.

Why

The v1.5.16 release binary is dynamically linked against the Ubuntu CI runner's glibc (2.32/2.34). On RHEL 8 (glibc 2.28) the binary fails to run with version 'GLIBC_2.34' not found. Goreleaser — which was correctly setting CGO_ENABLED=0 — is no longer used; the release workflow's hand-rolled build loop was missing the flag.

How

  • Added CGO_ENABLED=0 to the go build invocation in .github/workflows/release.yml — eliminates cgo dependency, producing a fully static Linux binary with no glibc coupling. On macOS and Windows the binary still links against the OS's standard system libraries, which is normal and expected on those platforms.
  • Added -trimpath to strip local build paths from the binary, matching prior goreleaser behaviour.
  • Deleted .goreleaser.local.yml and .goreleaser.release.yml — not referenced in the Makefile or any workflow since the release workflow was rewritten.

Testing

  • Unit tests pass (no code change).
  • Verify after next release: ldd launchpad_linux_amd64_* should report not a dynamic executable; file launchpad_linux_amd64_* should show statically linked.

Links

Checklist

  • Tests added or updated
  • Docs updated if user-visible behaviour changed
  • No debug output or dead code left in

Written by AI: claude-sonnet-4-5

The release workflow built binaries without CGO_ENABLED=0, causing the
Linux binary to be dynamically linked against the Ubuntu CI runner's
glibc (2.32/2.34). The resulting binary fails on RHEL 8 (glibc 2.28)
with 'version GLIBC_2.34 not found'.

- Set CGO_ENABLED=0 on the go build invocation so all release binaries
  are statically linked, consistent with what the (now-unused) goreleaser
  config was doing.
- Add -trimpath to strip local build paths from the binary, matching
  the goreleaser config behaviour.
- Remove .goreleaser.local.yml and .goreleaser.release.yml — goreleaser
  is not referenced in the Makefile or any workflow and has not been used
  since the release workflow was rewritten.

Fixes #638
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release pipeline to produce Linux-compatible Go binaries (avoiding dynamic glibc linkage issues like GLIBC_2.34 not found) by aligning the hand-rolled GitHub Actions build with the prior goreleaser behavior, and removes now-unused goreleaser configuration files.

Changes:

  • Set CGO_ENABLED=0 in the release workflow build loop to prevent cgo-based dynamic glibc coupling (especially impacting Linux releases).
  • Add -trimpath to the release go build invocation to match prior goreleaser output characteristics.
  • Remove .goreleaser.local.yml and .goreleaser.release.yml since they are no longer referenced.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/release.yml Ensures release builds use CGO_ENABLED=0 and -trimpath in the multi-platform build loop.
.goreleaser.release.yml Removed unused goreleaser release configuration.
.goreleaser.local.yml Removed unused goreleaser local configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
@james-nesbitt james-nesbitt added smoke-legacy Run legacy smoke test and removed smoke-legacy Run legacy smoke test labels Jun 2, 2026
@james-nesbitt james-nesbitt merged commit 5e86b2f into main Jun 2, 2026
4 checks passed
@james-nesbitt james-nesbitt deleted the GH-638 branch June 2, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

smoke-legacy Run legacy smoke test smoke-modern Run modern smoke test smoke-upgrade Run smoke-upgrade CI job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Launchpad 1.5.16 fails with glibc errors on RHEL 8

3 participants