mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5277
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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 (
minimumSystemVersioninapps/desktop/src-tauri/tauri.conf.json). Nothing inmetal/ortools/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 withvtool -show-build: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'svendor/sheredom/subprocess.huses the POSIX nameposix_spawn_file_actions_addchdir(macOS 26+) whenMAC_OS_X_VERSION_MIN_REQUIRED >= 260000. Otherwise it usesposix_spawn_file_actions_addchdir_np(macOS 10.15+). With minos 27.0 it picks the macOS 26 symbol.After this change:
metal/(the enginestrataandstrata_ds4) andtools/vision/(strata-vision) build for macOS 15.0 unless-DCMAKE_OSX_DEPLOYMENT_TARGETis given.strata-visionnow imports_posix_spawn_file_actions_addchdir_np.packaging/package_engine.pyrefuses to build or--verifya 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 ...)beforeproject()in both CMake projects. It is a cache variable, so-Dstill overrides it. CMake ignores it on non-Apple platforms.binary_deps.pyalready reads Mach-O load commands for the dylib check. This PR shares that walk (_macho_commands) and addsmacho_min_os(LC_BUILD_VERSION/LC_VERSION_MIN_MACOSX) andtoo_new_for_mac. It reads the files directly with no tools, so packaging on a PC still works.MAC_MIN_OS = (15, 0)inbinary_deps.py. A test checks that it matchestauri.conf.jsonand both CMake files, so they cannot drift apart.Validation
Revision: this branch on
mainc62d5e3a. Mac: Apple Silicon, macOS 26.5 (25F71), Xcode CLT SDK 26.5.Passed:
cmake -S metal -B md -G Ninja -DCMAKE_BUILD_TYPE=Release -DMETAL_CPP_DIR=... -DSTRATA_GGML_DIR=... && ninja -C md strata strata_ds4, andpackaging/build_vision_mac.sh --llama third_party/llama.cpp --out vd.vtool -show-buildgivesminos 15.0forstrata,strata_ds4andstrata-vision. The builds gave 0-Wunguarded-availabilitywarnings.build_vision_mac.sh's own check passed (only/usr/liband/System/Librarylinks), andstrata-vision --versionruns.nm -u vd/strata-vision | grep addchdirgives_posix_spawn_file_actions_addchdir_np. On 0.1.55 it is_posix_spawn_file_actions_addchdir.-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 andstrata-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 newMacMinimumOstests 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). Unmodifiedmainc62d5e3agives the same set in this environment, so this PR did not cause them.Not run:
tools/vision. The new line only sets a CMake variable that non-Apple platforms ignore, but I did not build them.packaging/mac/sign-and-notarize.sh).Limits
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.nm -uon the 0.1.55stratashows no symbol that needs macOS 26, so that exit may come from the engine starting the picture reader. This is plausible but unconfirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.