Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbol after cocoapod import #16

Closed
Warpzit opened this issue Jun 16, 2020 · 6 comments
Closed

Undefined symbol after cocoapod import #16

Warpzit opened this issue Jun 16, 2020 · 6 comments
Labels
bug-library Potential bug in one of the ML Kit libraries ios

Comments

@Warpzit
Copy link

Warpzit commented Jun 16, 2020

After trying to implement library with cocoapods to an existing project I get following errors:

Ld /Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/DictionaryShare.appex/DictionaryShare normal arm64 (in target 'DictionaryShare' from project 'IntoWords')
    cd /Users/esben/Mikrov/git/IntoWords-iOS
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios11.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk -L/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/Alamofire -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/FirebaseCore -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/FirebaseCoreDiagnostics -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/FirebaseCrashlytics -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/FirebaseInstallations -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/GTMSessionFetcher -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/GoogleDataTransport -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/GoogleDataTransportCCTSupport -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/GoogleToolboxForMac -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/GoogleUtilities -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/GoogleUtilitiesComponents -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/PromisesObjC -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/Protobuf -F/Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/nanopb -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitBarcodeScanning/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitCommon/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitFaceDetection/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitImageLabeling/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitImageLabelingCommon/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitImageLabelingCustom/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitObjectDetection/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitObjectDetectionCommon/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitObjectDetectionCustom/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitTextRecognition/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitVision/Frameworks -F/Users/esben/Mikrov/git/IntoWords-iOS/Pods/MLKitVisionKit/Frameworks -filelist /Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Intermediates.noindex/IntoWords.build/Debug-iphoneos/DictionaryShare.build/Objects-normal/arm64/DictionaryShare.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../../Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../../Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Intermediates.noindex/IntoWords.build/Debug-iphoneos/DictionaryShare.build/Objects-normal/arm64/DictionaryShare_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fapplication-extension -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Intermediates.noindex/IntoWords.build/Debug-iphoneos/DictionaryShare.build/Objects-normal/arm64/DictionaryShare.swiftmodule -ObjC -lc++ -lsqlite3 -lz -framework AVFoundation -framework Accelerate -framework Alamofire -framework CFNetwork -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreMedia -framework CoreVideo -framework FBLPromises -framework FirebaseCrashlytics -framework FirebaseInstallations -framework Foundation -framework GoogleUtilities -framework GoogleUtilitiesComponents -framework LocalAuthentication -framework MLKitBarcodeScanning -framework MLKitCommon -framework MLKitFaceDetection -framework MLKitImageLabeling -framework MLKitImageLabelingCommon -framework MLKitImageLabelingCustom -framework MLKitObjectDetection -framework MLKitObjectDetectionCommon -framework MLKitObjectDetectionCustom -framework MLKitTextRecognition -framework MLKitVision -framework MLKitVisionKit -framework Protobuf -framework Security -framework SystemConfiguration -framework UIKit -framework nanopb -e _NSExtensionMain -framework SharedFramework -framework Pods_DictionaryShare -Xlinker -dependency_info -Xlinker /Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Intermediates.noindex/IntoWords.build/Debug-iphoneos/DictionaryShare.build/Objects-normal/arm64/DictionaryShare_dependency_info.dat -o /Users/esben/Library/Developer/Xcode/DerivedData/IntoWords-apsxgnmsdmgceqcnwfxgnosdzprw/Build/Products/Debug-iphoneos/DictionaryShare.appex/DictionaryShare

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GTMLogMininumLevelFilter", referenced from:
      objc-class-ref in MLKitCommon(GIPLoggingReroutingGTMLogger_4bb39274d070a62f02bcedfcf884786c.o)
  "_OBJC_METACLASS_$_GTMLogger", referenced from:
      _OBJC_METACLASS_$_MLKITx_GIPLoggingReroutingGTMLogger in MLKitCommon(GIPLoggingReroutingGTMLogger_4bb39274d070a62f02bcedfcf884786c.o)
  "_OBJC_CLASS_$_GTMSessionFetcher", referenced from:
      objc-class-ref in MLKitCommon(CCTClearcutUploader_88b80034c9cfd533c7ff737cf3d8f171.o)
      objc-class-ref in MLKitCommon(PHTHeterodyneSyncer_33e5c01e6d360fc8d44bfa5aa1cf3f38.o)
      objc-class-ref in MLKitCommon(PHTInternalHeterodyneSyncer_b4678a6e3e57b0f4fd5c08a59a71f80a.o)
  "_OBJC_CLASS_$_GTMSessionFetcherService", referenced from:
      objc-class-ref in MLKitCommon(MLKModelDownloader_9c43dec80e40e74b82e5f6cf057d9d58.o)
      objc-class-ref in MLKitVision(GMVCloudVisionClient_53c7716fb19c7008d8e3d8705d5d50e9.o)
  "_OBJC_CLASS_$_GTMSessionCookieStorage", referenced from:
      objc-class-ref in MLKitCommon(CCTClearcutUploader_88b80034c9cfd533c7ff737cf3d8f171.o)
  "_OBJC_CLASS_$_GTMLogger", referenced from:
      objc-class-ref in MLKitCommon(CCTClearcutMetaLogger_6adfb680567c3bb8c12fcf8136e6ad6e.o)
      objc-class-ref in MLKitCommon(PHTFlatFilePhenotype_d5874f1b858c68ba33b7a65c87d8bdff.o)
      objc-class-ref in MLKitCommon(CCTClearcutUploader_88b80034c9cfd533c7ff737cf3d8f171.o)
      objc-class-ref in MLKitCommon(PHTURL_219ca1e11ae6a76a890934900168db71.o)
      objc-class-ref in MLKitCommon(CCTLogWriter_2fc7de2c5784d0f31036f579b9be5c82.o)
      objc-class-ref in MLKitCommon(CCTClearcutLogEvent_21ff928afc0c2ec2572977c486310fcd.o)
      objc-class-ref in MLKitCommon(GIPPseudonymousIDStore_2f2b28df7320415a6c1c95341260745f.o)
      ...
  "_kGTMSessionFetcherStatusDomain", referenced from:
      ___69-[MLKModelDownloader beginModelDownloadWithURL:modelInfo:conditions:]_block_invoke.269 in MLKitCommon(MLKModelDownloader_9c43dec80e40e74b82e5f6cf057d9d58.o)
      ___76-[MLKITx_PHTHeterodyneSyncer syncAccount:syncedScopes:fetchReason:callback:]_block_invoke_2 in MLKitCommon(PHTHeterodyneSyncer_33e5c01e6d360fc8d44bfa5aa1cf3f38.o)
      ___91-[MLKITx_PHTInternalHeterodyneSyncer syncHoldingLockWithSyncedScopes:fetchReason:callback:]_block_invoke_2 in MLKitCommon(PHTInternalHeterodyneSyncer_b4678a6e3e57b0f4fd5c08a59a71f80a.o)
      ___63-[MLKITx_GMVCloudVisionClient initWithCloudUri:apiKey:options:]_block_invoke in MLKitVision(GMVCloudVisionClient_53c7716fb19c7008d8e3d8705d5d50e9.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@Warpzit Warpzit closed this as completed Jun 16, 2020
@Warpzit
Copy link
Author

Warpzit commented Jun 16, 2020

Ye this was meant for the general library and not the samples ;)

@sheepmaster
Copy link
Collaborator

This does seem like an issue in the SDK that should be addressed :)

@sheepmaster sheepmaster reopened this Jun 16, 2020
@sheepmaster
Copy link
Collaborator

Can you share your Podfile and Podfile.lock? Did you add any other pods?

@calren calren added bug-library Potential bug in one of the ML Kit libraries ios labels Jun 16, 2020
@Warpzit
Copy link
Author

Warpzit commented Jun 17, 2020

Okay so I can't recreate it but I'm going to give a complete list of what i tried yesterday:

  • Removed all other pod import untill I only had following:
    pod 'Alamofire', '~> 5.0.0-rc.2'
    pod 'Firebase/Crashlytics'
    pod 'GoogleMLKit/TextRecognition'
  • Ran pod update
  • Nuked old pods and ran pod install/update again
  • Updated imports from old firebase mlkit library to import MLKit
  • Cleaned project
  • Rebuild project
  • Restarted XCode
  • Removed derrived data
  • Build project against different targets
  • Updated build settings to work with different valid architectures
  • Everything above in different orders

What might have worked.

  • Restarting my mac and trying again from scratch

@Warpzit Warpzit closed this as completed Jun 17, 2020
@sheepmaster
Copy link
Collaborator

For posterity: the missing symbols are from GTMSessionFetcher, which is a dependency of the MLKitCommon pod.

@IvanDeLucasRog
Copy link

Experimenting with the same issue when trying to run my app with all of the Google MLKit pod installed in SwiftUI emulator. I don't understand your solution. Maybe the solution is to exclude this from emulator builds? How can achieve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-library Potential bug in one of the ML Kit libraries ios
Projects
None yet
Development

No branches or pull requests

4 participants