From 1237cd4d84c84682ff2fa5528a5f8fd70abbca74 Mon Sep 17 00:00:00 2001 From: oobabooga Date: Tue, 23 Jun 2026 20:38:15 -0300 Subject: [PATCH] Installer: don't require cmake/Homebrew on macOS (prebuilt llama.cpp) (#6617) --- install.sh | 60 ++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/install.sh b/install.sh index 62cc2920e..5038de626 100755 --- a/install.sh +++ b/install.sh @@ -1534,17 +1534,15 @@ _maybe_reroute_strixhalo_to_2404() { _maybe_reroute_strixhalo_to_2404 || true # ── Check system dependencies ── -# cmake and git are needed by unsloth studio setup to build the GGUF inference -# engine (llama.cpp). build-essential and libcurl-dev are also needed on Linux. +# cmake/git are only needed to *build* llama.cpp from source. Studio downloads a +# prebuilt by default, and setup.sh self-skips the source build when they're +# absent -- so macOS doesn't block on cmake (requiring it would force a manual +# Homebrew install). Linux keeps requiring them; its package manager has them. tauri_log "STEP" "Checking system dependencies" -MISSING="" - -command -v cmake >/dev/null 2>&1 || MISSING="$MISSING cmake" -command -v git >/dev/null 2>&1 || MISSING="$MISSING git" case "$OS" in macos) - # Xcode Command Line Tools provide the C/C++ compiler + # Xcode Command Line Tools provide the C/C++ compiler and git. if ! xcode-select -p >/dev/null 2>&1; then echo "" echo "==> Xcode Command Line Tools are required." @@ -1553,8 +1551,19 @@ case "$OS" in echo " After the installation completes, please re-run this script." exit 1 fi + # cmake is only needed for a source build; the default prebuilt path + # doesn't use it, so its absence is not fatal -- no Homebrew prerequisite. + if command -v cmake >/dev/null 2>&1; then + step "deps" "all system dependencies found" + else + step "deps" "using prebuilt llama.cpp (cmake not found)" "$C_WARN" + substep "Install cmake only if you want a source build: brew install cmake" + fi ;; linux|wsl) + MISSING="" + command -v cmake >/dev/null 2>&1 || MISSING="$MISSING cmake" + command -v git >/dev/null 2>&1 || MISSING="$MISSING git" # curl or wget is needed for downloads; check both if ! command -v curl >/dev/null 2>&1 && ! command -v wget >/dev/null 2>&1; then MISSING="$MISSING curl" @@ -1562,27 +1571,12 @@ case "$OS" in command -v gcc >/dev/null 2>&1 || MISSING="$MISSING build-essential" # libcurl dev headers for llama.cpp HTTPS support command -v curl-config >/dev/null 2>&1 || MISSING="$MISSING libcurl4-openssl-dev" - ;; -esac -MISSING=$(echo "$MISSING" | sed 's/^ *//') - -if [ -n "$MISSING" ]; then - echo "" - step "deps" "missing: $MISSING" "$C_WARN" - substep "These are needed to build the GGUF inference engine." - - case "$OS" in - macos) - if ! command -v brew >/dev/null 2>&1; then - echo "" - echo " Homebrew is required to install them." - echo " Install Homebrew from https://brew.sh then re-run this script." - exit 1 - fi - brew install $MISSING /dev/null 2>&1; then _smart_apt_install $MISSING else @@ -1597,12 +1591,12 @@ if [ -n "$MISSING" ]; then echo " openSUSE: sudo zypper install cmake git gcc gcc-c++ make libcurl-devel" exit 1 fi - ;; - esac - echo "" -else - step "deps" "all system dependencies found" -fi + echo "" + else + step "deps" "all system dependencies found" + fi + ;; +esac # ── Install uv ── tauri_log "STEP" "Installing uv package manager"