Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ jobs:
run: bash scripts/test/e2e.sh ./build/wally

linux:
# Match the oldest supported Linux release baseline. Building on 24.04
# silently introduced GLIBC_2.38 / GLIBCXX_3.4.31+ requirements.
runs-on: ubuntu-22.04
# Kit 0.20.39's Sherpa prebuilt needs glibc 2.38 and GLIBCXX_3.4.32, so
# this job builds and runs on that floor. wally's own code picks up the
# same glibc; versions.toml [linux_abi] is that floor.
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand All @@ -192,7 +193,8 @@ jobs:
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y ninja-build cmake libcurl4-openssl-dev patchelf
sudo apt-get install -y ninja-build cmake libcurl4-openssl-dev patchelf \
libzstd-dev libbrotli-dev libbz2-dev
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d
with:
key: ccache-ci-linux-x64
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,8 @@ jobs:

linux:
needs: [validate-dispatch]
# Release compatibility floor. Ubuntu 24.04 produced a bottle requiring
# GLIBC_2.38 and GLIBCXX_3.4.31/32, which fails on Ubuntu 22.04.
runs-on: ubuntu-22.04
# Kit 0.20.39's Sherpa prebuilt needs glibc 2.38 and GLIBCXX_3.4.32.
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand All @@ -276,7 +275,8 @@ jobs:
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y ninja-build cmake libcurl4-openssl-dev patchelf
sudo apt-get install -y ninja-build cmake libcurl4-openssl-dev patchelf \
libzstd-dev libbrotli-dev libbz2-dev
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d
with:
key: ccache-release-linux-x64
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[package]
name = "wally"
# Must equal [product] version in versions.toml (scripts/ci/check-versions.py).
version = "0.8.3"
version = "0.8.5"
edition = "2021"
rust-version = "1.93"
license = "Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions Formula/wally.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
class Wally < Formula
desc "Run language, speech and image models on your own machine"
homepage "https://github.com/RunanywhereAI/wally"
version "0.8.3"
version "0.8.5"
license "MIT"

# macOS arm64 ships the Swift MLX host
# (llama.cpp + ONNX + Sherpa + MLX). Linux is not in this cut.
on_macos do
on_arm do
url "https://github.com/RunanywhereAI/wally/releases/download/v0.8.3/wally-0.8.3-macos-arm64.tar.gz"
# Placeholder -- the v0.8.3 release has not published a wally-named asset
url "https://github.com/RunanywhereAI/wally/releases/download/v0.8.5/wally-0.8.5-macos-arm64.tar.gz"
# Placeholder -- the v0.8.5 release has not published a wally-named asset
# yet. scripts/release/update-tap.sh re-stamps this from the real release
# checksum; a stale value here fails brew install's own hash check
# rather than installing something unverified.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## Install

On macOS with Apple Silicon (Intel Macs are not supported) and on Linux with
x86-64 or ARM64 and glibc 2.35 or newer (Ubuntu 22.04+, Debian 12+):
x86-64 or ARM64 and glibc 2.39 or newer (Ubuntu 24.04+, Debian 13+):

```bash
curl -fsSL https://raw.githubusercontent.com/RunanywhereAI/wally/main/install.sh | sh
Expand Down
39 changes: 14 additions & 25 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,32 +294,21 @@ fn link_native(build_env: &BTreeMap<String, String>) {
Ok("macos") | Ok("ios") => println!("cargo:rustc-link-arg=-lc++"),
Ok("linux") => {
println!("cargo:rustc-link-arg=-lstdc++");
// aarch64 only. Two unrelated needs, both because cargo drives the
// link with the C compiler and consumes -lc before the kit's static
// C++ archives:
// - those archives reference __stack_chk_guard (libc) and the
// compiler's outline-atomics helpers (libgcc); name both again
// after them. x86-64 reaches the stack guard through TLS and
// emits no outline atomics.
// - the aarch64 kit was built against zstd/brotli (its cpp-httplib
// server) and bz2 (libarchive), which x86-64 kits reference
// from none of their objects. Name them so the kit's symbols
// resolve; package-wally.sh bundles the runtime .so. They sit
// under the link's --as-needed, so a later kit built without
// these backends drops them with no DT_NEEDED.
// Kit 0.20.39's libarchive references bz2, and its Sherpa prebuilt
// references glibc 2.38 / GLIBCXX_3.4.32. Name the compression
// libraries; package-wally.sh bundles whichever the binary actually
// needs. --allow-shlib-undefined keeps a link on an older host from
// dying on Sherpa's versioned symbols. The bottle still only starts
// where those symbols exist (Ubuntu 24.04).
println!("cargo:rustc-link-arg=-Wl,--allow-shlib-undefined");
for lib in ["brotlienc", "brotlidec", "zstd", "bz2"] {
println!("cargo:rustc-link-arg=-l{lib}");
}
// aarch64 static archives reference __stack_chk_guard and the
// compiler's outline-atomics helpers. Name libc and libgcc again
// after the kit archives. x86-64 reaches the stack guard through
// TLS and emits no outline atomics.
if env::var("CARGO_CFG_TARGET_ARCH").as_deref() == Ok("aarch64") {
// The kit's arm64 Sherpa prebuilt is built against glibc 2.38 and
// GCC 13's libstdc++ (GLIBCXX_3.4.32), higher than the 22.04 build
// floor. Those symbols are present at runtime on every system the
// bottle supports (check-linux-abi.py [linux_abi_arm64] and
// install.sh both hold the 2.38 floor), so let the shared library
// carry its own undefined references instead of failing the link
// on a build host whose libc is older. This keeps wally's own code
// on the low floor; only the Sherpa .so asks for 2.38.
println!("cargo:rustc-link-arg=-Wl,--allow-shlib-undefined");
for lib in ["brotlienc", "brotlidec", "zstd", "bz2"] {
println!("cargo:rustc-link-arg=-l{lib}");
}
println!("cargo:rustc-link-arg=-lgcc");
println!("cargo:rustc-link-arg=-lc");
}
Expand Down
4 changes: 2 additions & 2 deletions docs/ENGINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ QHexRT on device also needs QAIRT matching the Hexagon skel (`QNN_SDK_ROOT` + `A

