-
Notifications
You must be signed in to change notification settings - Fork 583
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
Sherpa-Onnx xcFramework lacks support for Native visionOS Development #1946
Comments
We do provide vision os onnxruntime libs. Please see It should be straightforward to update Line 17 in c9d6859
to support vision os. Please describe in detail the difficulties you have. We don't have a mac with apple chips so we cannot test sherpa-onnx with vision os support. |
Hello! Thanks for the response. I truly appreciate it. I tried running my build script with the runtime you shared but still face the same issue. I've refactored the build script to be as close to the original and still generate the error. It's in this gist I'm using the following Toolchain If there's any information I can share, I'd be more than happy to help. This is a more detailed version of the error
|
Do you get the error within xcode or with |
With |
I suggest that you try the toolchain file from Remember to pass
or
to Please delete the folder |
Alas, I already tried that but it still results in the same error. This is how
|
From Is /onnxruntime-vision_os-xros_arm64-${onnxruntime_version} not for simulator? But you are using
Have you tried
Remember to delete build-ios before you re-try. |
Please see I appreciate if you can finish it and create a new PR so that future users can build sherpa-onnx for vision os directly. |
Thanks for the branch. I've spent some time on it and I've identified that the linker issue above was caused by However, I tried building a
Based on my research, this error code jrouwe/JoltPhysics#1261 (comment) Some have suggested disabling LTO should fix the issue. I tried adding the cmake flags to turn it off but that didn't work. I was able to workaround this by building for Xcode seems to have a few issues with the built framework though so I'm working on debugging that and will post an update on this Issue. I suspect that it's due to how I'm handling the Here's another thread that I've read regarding the bitcode issue |
Working build-vision-os.sh for visionOS Devices can be found on this fork https://github.com/carlosmbe/sherpa-onnx-vision-build/tree/vision-os Here is the gist of the .sh file https://gist.github.com/carlosmbe/3328dc72ec0cc32ce9fd8ec779d543e8 |
Thanks! By the way, libcargs can be deleted. You don't need it. |
Thanks for the info and all of the help! I've also added a script for building the simulator version of the script. A few things to note for using this vision build:
https://github.com/carlosmbe/sherpa-onnx-vision-build/blob/vision-os/build-vision-os-sim.sh |
It would be really nice if Sherpa-Onnx could support native VisionOS Development with SwiftUI. At the moment, the current Sherpa-Onnx.xcframework does not contain the binaries to build a native app with the VisionOS SDK. However, it does let you build an iPad app that runs on VisionOS.
I've tried to modify the source code to implement this.
I was able to update the
OnnxRuntime.xcframework
by using this branch of OnnxRuntime and adding the change suggested at the very bottom of this discussion.However, when running building Sherpa-Onnx for VisionOS, I ran into some challenges on the C side that are outside my scope. Specifically with the building.
Moreover, I had to update the toolchain to support VisionOS. This can be found in
./toolchains/ios.toolchain.cmake
an updated version should be at toolchains repo hereAfterwards, I modified the
build-ios.sh
script to build for both the VisionOS Device and Simulator. My script kept failing at the linking stage.Hopefully this context helps implement visionOS support later.
The text was updated successfully, but these errors were encountered: