Skip to content

npm run build:mac cannot package: ONNX Runtime 1.27.1 is built for macOS 14, the app's floor is 13 #591

Description

@EtienneLescot

npm run build:mac fails at pack time on macOS, and has to be worked around to produce a build at all.

Refusing to package binaries that demand a newer macOS than the 13.0 floor
the app claims to support.

  - libonnxruntime.dylib is built for macOS 14.0.0 (floor 13.0)

The three pieces:

  • scripts/fetch-onnxruntime.mjs:54 pins VERSION = "1.27.1".
  • Microsoft's onnxruntime-osx-arm64-1.27.1 reports minos 14.0 (otool -l | grep minos).
  • electron-builder.json5:123 declares "minimumSystemVersion": "13.0", and before-pack.cjs enforces it against every shipped binary.

The guard is right and should not be relaxed. Its own comment explains why, and cites #515: the deployment target decides which symbols the linker resolves against the OS rather than emitting locally, so a too-high floor strands users on the older OS with Symbol not found at dyld time — reported by users as something else entirely. A dylib built for 14 has no business in a package that claims 13.

This is not a warning today, it is a hard stop. I had to disarm the check locally to build the app at all, which is exactly the workaround the guard exists to prevent becoming habit.

Note the shipped 1.10.0 app carries no libonnxruntime.dylib at all, so this arrived with the segmentation work rather than being long-standing, and macOS CI evidently does not run electron-builder --mac.

Three ways out, in the order I would try them:

  1. An ONNX Runtime build with a 13.0 floor. fetch-onnxruntime.mjs:15 warns the version is not free to move — crates/Cargo.toml pins ort with an api-NN feature — so this is a question of finding the newest 1.2x whose macOS artefact is built for 13, not of picking any version.
  2. Raise mac.minimumSystemVersion to 14.0, and accept dropping macOS 13. That is a product decision, and it interacts with [[the STT floor]] — [Bug]: Not compatible with Monterey #515's history suggests it deserves care.
  3. Stop shipping ONNX Runtime on macOS and let Segmenter::load fail as it already does when the library is absent (the module compiles without the segmentation feature and both entries fail cleanly). That costs webcam segmentation on macOS, which is presumably not the intent.

Whichever is chosen, it is worth asking why CI is green: if no job runs electron-builder --mac, then no macOS packaging regression can be caught before someone tries to cut a release.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.status: pending releaseMerged change is waiting for a packaged desktop release.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions