-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Mobile] Maui with ONNX Runtime does not compile for IOS #22661
Comments
I'm getting the same errors in my app having updated to MacOS 15.1, Xcode 16 and dotnet 8.0.403. The app is not using maui but a native net8.0-ios app. |
@ben-dean have you updated the onnx runtime after the Mac update? |
Yes, I have updated to the latest versions.
I have also tried rolling back to 1.19.2 which was previously working fine for me with no luck. |
onnxruntime.xcframework.zip has an xcframework for multiple different platforms (iOS arm64, iOS simulator x64/arm64, mac-catalyst x64/arm64) and the mac-catalyst ones require the use of symlinks. As symlinks aren't supported by nuget on Windows we have to create a zip. I would have expected the MAUI build infrastructure to expand the zip and use the xcframework within it. if that happened clang++ should be linking against the Short term while we look into it you could try extracting the onnxruntime.xcframework from the zip and adding a NativeReference to that. I'd suggest copying the settings from the nuget package targets file <ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
<NativeReference Include="<extracted>\onnxruntime.xcframework">
<Kind>Static</Kind>
<IsCxx>True</IsCxx>
<SmartLink>True</SmartLink>
<ForceLoad>True</ForceLoad>
<LinkerFlags>-lc++</LinkerFlags>
<WeakFrameworks>CoreML</WeakFrameworks>
</NativeReference>
</ItemGroup> |
This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details. |
@skottmckay any updates on this issue? |
This should fix the issue: dotnet/macios#21492 But it's unclear how it was working originally. I still have the test setup from when I added usage of the zipped xcframework and that builds happily. |
Do you happen to know the appropriate path to get the new |
How you did you resolve it, Can you please explain it here or you can also provide some links for guidance to resolve it. I appreciate your prompt response. |
Describe the issue
I have a mobile application that uses OnnxRuntime to try to generate a new image. The application works on Android and Windows, but I cannot compile it for and on IOS/macOS.
I am using the Vs2022 with remote build on Mac ( INterl based but running Sequoia)
I am getting the error :
Severity Code Description Project File Line Suppression State Error (active) clang++ exited with code 1: ld: library 'C:/Users/<user>/.nuget/packages/microsoft.ml.onnxruntime/1.19.2/buildTransitive/net8.0-ios15.4/../../runtimes/ios/native/onnxruntime.xcframework.zip' not found clang++: error: linker command failed with exit code 1 (use -v to see invocation) Functional.Silhouettist.Mobile (net8.0-ios) C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk.net8.0_18.0\18.0.8303\targets\Xamarin.Shared.Sdk.targets 1643
I have tried to add a native library, but it makes no difference.
<NativeReference
Include="dep\onnxruntime.xcframework.zip" Kind="Framework" />`
To reproduce
or use the repo: https://github.com/Assassyn/maui_onnx_ios_fail
Urgency
I need it to release the application
Platform
iOS
OS Version
17.5 and 18
ONNX Runtime Installation
Released Package
Compiler Version (if 'Built from Source')
No response
Package Name (if 'Released Package')
None
ONNX Runtime Version or Commit ID
1.19.2 but 1.18 was not working as well
ONNX Runtime API
C#
Architecture
X64
Execution Provider
Other / Unknown
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: