feat(xberg): build Intel macOS with ort-dynamic + onnxruntime#6
Merged
Merged
Conversation
Intel Macs have no static ONNX Runtime prebuilt (ort dropped x86_64-apple-darwin in v2.0.0-rc.11; Microsoft dropped onnxruntime-osx-x86_64 after 1.23), so the x86_64 build uses ort's load-dynamic strategy: build with the ort-dynamic feature, depend on the onnxruntime formula, and point ORT_DYLIB_PATH at its dylib via an env wrapper. arm64 macOS and Linux are unchanged.
tobocop2
added a commit
to tobocop2/kreuzberg
that referenced
this pull request
Jul 2, 2026
Pairs with the tap formula change (xberg-io/homebrew-tap#6) that builds x86_64 with ort-dynamic + depends_on onnxruntime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
xbergformula builds with the default (statically-linked) ONNX Runtime feature set, which has nox86_64-apple-darwinprebuilt —ortdropped it in v2.0.0-rc.11 and Microsoft stopped shippingonnxruntime-osx-x86_64after 1.23. So there is no Intel-macOS bottle: the build simply can't link ONNX Runtime on that target.Solution
On Intel macOS only, build with
ort's load-dynamic strategy (--features …,ort-dynamic), add a runtime dependency on theonnxruntimeformula (Homebrew's x86_64 build is 1.27, which satisfies ort's ≥1.24 check), and wrap the binary with an env script that pointsORT_DYLIB_PATHat the Homebrewlibonnxruntime.dylib— because ortdlopens it at runtime rather than linking it.arm64 macOS and Linux take the unchanged
elsebranch (static ONNX Runtime, no new dependency), so their bottles are byte-identical to today.Pairs with xberg-io/xberg#1194, which adds the
ort-dynamicfeature and themacos-15-intelbottle matrix row. Because the formula buildsx86_64withort-dynamic, that xberg change needs to land first for a release to build the Intel bottle.Verification
ruby -candbrew style(only the repo's pre-existing single-quote style notes) are clean. The runtime mechanism — Homebrew's x86_64onnxruntimeloaded byort's load-dynamic path — was proven end to end on amacos-15-intelrunner in the paired PR: acargo-builtort-dynamicCLI installs the Homebrewonnxruntimeand runs real ONNX inference against it (evidence; a follow-up run re-proves the sameort-dynamicload path with the packaged CLI bundle: run 28633177260). The formula wires that same dylib viaORT_DYLIB_PATH; full bottle verification runs when the paired xberg PR merges and a release builds the Intel bottle.