firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.67k stars 1.49k forks source link

Linker command failed with exit code 1 (use -v to see invocation) #12982

Closed zhsuperman closed 5 months ago

zhsuperman commented 6 months ago

Description

ld: warning: Could not find or use auto-linked library 'swiftCompatibility50': library 'swiftCompatibility50' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibility51': library 'swiftCompatibility51' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibility56': library 'swiftCompatibility56' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency': library 'swiftCompatibilityConcurrency' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements': library 'swiftCompatibilityDynamicReplacements' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibilityPacks': library 'swiftCompatibilityPacks' not found ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found Undefined symbols for architecture arm64: "swift_FORCELOAD$_swiftCompatibility50", referenced from: swift_FORCELOAD$swiftCompatibility50$_FirebaseAnalytics in FirebaseAnalytics17 swift_FORCELOAD$swiftCompatibility50$_FirebaseCoreInternal in FirebaseCoreInternal4 swift_FORCELOAD$swiftCompatibility50$_FirebaseCrashlytics in FirebaseCrashlytics85 swift_FORCELOAD$swiftCompatibility50$_FirebaseRemoteConfig in FirebaseRemoteConfig18 swift_FORCELOAD$swiftCompatibility50$_FirebaseRemoteConfigInterop in FirebaseRemoteConfigInterop4 swift_FORCELOAD$swiftCompatibility50$_FirebaseSessions in FirebaseSessions6 swift_FORCELOAD$swiftCompatibility50$_FirebaseSharedSwift in FirebaseSharedSwift4 ... "swift_FORCELOAD$_swiftCompatibility51", referenced from: swift_FORCELOAD$swiftCompatibility51$_FirebaseAnalytics in FirebaseAnalytics17 swift_FORCELOAD$swiftCompatibility51$_FirebaseCoreInternal in FirebaseCoreInternal4 swift_FORCELOAD$swiftCompatibility51$_FirebaseCrashlytics in FirebaseCrashlytics85 swift_FORCELOAD$swiftCompatibility51$_FirebaseRemoteConfig in FirebaseRemoteConfig18 swift_FORCELOAD$swiftCompatibility51$_FirebaseRemoteConfigInterop in FirebaseRemoteConfigInterop4 swift_FORCELOAD$swiftCompatibility51$_FirebaseSessions in FirebaseSessions6 swift_FORCELOAD$swiftCompatibility51$_FirebaseSharedSwift in FirebaseSharedSwift4 ... "swift_FORCELOAD$_swiftCompatibility56", referenced from: swift_FORCELOAD$swiftCompatibility56$_FirebaseAnalytics in FirebaseAnalytics17 swift_FORCELOAD$swiftCompatibility56$_FirebaseCoreInternal in FirebaseCoreInternal4 swift_FORCELOAD$swiftCompatibility56$_FirebaseCrashlytics in FirebaseCrashlytics85 swift_FORCELOAD$swiftCompatibility56$_FirebaseRemoteConfig in FirebaseRemoteConfig18 swift_FORCELOAD$swiftCompatibility56$_FirebaseRemoteConfigInterop in FirebaseRemoteConfigInterop4 swift_FORCELOAD$swiftCompatibility56$_FirebaseSessions in FirebaseSessions6 swift_FORCELOAD$swiftCompatibility56$_FirebaseSharedSwift in FirebaseSharedSwift4 ... "swift_FORCELOAD$_swiftCompatibilityConcurrency", referenced from: swift_FORCELOAD$swiftCompatibilityConcurrency$_FirebaseAnalytics in FirebaseAnalytics17 swift_FORCELOAD$swiftCompatibilityConcurrency$_FirebaseCoreInternal in FirebaseCoreInternal4 swift_FORCELOAD$swiftCompatibilityConcurrency$_FirebaseCrashlytics in FirebaseCrashlytics85 swift_FORCELOAD$swiftCompatibilityConcurrency$_FirebaseRemoteConfig in FirebaseRemoteConfig18 swift_FORCELOAD$swiftCompatibilityConcurrency$_FirebaseRemoteConfigInterop in FirebaseRemoteConfigInterop4 swift_FORCELOAD$swiftCompatibilityConcurrency$_FirebaseSessions in FirebaseSessions6 swift_FORCELOAD$swiftCompatibilityConcurrency$_FirebaseSharedSwift in FirebaseSharedSwift4 ... "swift_FORCELOAD$_swiftCompatibilityDynamicReplacements", referenced from: swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_FirebaseAnalytics in FirebaseAnalytics17 swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_FirebaseCoreInternal in FirebaseCoreInternal4 swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_FirebaseCrashlytics in FirebaseCrashlytics85 swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_FirebaseRemoteConfig in FirebaseRemoteConfig18 swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_FirebaseRemoteConfigInterop in FirebaseRemoteConfigInterop4 swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_FirebaseSessions in FirebaseSessions6 swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_FirebaseSharedSwift in FirebaseSharedSwift4 ... ld: symbol(s) not found for architecture arm64

Showing Recent Errors Only Undefined symbol: __swift_FORCELOAD$_swiftCompatibility50

Undefined symbol: __swift_FORCELOAD$_swiftCompatibility51

Undefined symbol: __swift_FORCELOAD$_swiftCompatibility56

Undefined symbol: __swift_FORCELOAD$_swiftCompatibilityConcurrency

Undefined symbol: __swift_FORCELOAD$_swiftCompatibilityDynamicReplacements

Linker command failed with exit code 1 (use -v to see invocation) 我使用cocospods 升级firebase到10.25.0版本 报错

我按照readme 操作Other Linker Settings 天际了-ObjC和-lc++ 也添加了空的swift文件 依然解决不了我的问题,希望能解决我的问题

Reproducing the issue

Showing Recent Errors Only Undefined symbol: __swift_FORCELOAD$_swiftCompatibility50

Undefined symbol: __swift_FORCELOAD$_swiftCompatibility51

Undefined symbol: __swift_FORCELOAD$_swiftCompatibility56

Undefined symbol: __swift_FORCELOAD$_swiftCompatibilityConcurrency

Undefined symbol: __swift_FORCELOAD$_swiftCompatibilityDynamicReplacements

Linker command failed with exit code 1 (use -v to see invocation)

Firebase SDK Version

10.25.0

Xcode Version

15.4

Installation Method

CocoaPods

Firebase Product(s)

AB Testing, Analytics, Crashlytics, DynamicLinks, Installations, ML Model Downloader, Remote Config

Targeted Platforms

iOS

Relevant Log Output

Showing Recent Errors Only
Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility50

Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility51

Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility56

Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency

Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements

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! ```
google-oss-bot commented 6 months ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

kunal08pandey commented 6 months ago

I am also facing the same issue

paulb777 commented 6 months ago

Please see if anything in the discussion at #12603 helps.

google-oss-bot commented 5 months ago

Hey @zhsuperman. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

zhsuperman commented 5 months ago

在项目中添加一个swift文件就可以了