firebase / firebase/firebase-ios-sdk
FirebaseAnalytics build error with -ld_classic, -ObjC and iOS 17.6 on Xcode 26 Beta
- Dominant language
- C++
- Stars
- 6.7k
- Forks
- 1.8k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 72
Description
### Description
FirebaseAnalytics fails to build when using -ld_classic, -ObjC and setting Minimum Deployment to iOS 17.6 or older on Xcode 26.0 beta 7 (17A5305k)
I've created a sample project where I just added the Firebase Analytics Package using SPM and the two linker flags https://github.com/tiagomartinho/firebase_analytics_ld_classic_issue
### Reproducing the issue
1. Add FirebaseAnalytics
2. Add -ld_classic and -ObjC in OTHER_LDFLAGS in the build settings
3. Set the Minimum Deployment to iOS 17.6 or older
4. Build the project
### Firebase SDK Version
12.2.0
### Xcode Version
26.0 beta 7 (17A5305k)
### Installation Method
Swift Package Manager
### Firebase Product(s)
Analytics
### Targeted Platforms
iOS
### Relevant Log Output
```shell
0 0x100a1d788 __assert_rtn + 160
1 0x100a20570 ld::tool::SymbolTableAtom::classicOrdinalForProxy(ld::Atom const*) (.cold.3) + 0
2 0x100957db0 ld::tool::SymbolTableAtom::classicOrdinalForProxy(ld::Atom const*) + 172
3 0x100958c24 ld::tool::SymbolTableAtom::addImport(ld::Atom const*, ld::tool::StringPoolAtom*) + 140
4 0x10095a508 ld::tool::SymbolTableAtom::encode() + 396
5 0x10094c3b0 ___ZN2ld4tool10OutputFile20buildLINKEDITContentERNS_8InternalE_block_invoke.413 + 36
6 0x18ff6fb2c _dispatch_call_block_and_release + 32
7 0x18ff8985c _dispatch_client_callout + 16
8 0x18ffa64cc _dispatch_channel_invoke.cold.5 + 92
9 0x18ff81fa4 _dispatch_root_queue_drain + 736
10 0x18ff825d4 _dispatch_worker_thread2 + 156
11 0x190123e28 _pthread_wqthread + 232
A linker snapshot was created at:
/tmp/firebase_analytics_ld_classic_issue.debug.dylib-2025-09-03-170549.ld-snapshot
ld: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5196.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
### If using Swift Package Manager, the project's Package.resolved
Expand Package.resolved snippet
```json
Replace this line with the contents of your Package.resolved.
```
### If using CocoaPods, the project's Podfile.lock
Expand Podfile.lock snippet
```yml
Replace this line with the contents of your Podfile.lock!
```
Contributor guide
Assessment
This issue has not been assessed yet.