-
Notifications
You must be signed in to change notification settings - Fork 6
fix: make desktop and iOS builds work without manual cargo config changes #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AnthonyRonning
wants to merge
1
commit into
master
Choose a base branch
from
fix/desktop-build-ort-compat
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+13
−20
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
ort-sys iOS ORT_LIB_LOCATION simulator ios-arm64 ios-arm64-simulator💡 Result:
This looks like the Rust
ort/ort-sysbuild script can’t find an ONNX Runtime static library slice that matches the iOS simulator ARM64 target.What
ORT_LIB_LOCATIONmust point to (forort-sys)ORT_LIB_LOCATIONmust be a directory that contains the compiled static ONNX Runtime libs (e.g.libonnxruntime.a, and the otherlibonnxruntime_*/libonnx.alibs), optionally inside aRelease/Debug/...subfolder;ort-syssearches those patterns when linking. (ort.pyke.io)The important target naming (Rust)
For Apple Silicon simulator you typically want:
aarch64-apple-iosaarch64-apple-ios-sim(doc.rust-lang.org)Why you’re hitting
ios-arm64-simulatorMany ONNX Runtime builds/packages only provide:
arm64The ONNX Runtime iOS build docs still describe simulator as x86_64. (onnxruntime.ai)
So if your ORT build output only includes x86_64-simulator libs, linking will fail when Cargo is building
aarch64-apple-ios-sim(Xcode slice name often shows up asios-arm64-simulator/ios-arm64_x86_64-simulator).Fix options
Build ONNX Runtime with an ARM64-simulator slice and set
ORT_LIB_LOCATIONto the folder containing the resulting.afiles for that slice.(If you build an Apple XCFramework, make sure it actually contains an arm64-simulator library slice; arm64 iPhone simulator support is possible in ORT’s iOS packaging. (newreleases.io))
Instead build/run the simulator as x86_64 (Rosetta) and compile your Rust target as
x86_64-apple-iosso it matches the simulator libs that ORT’s docs/build commonly produce. (onnxruntime.ai)If you paste the exact
ort-syserror text (the “could not find native static library …” line) and what files are inside yourORT_LIB_LOCATIONdirectory, I can tell you which specific library/slice it’s missing and what directory layoutort-sysis expecting.Citations:
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 2597
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 226
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 4024
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 47
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 361
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 6579
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 47
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 307
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 454
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 7367
🏁 Script executed:
Repository: OpenSecretCloud/Maple
Length of output: 47
Use
ios-arm64-simulatorslice for simulator development recipes.ios-devandios-dev-simcurrently point toios-arm64(the device slice). The xcframework includes a separateios-arm64-simulatorslice built specifically for simulator targets (viabuild-ios-onnxruntime-all.sh). Update both simulator recipes to use the correct slice:Required change
🤖 Prompt for AI Agents