Skip to content

Build fails for .NET 9 iOS project using Microsoft.CognitiveServices.Speech: linker error, undefined native symbols for arm64 #2939

@ivoryguard

Description

@ivoryguard

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

  1. Create an Avalonia cross-platform project (or maybe .net 9 MAUI project) targeting .NET 9 in Visual Studio 2022.
  2. Reference Microsoft.CognitiveServices.Speech NuGet package version 1.46.0.
  3. Add some code using Microsoft.CognitiveServices.Speech in the shared project.
  4. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions