From 72ac6f8774385960d4647b22391a34c66e9b35ae Mon Sep 17 00:00:00 2001 From: KaraZajac Date: Sat, 23 May 2026 00:28:36 -0400 Subject: [PATCH] install.sh: prefer x86_64-static binary by default (portable across libc versions) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dynamic binary requires glibc 2.38+ — built on ubuntu-latest (2.39+), it refuses to load on Debian 12 (glibc 2.36), older Ubuntu, RHEL 8/9, etc. Hard portability ceiling for the one-liner installer. The musl-static binary (built on Alpine, attached as skeletonkey-x86_64-static) runs on every libc — verified Alpine → Debian/Ubuntu/Fedora/RHEL cross-distro. Costs ~800 KB extra (1.2 MB vs 390 KB) but eliminates the libc-version problem entirely. Default: install.sh now fetches the -static asset for x86_64. Override: SKELETONKEY_DYNAMIC=1 curl … | sh fetches the smaller dynamic binary (for hosts that have modern glibc and want the smaller download). arm64: no static variant attached yet (cross-compiling musl for aarch64 needs a separate toolchain); install.sh still fetches the dynamic arm64 binary, which works on most modern arm64 distros (raspberry-pi / aws graviton / etc.). --- install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2c40a27..3ab8f92 100755 --- a/install.sh +++ b/install.sh @@ -37,7 +37,19 @@ fail() { printf '[\033[1;31m-\033[0m] %s\n' "$*" >&2; exit 1; } # Detect architecture arch=$(uname -m) case "$arch" in - x86_64|amd64) target=x86_64 ;; + # x86_64 default: the musl-static binary works on every libc + # (glibc 2.x of any version, musl, uclibc) — costs ~800 KB extra + # vs the dynamic build but eliminates the GLIBC_2.NN portability + # ceiling that bit users on Debian-stable / older RHEL hosts. + # Set SKELETONKEY_DYNAMIC=1 to fetch the smaller dynamic build + # (needs glibc >= 2.38, i.e. Ubuntu 24.04 / Debian 13 / RHEL 10). + x86_64|amd64) + if [ "${SKELETONKEY_DYNAMIC:-0}" = "1" ]; then + target=x86_64 + else + target=x86_64-static + fi + ;; aarch64|arm64) target=arm64 ;; *) fail "Unsupported architecture: $arch (only x86_64 and arm64 currently)" ;; esac