Skip to content

fix(native): build Linux binaries against GLIBC 2.28 for RHEL 8 compatibility#2351

Merged
dividedmind merged 1 commit intomainfrom
fix/libc-compat
Mar 4, 2026
Merged

fix(native): build Linux binaries against GLIBC 2.28 for RHEL 8 compatibility#2351
dividedmind merged 1 commit intomainfrom
fix/libc-compat

Conversation

@dividedmind
Copy link
Copy Markdown
Collaborator

Build linux-x64 and linux-arm64 inside a custom RHEL 8 UBI container (GCC Toolset 13) so that better_sqlite3.node is compiled against GLIBC 2.28 rather than the host runner's GLIBC 2.39, making the binaries compatible with RHEL 8 / AlmaLinux 8 / Rocky Linux 8.

  • ci/Dockerfile.build: new RHEL 8 UBI + GCC 13 builder image, cached in GHCR by Dockerfile SHA via the new sync-builder CI job
  • build-native.yml: linux jobs now run inside the builder container; linux-arm64 switches from self-hosted to ubuntu-24.04-arm
  • packages/cli/bin/build-native: pass --no-native-build when targeting the current platform (rely on yarn install's compiled addon instead of pkg fetching a pre-built one); derive output name from package.json so the script works for both appmap and scanner
  • packages/scanner/bin/build-native: replace duplicate script with a symlink to the cli version

@dividedmind dividedmind self-assigned this Mar 2, 2026
@dividedmind dividedmind added the build native Build and save native packages in the GitHub workflow label Mar 2, 2026
Copy link
Copy Markdown
Contributor

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

This PR updates the native-binary build pipeline so Linux artifacts are produced in a RHEL 8 (GLIBC 2.28) environment, improving compatibility with RHEL/Alma/Rocky 8 while also de-duplicating and generalizing the build-native packaging script across packages.

Changes:

  • Add a RHEL 8 UBI + GCC Toolset 13 builder image and a CI job to build/push it to GHCR keyed by the Dockerfile hash.
  • Run Linux native builds inside that container (and move linux-arm64 to ubuntu-24.04-arm) to ensure addons are built against GLIBC 2.28.
  • Update packages/cli/bin/build-native to derive output name from package.json and skip pkg native-addon rebuilds when targeting the current platform; replace scanner’s duplicate script with a link to the CLI version.

Reviewed changes

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

File Description
ci/Dockerfile.build Introduces the RHEL 8 builder image (Node 18 + GCC toolset 13) used for Linux native builds.
.github/workflows/build-native.yml Adds the builder-image sync job and runs Linux builds inside the new container image.
packages/cli/bin/build-native Generalizes output naming and adds logic to skip pkg native rebuilds for the current platform.
packages/scanner/bin/build-native De-duplicates by pointing to the CLI build-native script.

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

Comment thread .github/workflows/build-native.yml
…tibility

Build linux-x64 and linux-arm64 inside a custom RHEL 8 UBI container
(GCC Toolset 13) so that better_sqlite3.node is compiled against GLIBC
2.28 rather than the host runner's GLIBC 2.39, making the binaries
compatible with RHEL 8 / AlmaLinux 8 / Rocky Linux 8.

- ci/Dockerfile.build: new RHEL 8 UBI + GCC 13 builder image, cached in
  GHCR by Dockerfile SHA via the new sync-builder CI job
- build-native.yml: linux jobs now run inside the builder container;
  linux-arm64 switches from self-hosted to ubuntu-24.04-arm
- packages/cli/bin/build-native: pass --no-native-build when targeting
  the current platform (rely on yarn install's compiled addon instead of
  pkg fetching a pre-built one); derive output name from package.json
  so the script works for both appmap and scanner
- packages/scanner/bin/build-native: replace duplicate script with a
  symlink to the cli version
@dividedmind dividedmind merged commit 3da2b87 into main Mar 4, 2026
25 checks passed
@dividedmind dividedmind deleted the fix/libc-compat branch March 4, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build native Build and save native packages in the GitHub workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants