Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Linker command failed with exit code 1 on latest packages #535

Closed
hemantbeast opened this issue Mar 3, 2022 · 4 comments
Closed

Linker command failed with exit code 1 on latest packages #535

hemantbeast opened this issue Mar 3, 2022 · 4 comments

Comments

@hemantbeast
Copy link

I have updated the packages to latest version which is 8.10.0 atm & getting native linking failed with linker flags.

Packages been used:
Xamarin.Firebase.iOS.Core - 8.10.0
Xamarin.Firebase.iOS.Analytics - 8.10.0
Xamarin.Firebase.iOS.Auth - 8.10.0
Xamarin.Firebase.iOS.CloudMessaging - 8.10.0
Xamarin.Firebase.iOS.Installations - 8.10.0
Xamarin.Firebase.iOS.Crashlytics - 8.10.0

Error log:
`Process exited with code 1, command:
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRLoggerAuth. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.

MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRLoggerMLKit. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
		
MTOUCH : warning MT5215: References to 'System' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'System' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'System' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'System.Net.Security' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'System' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'BCrypt' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'c' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'Kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'libEGL' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'ole32' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'dl' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
		
MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -ObjC -lz -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -lc++ -ObjC -ObjC -lc++ -ObjC -lc++ -ObjC -lc++ -ObjC -lc++ -ObjC -lc++ -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker "/Users/admin/Projects/FEProject.iOS/obj/iPhoneSimulator/Debug/device-builds/iphone 11-15.2/Entitlements.xcent"

Undefined symbols for architecture x86_64:
  "_kFIRLoggerAuth", referenced from:
      ___34-[FIRAuth initWithAPIKey:appName:]_block_invoke in FirebaseAuth(FIRAuth.o)
      -[FIRAuth scheduleAutoTokenRefreshWithDelay:retry:] in FirebaseAuth(FIRAuth.o)
      ___47-[FIRAuth getTokenForcingRefresh:withCallback:]_block_invoke in FirebaseAuth(FIRAuth.o)
      +[FIRAuthAPNSTokenManager isProductionApp] in FirebaseAuth(FIRAuthAPNSTokenManager.o)
      ___70-[FIRAuthNotificationManager checkNotificationForwardingWithCallback:]_block_invoke in FirebaseAuth(FIRAuthNotificationManager.o)
      -[FIRUser signOutIfTokenIsInvalidWithError:] in FirebaseAuth(FIRUser.o)
      ___62-[FIRPhoneAuthProvider verifyClientWithUIDelegate:completion:]_block_invoke_3 in FirebaseAuth(FIRPhoneAuthProvider.o)
      ...
  "_kFIRLoggerMLKit", referenced from:
      _FIRMLKitLog in FirebaseMLCommon(FIRMLKitLogger_294d6f5c71c3c86a3f30ca2d7bf082e1.o)
ld: symbol(s) not found for architecture x86_64
clang : error : linker command failed with exit code 1 (use -v to see invocation)`
@dmariogatto
Copy link
Contributor

Do you have any of the Firebase iOS ML (Xamarin.Firebase.iOS.MLKit.*) packages installed?

@hemantbeast
Copy link
Author

@dmariogatto I'm using this barcode scanner package which is based on MLKit.

@dmariogatto
Copy link
Contributor

All the current MLKit nuget packages are deprecated & built against older versions of Firebase, which is what is probably causing the linking error. There are bindings for the newer replacement libraries but these haven't been released yet.

@hemantbeast
Copy link
Author

@dmariogatto replaced the barcode scanning package, now working fine. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants