[PR #4986] [Engine] macOS builds target macOS 15.0, and the packager refuses a Mac binary that needs a newer macOS (#4634) #5277

Open
opened 2026-11-07 16:34:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4986
Author: @hotocoo
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix-mac-minos


📝 Commits (1)

  • 6d4370d [Engine] macOS builds target macOS 15.0, and the packager refuses a Mac binary that needs a newer macOS (#4634)

📊 Changes

5 files changed (+97 additions, -4 deletions)

View changed files

📝 metal/CMakeLists.txt (+1 -0)
📝 packaging/binary_deps.py (+38 -4)
📝 packaging/package_engine.py (+17 -0)
📝 tests/terminal/test_engine_deps.py (+40 -0)
📝 tools/vision/CMakeLists.txt (+1 -0)

📄 Description

Problem and result

Every macOS release binary is built for macOS 27.0, but the app says it runs on macOS 15.0 (minimumSystemVersion in apps/desktop/src-tauri/tauri.conf.json). Nothing in metal/ or tools/vision/ sets a deployment target, so the binaries take the SDK version of the Mac that builds them. #4634 found this in feed 116 (0.1.52 / 0.1.53). The current feed still has it. I downloaded feed 118 (0.1.55) and checked the binaries with vtool -show-build:

Package Binary minos sdk
strata-engine-0.1.55-macos-arm64-metal strata 27.0 27.0
strata-engine-0.1.55-macos-arm64-metal strata-vision 27.0 27.0
strata-dsv41-0.1.55-macos-arm64-metal strata-dsv41 27.0 27.0

On macOS 15 the picture reader stops in dyld before main() (Symbol not found: _posix_spawn_file_actions_addchdir). This is the reason: llama.cpp's vendor/sheredom/subprocess.h uses the POSIX name posix_spawn_file_actions_addchdir (macOS 26+) when MAC_OS_X_VERSION_MIN_REQUIRED >= 260000. Otherwise it uses posix_spawn_file_actions_addchdir_np (macOS 10.15+). With minos 27.0 it picks the macOS 26 symbol.

After this change:

  • metal/ (the engine strata and strata_ds4) and tools/vision/ (strata-vision) build for macOS 15.0 unless -DCMAKE_OSX_DEPLOYMENT_TARGET is given. strata-vision now imports _posix_spawn_file_actions_addchdir_np.
  • packaging/package_engine.py refuses to build or --verify a macOS package if any Mach-O in it needs a newer macOS than 15.0. The error names each file and its minos. A release cannot ship this again without a warning.

#4634. There is no maintainer reply there yet, only the bot's note about the title. This changes a build default (the deployment target), so I am opening it as a draft. If you prefer, I can split it: the packager check alone here, and the CMake default as a follow-up.

Approach

  • set(CMAKE_OSX_DEPLOYMENT_TARGET "15.0" CACHE STRING ...) before project() in both CMake projects. It is a cache variable, so -D still overrides it. CMake ignores it on non-Apple platforms.
  • binary_deps.py already reads Mach-O load commands for the dylib check. This PR shares that walk (_macho_commands) and adds macho_min_os (LC_BUILD_VERSION / LC_VERSION_MIN_MACOSX) and too_new_for_mac. It reads the files directly with no tools, so packaging on a PC still works.
  • MAC_MIN_OS = (15, 0) in binary_deps.py. A test checks that it matches tauri.conf.json and both CMake files, so they cannot drift apart.

Validation

Revision: this branch on main c62d5e3a. Mac: Apple Silicon, macOS 26.5 (25F71), Xcode CLT SDK 26.5.

Passed:

  • Default builds with no deployment-target flag: cmake -S metal -B md -G Ninja -DCMAKE_BUILD_TYPE=Release -DMETAL_CPP_DIR=... -DSTRATA_GGML_DIR=... && ninja -C md strata strata_ds4, and packaging/build_vision_mac.sh --llama third_party/llama.cpp --out vd. vtool -show-build gives minos 15.0 for strata, strata_ds4 and strata-vision. The builds gave 0 -Wunguarded-availability warnings. build_vision_mac.sh's own check passed (only /usr/lib and /System/Library links), and strata-vision --version runs.
  • nm -u vd/strata-vision | grep addchdir gives _posix_spawn_file_actions_addchdir_np. On 0.1.55 it is _posix_spawn_file_actions_addchdir.
  • A/B on the same source, built for 15.0 and for 26.5 (-DCMAKE_OSX_DEPLOYMENT_TARGET=26.5), with Qwen3.8-Flash-Next IQ3_S: strata --pack <iq3_s pack> --native <shard1> --ple-gguf <shard2> --expert-profile data/expert-profile.bin --expert-cache 64 --mmap-experts --max-context 4096 --spec 2 --prefill auto --max-new 32 --tokens "785,6722,315,9625,374". Both builds gave the same 32 greedy tokens. The prompt IDs were arbitrary, so this shows only that both builds give the same output, not that the output is good.
  • python packaging/package_engine.py --verify <folder> on the real 0.1.55 packages from feed 118 now refuses them: strata (macOS 27.0), strata-vision (macOS 27.0) for the engine and strata-dsv41 (macOS 27.0) for DeepSeek.
  • python -m unittest tests.terminal.test_engine_deps: 13 ran, OK, 3 skipped (the existing Windows/ELF-only tests). The 4 new MacMinimumOs tests failed before the change and pass after it.

Failed:

  • python -m unittest tests.terminal.test_engine_manifest tests.terminal.test_picture_reader_package tests.terminal.test_dsv41_engine tests.terminal.test_sycl_package: 3 failures and 6 errors (test_engine_manifest.Start.*, test_dsv41_engine.HipPackageLibraryPath.test_rocm_bin_comes_after_the_package_folder). Unmodified main c62d5e3a gives the same set in this environment, so this PR did not cause them.

Not run:

  • macOS 15. This is the check that matters, and I could not do it: I have no macOS 15 machine. The 15.0 build proves the C and libSystem symbols are clean, which covers the reported dyld abort. It does not prove the Metal calls are clean. metal-cpp is header-only selector dispatch with no availability attributes, so a Metal API that needs macOS 26 would compile and link without a warning, then fail at run time on 15. I am asking in #4634 for a run on macOS 15 (the reporter has an M2 Max on 15.7.8).
  • CUDA, HIP and SYCL builds of tools/vision. The new line only sets a CMake variable that non-Apple platforms ignore, but I did not build them.
  • The signed and notarised package flow (packaging/mac/sign-and-notarize.sh).

Limits

  • An existing build folder keeps its cached CMAKE_OSX_DEPLOYMENT_TARGET (empty) until you reconfigure it or start a fresh folder. The packager check catches a release built from a stale folder.
  • #4634 also reports the Qwen engine exiting with code 1 while it loads. nm -u on the 0.1.55 strata shows no symbol that needs macOS 26, so that exit may come from the engine starting the picture reader. This is plausible but unconfirmed.
  • The floor is 15.0 because the app says 15.0. Lowering it is a separate decision.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4986 **Author:** [@hotocoo](https://github.com/hotocoo) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-mac-minos` --- ### 📝 Commits (1) - [`6d4370d`](https://github.com/Niko1221/Strata/commit/6d4370d7fa8e141501c4824a95c15bbb56abb74e) [Engine] macOS builds target macOS 15.0, and the packager refuses a Mac binary that needs a newer macOS (#4634) ### 📊 Changes **5 files changed** (+97 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `metal/CMakeLists.txt` (+1 -0) 📝 `packaging/binary_deps.py` (+38 -4) 📝 `packaging/package_engine.py` (+17 -0) 📝 `tests/terminal/test_engine_deps.py` (+40 -0) 📝 `tools/vision/CMakeLists.txt` (+1 -0) </details> ### 📄 Description ## Problem and result Every macOS release binary is built for macOS 27.0, but the app says it runs on macOS 15.0 (`minimumSystemVersion` in `apps/desktop/src-tauri/tauri.conf.json`). Nothing in `metal/` or `tools/vision/` sets a deployment target, so the binaries take the SDK version of the Mac that builds them. #4634 found this in feed 116 (0.1.52 / 0.1.53). The current feed still has it. I downloaded feed 118 (0.1.55) and checked the binaries with `vtool -show-build`: | Package | Binary | minos | sdk | |---|---|---|---| | strata-engine-0.1.55-macos-arm64-metal | strata | 27.0 | 27.0 | | strata-engine-0.1.55-macos-arm64-metal | strata-vision | 27.0 | 27.0 | | strata-dsv41-0.1.55-macos-arm64-metal | strata-dsv41 | 27.0 | 27.0 | On macOS 15 the picture reader stops in dyld before `main()` (`Symbol not found: _posix_spawn_file_actions_addchdir`). This is the reason: llama.cpp's `vendor/sheredom/subprocess.h` uses the POSIX name `posix_spawn_file_actions_addchdir` (macOS 26+) when `MAC_OS_X_VERSION_MIN_REQUIRED >= 260000`. Otherwise it uses `posix_spawn_file_actions_addchdir_np` (macOS 10.15+). With minos 27.0 it picks the macOS 26 symbol. After this change: - `metal/` (the engine `strata` and `strata_ds4`) and `tools/vision/` (`strata-vision`) build for macOS 15.0 unless `-DCMAKE_OSX_DEPLOYMENT_TARGET` is given. `strata-vision` now imports `_posix_spawn_file_actions_addchdir_np`. - `packaging/package_engine.py` refuses to build or `--verify` a macOS package if any Mach-O in it needs a newer macOS than 15.0. The error names each file and its minos. A release cannot ship this again without a warning. ## Related discussion #4634. There is no maintainer reply there yet, only the bot's note about the title. This changes a build default (the deployment target), so I am opening it as a draft. If you prefer, I can split it: the packager check alone here, and the CMake default as a follow-up. ## Approach - `set(CMAKE_OSX_DEPLOYMENT_TARGET "15.0" CACHE STRING ...)` before `project()` in both CMake projects. It is a cache variable, so `-D` still overrides it. CMake ignores it on non-Apple platforms. - `binary_deps.py` already reads Mach-O load commands for the dylib check. This PR shares that walk (`_macho_commands`) and adds `macho_min_os` (`LC_BUILD_VERSION` / `LC_VERSION_MIN_MACOSX`) and `too_new_for_mac`. It reads the files directly with no tools, so packaging on a PC still works. - `MAC_MIN_OS = (15, 0)` in `binary_deps.py`. A test checks that it matches `tauri.conf.json` and both CMake files, so they cannot drift apart. ## Validation Revision: this branch on `main` `c62d5e3a`. Mac: Apple Silicon, macOS 26.5 (25F71), Xcode CLT SDK 26.5. **Passed:** - Default builds with no deployment-target flag: `cmake -S metal -B md -G Ninja -DCMAKE_BUILD_TYPE=Release -DMETAL_CPP_DIR=... -DSTRATA_GGML_DIR=... && ninja -C md strata strata_ds4`, and `packaging/build_vision_mac.sh --llama third_party/llama.cpp --out vd`. `vtool -show-build` gives `minos 15.0` for `strata`, `strata_ds4` and `strata-vision`. The builds gave 0 `-Wunguarded-availability` warnings. `build_vision_mac.sh`'s own check passed (only `/usr/lib` and `/System/Library` links), and `strata-vision --version` runs. - `nm -u vd/strata-vision | grep addchdir` gives `_posix_spawn_file_actions_addchdir_np`. On 0.1.55 it is `_posix_spawn_file_actions_addchdir`. - A/B on the same source, built for 15.0 and for 26.5 (`-DCMAKE_OSX_DEPLOYMENT_TARGET=26.5`), with Qwen3.8-Flash-Next IQ3_S: `strata --pack <iq3_s pack> --native <shard1> --ple-gguf <shard2> --expert-profile data/expert-profile.bin --expert-cache 64 --mmap-experts --max-context 4096 --spec 2 --prefill auto --max-new 32 --tokens "785,6722,315,9625,374"`. Both builds gave the same 32 greedy tokens. The prompt IDs were arbitrary, so this shows only that both builds give the same output, not that the output is good. - `python packaging/package_engine.py --verify <folder>` on the real 0.1.55 packages from feed 118 now refuses them: `strata (macOS 27.0), strata-vision (macOS 27.0)` for the engine and `strata-dsv41 (macOS 27.0)` for DeepSeek. - `python -m unittest tests.terminal.test_engine_deps`: 13 ran, OK, 3 skipped (the existing Windows/ELF-only tests). The 4 new `MacMinimumOs` tests failed before the change and pass after it. **Failed:** - `python -m unittest tests.terminal.test_engine_manifest tests.terminal.test_picture_reader_package tests.terminal.test_dsv41_engine tests.terminal.test_sycl_package`: 3 failures and 6 errors (`test_engine_manifest.Start.*`, `test_dsv41_engine.HipPackageLibraryPath.test_rocm_bin_comes_after_the_package_folder`). Unmodified `main` `c62d5e3a` gives the same set in this environment, so this PR did not cause them. **Not run:** - **macOS 15. This is the check that matters, and I could not do it: I have no macOS 15 machine.** The 15.0 build proves the C and libSystem symbols are clean, which covers the reported dyld abort. It does not prove the Metal calls are clean. metal-cpp is header-only selector dispatch with no availability attributes, so a Metal API that needs macOS 26 would compile and link without a warning, then fail at run time on 15. I am asking in #4634 for a run on macOS 15 (the reporter has an M2 Max on 15.7.8). - CUDA, HIP and SYCL builds of `tools/vision`. The new line only sets a CMake variable that non-Apple platforms ignore, but I did not build them. - The signed and notarised package flow (`packaging/mac/sign-and-notarize.sh`). ## Limits - An existing build folder keeps its cached `CMAKE_OSX_DEPLOYMENT_TARGET` (empty) until you reconfigure it or start a fresh folder. The packager check catches a release built from a stale folder. - #4634 also reports the Qwen engine exiting with code 1 while it loads. `nm -u` on the 0.1.55 `strata` shows no symbol that needs macOS 26, so that exit may come from the engine starting the picture reader. This is plausible but unconfirmed. - The floor is 15.0 because the app says 15.0. Lowering it is a separate decision. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5277
No description provided.