install.sh: prefer x86_64-static binary by default (portable across libc versions)
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.).
This commit is contained in:
+13
-1
@@ -37,7 +37,19 @@ fail() { printf '[\033[1;31m-\033[0m] %s\n' "$*" >&2; exit 1; }
|
|||||||
# Detect architecture
|
# Detect architecture
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
case "$arch" in
|
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 ;;
|
aarch64|arm64) target=arm64 ;;
|
||||||
*) fail "Unsupported architecture: $arch (only x86_64 and arm64 currently)" ;;
|
*) fail "Unsupported architecture: $arch (only x86_64 and arm64 currently)" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user