From 46c59b93fdd8c156099aa7fbd4896d3227069e89 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Feb 2026 04:47:29 +0000 Subject: [PATCH 1/3] fix: use cross for Linux builds to target glibc 2.31 for broad compatibility The release workflow was building on ubuntu-latest (Ubuntu 24.04), which produced binaries requiring glibc 2.39+. This made the binaries incompatible with most Linux distributions (only Ubuntu 24.04+ and Fedora 40+ worked). Switch Linux builds to use the `cross` tool, which compiles inside Docker containers with an older glibc (2.31). This makes the binaries compatible with Ubuntu 20.04+, Debian 11+, RHEL 9+, Fedora 33+, and most other modern Linux distributions. https://claude.ai/code/session_01PgK6kkizuvPvv6oq1Ku2QW --- .github/workflows/release-please.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index dcfb3fa..84d1818 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -68,7 +68,20 @@ jobs: with: targets: ${{ matrix.target }} + # Use cross for Linux builds to target older glibc (2.31) for broad compatibility. + # Without this, ubuntu-latest (24.04) produces binaries requiring glibc 2.39+. + - name: Install cross + if: contains(matrix.target, 'linux') + uses: taiki-e/install-action@v2 + with: + tool: cross + + - name: Build (Linux) + if: contains(matrix.target, 'linux') + run: cross build --release --target ${{ matrix.target }} + - name: Build + if: ${{ !contains(matrix.target, 'linux') }} env: RUSTFLAGS: ${{ matrix.rustflags }} run: cargo build --release --target ${{ matrix.target }} From ef2291a90c1d3e61ac5a20c224575435fee219fe Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Feb 2026 04:56:08 +0000 Subject: [PATCH 2/3] fix: use cross for Linux builds to target glibc 2.31 for broad compatibility https://claude.ai/code/session_01PgK6kkizuvPvv6oq1Ku2QW From 57d30f40f22de8ba93d5fc78c797761a551fea24 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Feb 2026 05:04:46 +0000 Subject: [PATCH 3/3] fix: build Linux binaries in ubuntu:22.04 container for glibc 2.35 compatibility Replace the `cross` tool approach (which failed on arm64 runners) with a dedicated `build-linux` job that runs inside an `ubuntu:22.04` container. This targets glibc 2.35 for both x86_64 and arm64 Linux builds, making binaries compatible with Ubuntu 22.04+, Debian 12+, RHEL 9+, and most modern Linux distributions. The previous approach using `cross` failed on the arm64 runner because cross tried to install an x86_64 Rust toolchain inside the arm64 environment. https://claude.ai/code/session_01PgK6kkizuvPvv6oq1Ku2QW --- .github/workflows/release-please.yml | 74 ++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 84d1818..9c8274e 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -31,6 +31,57 @@ jobs: config-file: release-please-config.json manifest-file: .release-please-manifest.json + # Linux builds run in an ubuntu:22.04 container (glibc 2.35) for broad compatibility. + # Without this, ubuntu-latest (24.04) produces binaries requiring glibc 2.39+. + build-linux: + needs: release-please + if: ${{ always() && (needs.release-please.outputs.releases_created == 'true' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')) }} + strategy: + matrix: + include: + - runner: ubuntu-latest + target: x86_64-unknown-linux-gnu + package: linux-x64 + - runner: ubuntu-24.04-arm + target: aarch64-unknown-linux-gnu + package: linux-arm64 + + runs-on: ${{ matrix.runner }} + container: + image: ubuntu:22.04 + + steps: + - name: Install system dependencies + run: | + apt-get update + apt-get install -y curl build-essential pkg-config cmake + + - uses: actions/checkout@v4 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Build + run: | + . "$HOME/.cargo/env" + cargo build --release --target ${{ matrix.target }} + + - name: Copy binary and models to package + run: | + mkdir -p packages/${{ matrix.package }}/bin + mkdir -p packages/${{ matrix.package }}/models + cp target/${{ matrix.target }}/release/agent-rdp packages/${{ matrix.package }}/bin/ + chmod +x packages/${{ matrix.package }}/bin/agent-rdp + cp models/*.rten packages/${{ matrix.package }}/models/ + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.package }} + path: packages/${{ matrix.package }}/ + build: needs: release-please if: ${{ always() && (needs.release-please.outputs.releases_created || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')) }} @@ -43,12 +94,6 @@ jobs: - os: macos-latest target: x86_64-apple-darwin package: darwin-x64 - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - package: linux-x64 - - os: ubuntu-24.04-arm - target: aarch64-unknown-linux-gnu - package: linux-arm64 - os: windows-latest target: x86_64-pc-windows-msvc package: win32-x64 @@ -68,20 +113,7 @@ jobs: with: targets: ${{ matrix.target }} - # Use cross for Linux builds to target older glibc (2.31) for broad compatibility. - # Without this, ubuntu-latest (24.04) produces binaries requiring glibc 2.39+. - - name: Install cross - if: contains(matrix.target, 'linux') - uses: taiki-e/install-action@v2 - with: - tool: cross - - - name: Build (Linux) - if: contains(matrix.target, 'linux') - run: cross build --release --target ${{ matrix.target }} - - name: Build - if: ${{ !contains(matrix.target, 'linux') }} env: RUSTFLAGS: ${{ matrix.rustflags }} run: cargo build --release --target ${{ matrix.target }} @@ -110,8 +142,8 @@ jobs: path: packages/${{ matrix.package }}/ publish: - needs: [release-please, build] - if: ${{ always() && needs.build.result == 'success' }} + needs: [release-please, build, build-linux] + if: ${{ always() && needs.build.result == 'success' && needs.build-linux.result == 'success' }} runs-on: ubuntu-latest permissions: contents: write