From 8feb2e59e61cbf0f3d785cfdaca68b89981ccd35 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 22:46:24 +0000 Subject: [PATCH 1/2] fix: lower GLIBC requirement to 2.28 for older Linux compatibility - Switch Docker build image from ubuntu:20.04 (GLIBC 2.31) to debian:10 (GLIBC 2.28) for Linux release builds - Add GLIBC version ceiling check in CI to prevent future regressions - Add GLIBC version check in install.sh to give users a clear error message before downloading an incompatible binary Fixes #509 Co-Authored-By: Sasha Varlamov --- .github/workflows/release.yml | 14 +++++++++++--- install.sh | 14 ++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a45aabda..fc0026ee0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,12 +32,12 @@ jobs: target: x86_64-unknown-linux-gnu artifact_name: git-ai-linux-x64 use_docker: true - docker_image: ubuntu:20.04 + docker_image: debian:10 - os: ubuntu-22.04-arm target: aarch64-unknown-linux-gnu artifact_name: git-ai-linux-arm64 use_docker: true - docker_image: ubuntu:20.04 + docker_image: debian:10 - os: windows-latest target: x86_64-pc-windows-msvc artifact_name: git-ai-windows-x64 @@ -128,7 +128,15 @@ jobs: file target/${{ matrix.target }}/release/git-ai ldd target/${{ matrix.target }}/release/git-ai || true echo "Required GLIBC version:" - objdump -T target/${{ matrix.target }}/release/git-ai | grep GLIBC | sed 's/.*GLIBC_/GLIBC_/' | sort -V | uniq | tail -1 + MAX_GLIBC=$(objdump -T target/${{ matrix.target }}/release/git-ai | grep GLIBC | sed 's/.*GLIBC_/GLIBC_/' | sort -V | uniq | tail -1) + echo "$MAX_GLIBC" + # Fail if the binary requires GLIBC newer than 2.28 (Debian 10 / CentOS 8) + MAX_ALLOWED="GLIBC_2.28" + if [ "$(printf '%s\n' "$MAX_ALLOWED" "$MAX_GLIBC" | sort -V | tail -1)" != "$MAX_ALLOWED" ]; then + echo "::error::Binary requires $MAX_GLIBC which exceeds the maximum allowed $MAX_ALLOWED" + exit 1 + fi + echo "GLIBC requirement check passed: $MAX_GLIBC <= $MAX_ALLOWED" - name: Verify binary architecture (Windows) if: contains(matrix.os, 'windows') diff --git a/install.sh b/install.sh index 3bd9d8b8c..53f6456f0 100755 --- a/install.sh +++ b/install.sh @@ -186,6 +186,20 @@ STD_GIT_PATH=$(detect_std_git) OS=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m) +# Check GLIBC version on Linux to provide a clear error before downloading +if [ "$OS" = "linux" ]; then + MIN_GLIBC="2.28" + CURRENT_GLIBC="" + if command -v ldd >/dev/null 2>&1; then + CURRENT_GLIBC=$(ldd --version 2>&1 | head -n1 | grep -oE '[0-9]+\.[0-9]+$' || true) + fi + if [ -n "$CURRENT_GLIBC" ]; then + if [ "$(printf '%s\n' "$MIN_GLIBC" "$CURRENT_GLIBC" | sort -V | head -n1)" != "$MIN_GLIBC" ]; then + error "GLIBC $MIN_GLIBC+ is required, but found GLIBC $CURRENT_GLIBC.\nPre-built binaries are not compatible with your system.\nPlease build from source instead:\n https://github.com/git-ai-project/git-ai#building-from-source" + fi + fi +fi + # Map architecture to binary name case $ARCH in "x86_64") From b76f2ac5d206314109eca648456378486ef01ce5 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 14 Feb 2026 18:40:59 +0000 Subject: [PATCH 2/2] refactor: switch to musl static linking instead of EOL debian:10 - Use x86_64-unknown-linux-musl and aarch64-unknown-linux-musl targets for fully static binaries with zero GLIBC dependency - Build in ubuntu:22.04 Docker (maintained, non-EOL) with musl-tools - Replace GLIBC version ceiling check with static linking verification - Remove GLIBC check from install.sh (no longer needed for static binaries) This eliminates the GLIBC compatibility issue entirely rather than just lowering the minimum version. Co-Authored-By: Sasha Varlamov --- .github/workflows/release.yml | 25 +++++++++++-------------- install.sh | 13 ------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc0026ee0..f3d537622 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,15 +29,15 @@ jobs: matrix: include: - os: ubuntu-22.04 - target: x86_64-unknown-linux-gnu + target: x86_64-unknown-linux-musl artifact_name: git-ai-linux-x64 use_docker: true - docker_image: debian:10 + docker_image: ubuntu:22.04 - os: ubuntu-22.04-arm - target: aarch64-unknown-linux-gnu + target: aarch64-unknown-linux-musl artifact_name: git-ai-linux-arm64 use_docker: true - docker_image: debian:10 + docker_image: ubuntu:22.04 - os: windows-latest target: x86_64-pc-windows-msvc artifact_name: git-ai-windows-x64 @@ -75,7 +75,7 @@ jobs: ${{ matrix.docker_image }} \ bash -c " apt-get update && \ - apt-get install -y curl build-essential pkg-config libssl-dev && \ + apt-get install -y curl build-essential pkg-config musl-tools && \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --target ${{ matrix.target }} && \ . \$HOME/.cargo/env && \ cargo build --release --target ${{ matrix.target }} && \ @@ -126,17 +126,14 @@ jobs: if: contains(matrix.os, 'ubuntu') run: | file target/${{ matrix.target }}/release/git-ai - ldd target/${{ matrix.target }}/release/git-ai || true - echo "Required GLIBC version:" - MAX_GLIBC=$(objdump -T target/${{ matrix.target }}/release/git-ai | grep GLIBC | sed 's/.*GLIBC_/GLIBC_/' | sort -V | uniq | tail -1) - echo "$MAX_GLIBC" - # Fail if the binary requires GLIBC newer than 2.28 (Debian 10 / CentOS 8) - MAX_ALLOWED="GLIBC_2.28" - if [ "$(printf '%s\n' "$MAX_ALLOWED" "$MAX_GLIBC" | sort -V | tail -1)" != "$MAX_ALLOWED" ]; then - echo "::error::Binary requires $MAX_GLIBC which exceeds the maximum allowed $MAX_ALLOWED" + # Verify the binary is statically linked (musl) + if ldd target/${{ matrix.target }}/release/git-ai 2>&1 | grep -q 'not a dynamic executable\|statically linked'; then + echo "Binary is statically linked (musl) - no GLIBC dependency" + else + echo "::error::Binary is dynamically linked - expected static musl binary" + ldd target/${{ matrix.target }}/release/git-ai || true exit 1 fi - echo "GLIBC requirement check passed: $MAX_GLIBC <= $MAX_ALLOWED" - name: Verify binary architecture (Windows) if: contains(matrix.os, 'windows') diff --git a/install.sh b/install.sh index 53f6456f0..2fa17a5d3 100755 --- a/install.sh +++ b/install.sh @@ -186,19 +186,6 @@ STD_GIT_PATH=$(detect_std_git) OS=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m) -# Check GLIBC version on Linux to provide a clear error before downloading -if [ "$OS" = "linux" ]; then - MIN_GLIBC="2.28" - CURRENT_GLIBC="" - if command -v ldd >/dev/null 2>&1; then - CURRENT_GLIBC=$(ldd --version 2>&1 | head -n1 | grep -oE '[0-9]+\.[0-9]+$' || true) - fi - if [ -n "$CURRENT_GLIBC" ]; then - if [ "$(printf '%s\n' "$MIN_GLIBC" "$CURRENT_GLIBC" | sort -V | head -n1)" != "$MIN_GLIBC" ]; then - error "GLIBC $MIN_GLIBC+ is required, but found GLIBC $CURRENT_GLIBC.\nPre-built binaries are not compatible with your system.\nPlease build from source instead:\n https://github.com/git-ai-project/git-ai#building-from-source" - fi - fi -fi # Map architecture to binary name case $ARCH in