Issues / #3403

#3403 [Other] macOS: ./setup.sh on a fresh checkout no longer installs cmake and ninja, the Metal build fails

open · @Flo5k5 · 0 commentaires · Sur GitHub

Setup & installModels & quantsDocumentationWindows

Description

### Area

[Other]  (anything else, including setup and installation)

### Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

### What happened

On a fresh source checkout on a Mac, `./setup.sh` stops at step 4 ("the Strata engine (Metal)"): CMake cannot run `ninja`. Step 3 still prints `numpy, jinja2, ..., cmake, ninja installed`, but neither is in `.venv`.

The cause looks like a242537 ("setup: split build helpers (cmake, ninja) out of the runtime requirements"). It moved `cmake` and `ninja` to `requirements-build.txt` and made `setup.py`'s `cmake_build()` install the missing ones before a compile, but `metal/setup_mac.py` (which `setup.py` hands a macOS run to) was not changed:

- step 3 still installs `requirements.txt` only, while its comment and message say cmake and ninja come with it (`metal/setup_mac.py`, lines 419-421 on 9ae93f7);
- `build_engine()` and `build_vision()` call `tool("cmake")` / `tool("ninja")`, which fall back to the bare name when neither `.venv` nor `PATH` has the tool.

`docs/MAC.md` (step 3) and the module docstring still say "CMake and Ninja come from pip". An older `.venv` keeps the helpers it already had, so this only shows on a new install.

`.venv/bin/python -m pip install -r requirements-build.txt`, then `./setup.sh` again, works around it.

### Smallest steps or command that reproduce it

On a Mac without `ninja` on `PATH` (here `cmake` came from Homebrew):

```sh
git clone https://github.com/Niko1221/Strata && cd Strata   # 9ae93f7
./setup.sh --update --yes
```

### Reproduction status

Reproduced locally

### Strata version

`main` at 9ae93f7 (first seen on 3d1fb48, 0.2.0-beta)

### Graphics card, memory and system

Apple M5 Pro, 64 GB unified memory, macOS 27.0.1

### Model, size and settings

Not relevant: the failure is before the model download (Q2_0 was the recommended choice).

### Logs

`build-metal/build.log`:

```
CMake Error at CMakeLists.txt:14 (project):
  Running

   'ninja' '--version'

  failed with:

   no such file or directory


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_OBJCXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
```

A fix that installs the helpers before a compile, as `cmake_build()` does, follows in a pull request.

Sur le site

Liens install, modèles, releases.