-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Build fails for .NET 9 iOS project using Microsoft.CognitiveServices.Speech 1.46.0: linker error, undefined native symbols for arm64
Environment
- Visual Studio 2022 17.14.16
- Avalonia iOS project targeting .NET 9
- macOS 15.7 with Xcode 16.4
- Microsoft.CognitiveServices.Speech NuGet package version 1.46.0 referenced
Issue
When building the .NET 9 iOS project that references Microsoft.CognitiveServices.Speech version 1.46.0, the build fails at the linking stage with the following error:
clang++ exited with code 1:
Undefined symbols for architecture arm64:
"Microsoft::CognitiveServices::Speech::Impl::CSpxBindingBasedHttpResponse::SignalOnDataCallback(unsigned char const*, unsigned long)", referenced from:
_process_streaming_data in libMicrosoft.CognitiveServices.Speech.core.a(binding_helpers.cpp.o)
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Steps to Reproduce
- Create an Avalonia cross-platform project (or maybe .net 9 MAUI project) targeting .NET 9 in Visual Studio 2022.
- Reference Microsoft.CognitiveServices.Speech NuGet package version 1.46.0.
- Add some code using Microsoft.CognitiveServices.Speech in the shared project.
- Build the iOS project using Xcode 16.4.
What I Tried
- Added AudioToolboxframeworks via mtouch arguments.
<MtouchExtraArgs>-gcc_flags="-framework AudioToolbox"</MtouchExtraArgs>
- Set Linker Behavior to "Don't Link" and "Link Framework SDKs Only", but error persists.
- Confirmed the Android project build with same package succeeds, only iOS fails.
Expected Behavior
The project should successfully build and link all required native symbols.
Actual Behavior
Build fails due to missing native symbol for arm64.
Additional Info
It appears the native static library in the Speech SDK package may not include the required arm64 symbols or there is a compatibility issue between version 1.46.0 of the package and .NET 9 iOS build environment.
Is .NET 9 iOS fully supported by Microsoft.CognitiveServices.Speech 1.46.0? Are there updated versions or workarounds for this linker issue?