mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-27 06:53:11 +08:00
The standard linux release binary dynamically links glibc 2.38+ and GLIBCXX_3.4.32, so it fails to start on Debian 11, Ubuntu 20.04/22.04, RHEL/Rocky 8/9, Amazon Linux 2, etc. — yet install.sh, the npm and PyPI wrappers, and the binary's own self-update all fetched it by default, contradicting the "single static binary" promise. Point every linux install + self-update path at the fully-static "-portable" asset (gcc -static), which has no glibc floor. macOS/Windows are unaffected and unchanged. - install.sh, pkg/npm/install.js, pkg/pypi _cli.py: select -portable on linux - src/cli/cli.c: self-update download URL AND checksum archive name both use -portable on linux (they must match or the update fails checksum verify) - scripts/smoke-test.sh: assert linux self-update targets the -portable asset - scripts/ci/check-glibc-compat.sh: new guard — runs the binary inside debian:bullseye (glibc 2.31) and asserts it starts - _smoke.yml: run the guard on the portable binary in smoke-linux-portable Reproduced: standard binary -> "GLIBC_2.38 not found" on glibc 2.31; portable binary runs cleanly.
23 lines
1.1 KiB
Bash
Executable File
23 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Regression guard: the linux binary we ship must START on OLD glibc.
|
|
#
|
|
# The standard linux release binary dynamically links glibc 2.38+ / GLIBCXX
|
|
# 3.4.32 and fails to start on Debian 11, RHEL/Rocky 8, Ubuntu 20.04, Amazon
|
|
# Linux 2, etc. The fix points all linux install + self-update paths at the
|
|
# fully-static "-portable" asset. This runs a given linux binary inside an
|
|
# old-glibc container (debian:bullseye, glibc 2.31) and asserts it starts:
|
|
# - RED for the dynamic standard binary (GLIBC_2.38 not found)
|
|
# - GREEN for the static -portable binary (runs anywhere)
|
|
#
|
|
# Usage: check-glibc-compat.sh <path-to-linux-binary>
|
|
# Env: GLIBC_TEST_IMAGE (default: debian:bullseye-slim, glibc 2.31)
|
|
set -euo pipefail
|
|
|
|
BIN="${1:?usage: check-glibc-compat.sh <path-to-linux-binary>}"
|
|
IMAGE="${GLIBC_TEST_IMAGE:-debian:bullseye-slim}"
|
|
BIN_ABS="$(cd "$(dirname "$BIN")" && pwd)/$(basename "$BIN")"
|
|
|
|
echo "==> running $(basename "$BIN") --version inside ${IMAGE} (glibc 2.31)"
|
|
docker run --rm -v "${BIN_ABS}:/cbm:ro" "${IMAGE}" /cbm --version
|
|
echo "PASS: binary starts on old glibc (${IMAGE})"
|