ld: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5184.

System:
    OS: macOS 15.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 82.02 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh`
 IDEs:
    Xcode: 16.1/16B40 - /usr/bin/xcodebuild
  Managers:
    CocoaPods: 1.15.2 - /Users/liuxiwei/.rvm/gems/ruby-3.3.5/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 24.1, iOS 18.1, macOS 15.1, tvOS 18.1, visionOS 2.1, watchOS 11.1
    Android SDK: Not Found

i use react-native to build ios app . when archive than it happens:

ld: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5184.
Answered by DTS Engineer in 844346022

Let's consolidate this thread with another one about the same assertion.

— Ed Ford,  DTS Engineer

1  0x104a5ed40  ld::tool::SymbolTableAtom<x86_64>::classicOrdinalForProxy(ld::Atom const*) (.cold.3) + 0
2  0x104954990  ld::tool::SymbolTableAtom<x86_64>::classicOrdinalForProxy(ld::Atom const*) + 176
3  0x104956430  ld::tool::SymbolTableAtom<arm64>::addImport(ld::Atom const*, ld::tool::StringPoolAtom*) + 204
4  0x10495b1d8  ld::tool::SymbolTableAtom<arm64>::encode() + 436
5  0x1049483bc  ___ZN2ld4tool10OutputFile20buildLINKEDITContentERNS_8InternalE_block_invoke.413 + 36
6  0x18d87eb2c  _dispatch_call_block_and_release + 32
7  0x18d89885c  _dispatch_client_callout + 16
8  0x18d8b54a4  _dispatch_channel_invoke.cold.5 + 92
9  0x18d890fa4  _dispatch_root_queue_drain + 736
10  0x18d8915d4  _dispatch_worker_thread2 + 156
11  0x18da32e28  _pthread_wqthread + 232
A linker snapshot was created at:
	/tmp/newgafc-2025-06-17-145748.ld-snapshot
Accepted Answer

Let's consolidate this thread with another one about the same assertion.

— Ed Ford,  DTS Engineer

ld: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5184.
 
 
Q