**Windows x64** (public zip): GGUF / ONNX / Sherpa. No MLX, no NeuRT, no QHexRT.

**Linux x86-64** (public tarball): llama.cpp + Sherpa + ONNX, same as Windows x64. Needs glibc 2.35 or newer.
**Linux x86-64** (public tarball): llama.cpp + Sherpa + ONNX, same as Windows x64. Needs glibc 2.39 or newer.

**Linux ARM64** (public tarball): llama.cpp + Sherpa + ONNX, same as Linux x86-64. Needs glibc 2.35 or newer.
**Linux ARM64** (public tarball): llama.cpp + Sherpa + ONNX, same as Linux x86-64. Needs glibc 2.39 or newer.

**Windows ARM64** (Snapdragon): public kit has no llama.cpp/ONNX/Sherpa. The QHexRT overlay runs Hexagon NPU models from a local `*_HNPU` tree. Do not expect `mlx-*`, GGUF, or `sd15` on that binary.

Expand Down
14 changes: 7 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ BIN_DIR="${HOME}/.local/bin"
# from the system rather than shipping. Both mirror versions.toml [linux_abi]
# (glibc_max, system_libraries); scripts/ci/check-versions.py fails when they
# drift. libc's own family is left out: glibc is checked by version above.
MIN_GLIBC="2.35"
MIN_GLIBC="2.39"
# The arm64 bottle has its own floor entry so the two arches can diverge again
# (mirrors versions.toml [linux_abi_arm64]; check-versions.py holds it). The
# arm64 case below swaps these in before check_linux_system runs. The
# system-library list is the same on both arches (the loader differs, but that
# is checked by the glibc version, not looked up here).
MIN_GLIBC_ARM64="2.35"
MIN_GLIBCXX_ARM64="3.4.30"
MIN_GLIBC_ARM64="2.39"
MIN_GLIBCXX_ARM64="3.4.32"
# What the refusals name as a system that qualifies.
DISTRO_HINT="Ubuntu 22.04+, Debian 12+ and other distributions from 2022 on"
MIN_GCC="12"
DISTRO_HINT="Ubuntu 24.04+, Debian 13+ and other distributions from 2024 on"
MIN_GCC="13"
LINUX_SYSTEM_LIBRARIES="libstdc++.so.6 libgcc_s.so.1 libssl.so.3 libcrypto.so.3 libcurl.so.4"

# The highest GLIBCXX_/CXXABI_ symbol version the bottle's own ELF files ask
Expand All @@ -52,7 +52,7 @@ LINUX_SYSTEM_LIBRARIES="libstdc++.so.6 libgcc_s.so.1 libssl.so.3 libcrypto.so.3
# catches a glibc-2.35 host whose libstdc++ is otherwise too old: v0.6.0's
# bottle needed GLIBCXX_3.4.32, which a stock 22.04 libstdc++ (3.4.30) does not
# have, and the installer downloaded before finding that out.
MIN_GLIBCXX="3.4.30"
MIN_GLIBCXX="3.4.32"
MIN_CXXABI="1.3.13"

# Retries cover a dropped connection or a 5xx from the CDN, which a first-time
Expand Down Expand Up @@ -107,7 +107,7 @@ check_linux_system() {
[ -e "$loader" ] && musl=1
done
if [ "$musl" -eq 1 ] && ! getconf GNU_LIBC_VERSION >/dev/null 2>&1; then
fail "Wally's Linux build needs glibc, and this system uses musl (Alpine and similar). Use a glibc distribution such as Ubuntu 22.04+ or Debian 12+."
fail "Wally's Linux build needs glibc, and this system uses musl (Alpine and similar). Use a glibc distribution such as Ubuntu 24.04+ or Debian 13+."
fi
glibc="$(getconf GNU_LIBC_VERSION 2>/dev/null | awk '{ print $2 }')"
if [ -z "$glibc" ]; then
Expand Down
5 changes: 2 additions & 3 deletions scripts/build/package-wally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ if [[ -n "${KIT}" && -d "${KIT}/third_party" ]]; then
mkdir -p "${STAGE}/licenses"
cp "${gomp_licence}" "${STAGE}/licenses/libgomp1.copyright"
fi
# The aarch64 kit is built against zstd + brotli (its cpp-httplib server)
# and bz2 (libarchive); an x86_64 kit references none, so this bundles
# only where they are real. Keyed on ldd, not readelf, so libbrotlicommon
# The kit is built against zstd + brotli (its cpp-httplib server) and bz2
# (libarchive). Keyed on ldd, not readelf, so libbrotlicommon
# -- pulled in behind libbrotli{enc,dec} rather than by wally directly --
# is shipped too. All three licences are permissive and travel with the
# library under the same $ORIGIN runpath as libgomp above.
Expand Down
7 changes: 4 additions & 3 deletions scripts/test/linux-install-matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ ARCHIVE="wally-${VERSION}-linux-x86_64.tar.gz"

# image | expectation | text the output must contain
CASES=(
"ubuntu:22.04|installs|wally ${VERSION}"
"ubuntu:24.04|installs|wally ${VERSION}"
"debian:12|installs|wally ${VERSION}"
"ubuntu:20.04|refused|needs glibc 2.35 or newer"
"debian:13|installs|wally ${VERSION}"
"ubuntu:22.04|refused|needs glibc 2.39 or newer"
"debian:12|refused|needs glibc 2.39 or newer"
"ubuntu:20.04|refused|needs glibc 2.39 or newer"
"alpine:3.20|refused|uses musl"
)

Expand Down
8 changes: 4 additions & 4 deletions scripts/test/test-install-libstdcxx-preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ chmod +x "$STUB/uname"

cat > "$STUB/getconf" <<'GETCONF'
#!/bin/sh
[ "$1" = "GNU_LIBC_VERSION" ] && echo "glibc 2.35"
[ "$1" = "GNU_LIBC_VERSION" ] && echo "glibc 2.39"
GETCONF
chmod +x "$STUB/getconf"

Expand Down Expand Up @@ -132,13 +132,13 @@ old_code="$(printf '%s\n' "$result_old" | head -1)"
old_body="$(printf '%s\n' "$result_old" | tail -n +2)"
check "an old libstdc++ is refused (exit 1)" "$([ "$old_code" = "1" ] && echo 1 || echo 0)"
check "the refusal names the required GLIBCXX floor" \
"$(printf '%s' "$old_body" | grep -qF 'GLIBCXX_3.4.30' && echo 1 || echo 0)"
"$(printf '%s' "$old_body" | grep -qF 'GLIBCXX_3.4.32' && echo 1 || echo 0)"
check "nothing was downloaded before the refusal" \
"$(printf '%s' "$old_body" | grep -qF Downloading && echo 0 || echo 1)"

# --- a libstdc++ at or above the floor is accepted and the install proceeds --
new="$WORK/new-libstdcxx.txt"
printf 'GLIBCXX_3.4.30\nCXXABI_1.3.13\nGLIBCXX_3.4.31\n' >"$new"
printf 'GLIBCXX_3.4.32\nCXXABI_1.3.13\n' >"$new"
home_new="$WORK/home-new"; mkdir -p "$home_new"
result_new="$(run "$home_new" "$new")"
new_code="$(printf '%s\n' "$result_new" | head -1)"
Expand Down Expand Up @@ -167,7 +167,7 @@ bg_code="$(printf '%s\n' "$result_bg" | head -1)"
bg_body="$(printf '%s\n' "$result_bg" | tail -n +2)"
check "a bottle library needing a newer glibc is refused (exit 1)" "$([ "$bg_code" = "1" ] && echo 1 || echo 0)"
check "the refusal names the file and both glibc versions" \
"$(printf '%s' "$bg_body" | grep -qF 'lib/libbundled.so.1 needs glibc 2.99; this system has 2.35' && echo 1 || echo 0)"
"$(printf '%s' "$bg_body" | grep -qF 'lib/libbundled.so.1 needs glibc 2.99; this system has 2.39' && echo 1 || echo 0)"
check "nothing was installed after that refusal" \
"$([ ! -e "$home_bg/.local/lib/wally" ] && [ ! -e "$home_bg/.local/bin/wally" ] && echo 1 || echo 0)"

Expand Down
Loading
Loading