Skip to content

Statically link libstdc++ for Debian 12 runtime compatibility#4

Open
camphillips22 wants to merge 2 commits intomasterfrom
downgrade-ci-to-ubuntu-2204
Open

Statically link libstdc++ for Debian 12 runtime compatibility#4
camphillips22 wants to merge 2 commits intomasterfrom
downgrade-ci-to-ubuntu-2204

Conversation

@camphillips22
Copy link
Copy Markdown
Collaborator

@camphillips22 camphillips22 commented Apr 9, 2026

Summary

  • Binaries built on Ubuntu 24.04 require GLIBCXX_3.4.32, which is not available in our Debian 12 runtime image (debian-base:latest has up to GLIBCXX_3.4.30)
  • Statically link libstdc++ via --linkopt=-static-libstdc++ so the GLIBCXX dependency is embedded in the binary rather than resolved at runtime
  • Scoped to Linux only (build:linux) — macOS builds are unaffected
  • Binary size increase is ~2-3 MB per binary (libstdc++ static lib size)

Context

Downgrading the CI image to Ubuntu 22.04 was attempted first but caused widespread compiler errors in third-party code (ZetaSQL/PostgreSQL) due to GCC version differences.

🤖 Generated with Claude Code

camphillips22 and others added 2 commits April 9, 2026 17:04
Ubuntu 24.04 produces binaries requiring GLIBC 2.38 and GLIBCXX 3.4.32,
which are not available in the Debian 12 runtime image (debian-base).
Ubuntu 22.04 has GLIBC 2.35 and GLIBCXX 3.4.30, both compatible with
the Debian 12 runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ubuntu 24.04 builds produce binaries requiring GLIBCXX_3.4.32, which
is not available in the Debian 12 runtime image. Statically linking
libstdc++ embeds it in the binary, removing the runtime dependency.
Scoped to Linux only via build:linux config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@camphillips22 camphillips22 changed the title Downgrade CI Linux image to Ubuntu 22.04 for glibc compatibility Statically link libstdc++ for Debian 12 runtime compatibility Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant