Description
What happened?
ld: Undefined symbols:
_GULLogBasic, referenced from:
_MLKLog in MLKitCommon[x86_64][7](MLKLogger.o)
_OBJC_CLASS_$_GDTCORTransport, referenced from:
in MLKitCommon[x86_64][6](MLKFirelogTransport.o)
_OBJC_CLASS_$_GTMLogMininumLevelFilter, referenced from:
in MLKitCommon[x86_64][151](GIPLoggingReroutingGTMLogger.o)
_OBJC_CLASS_$_GTMLogger, referenced from:
in MLKitCommon[x86_64][26](CCTClearcutUploader.o)
_OBJC_CLASS_$_MLKITx_GIPLoggingReroutingGTMLogger in MLKitCommon[x86_64][151](GIPLoggingReroutingGTMLogger.o)
_OBJC_CLASS_$_GTMSessionCookieStorage, referenced from:
in MLKitCommon[x86_64][26](CCTClearcutUploader.o)
_OBJC_CLASS_$_GTMSessionFetcher, referenced from:
in MLKitCommon[x86_64][26](CCTClearcutUploader.o)
_OBJC_CLASS_$_GTMSessionFetcherService, referenced from:
in MLKitCommon[x86_64][18](MLKModelDownloader.o)
_OBJC_CLASS_$_GULCCComponent, referenced from:
in MLKitCommon[x86_64][11](MLKCustomModelManager.o)
_OBJC_CLASS_$_GULCCComponentContainer, referenced from:
in MLKitCommon[x86_64][3](MLKContext.o)
_OBJC_CLASS_$_GULCCComponentType, referenced from:
in MLKitCommon[x86_64][3](MLKContext.o)
_OBJC_CLASS_$_GULUserDefaults, referenced from:
in MLKitCommon[x86_64][2](MLKAnalyticsLogger.o)
_OBJC_CLASS_$_RCTAppDelegate, referenced from:
_OBJC_CLASS_$_AppDelegate in AppDelegate.o
_OBJC_CLASS_$_RCTBundleURLProvider, referenced from:
in AppDelegate.o
_OBJC_METACLASS_$_GTMLogger, referenced from:
_OBJC_METACLASS_$_MLKITx_GIPLoggingReroutingGTMLogger in MLKitCommon[x86_64][151](GIPLoggingReroutingGTMLogger.o)
_OBJC_METACLASS_$_RCTAppDelegate, referenced from:
_OBJC_METACLASS_$_AppDelegate in AppDelegate.o
_kGTMSessionFetcherStatusDomain, referenced from:
___69-[MLKModelDownloader beginModelDownloadWithURL:modelInfo:conditions:]_block_invoke.285 in MLKitCommon[x86_64][18](MLKModelDownloader.o)
___150-[MLKITx_PHTHeterodyneSyncer batchSyncWithAccounts:syncedScopes:fetchReason:throttlingCache:heterodyneSyncInfo:accountToAuthToken:lastError:callback:]_block_invoke in MLKitCommon[x86_64][45](PHTHeterodyneSyncer.o)
___91-[MLKITx_PHTInternalHeterodyneSyncer syncHoldingLockWithSyncedScopes:fetchReason:callback:]_block_invoke in MLKitCommon[x86_64][82](PHTInternalHeterodyneSyncer.o)
___63-[MLKITx_GMVCloudVisionClient initWithCloudUri:apiKey:options:]_block_invoke in MLKitVision[x86_64][7](GMVCloudVisionClient.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I encountered this error when I installed the @react-native-ml-kit/text-recognition library into the react-native project with version 0.73.4.
This error occurs when product->scheme->edit-scheme->build configration->debug is selected.
However, when I change it to product->scheme->edit-scheme->build configration->release, the error disappears and the build is successful.
How can I solve this current error in Debug mode?
Version
@react-native-ml-kit/barcode-scanning: version@react-native-ml-kit/face-detection: version@react-native-ml-kit/identify-languages: version@react-native-ml-kit/image-labeling: version@react-native-ml-kit/text-recognition: version@react-native-ml-kit/translate-text: version
Which ML Kit packages do you use?
- @react-native-ml-kit/barcode-scanning
- @react-native-ml-kit/face-detection
- @react-native-ml-kit/identify-languages
- @react-native-ml-kit/image-labeling
- @react-native-ml-kit/text-recognition
- @react-native-ml-kit/translate-text
What platforms are you seeing this issue on?
- Android
- iOS
System Information
System:
OS: macOS 14.3.1
CPU: (12) arm64 Apple M2 Pro
Memory: 119.36 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 21.6.2
path: /opt/homebrew/bin/node
Yarn: Not Found
npm:
version: 10.2.4
path: /opt/homebrew/bin/npm
Watchman:
version: 2024.01.22.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /Users/hknzbyn/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- watchOS 10.2
Android SDK:
API Levels:
- "31"
- "33"
- "34"
Build Tools:
- 28.0.3
- 30.0.3
- 33.0.0
- 33.0.1
- 33.0.2
- 34.0.0
System Images:
- android-31 | Google APIs ARM 64 v8a
- android-31 | Google Play ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode:
version: 15.1/15C65
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/hknzbyn/.rvm/rubies/ruby-2.7.5/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.4
wanted: 0.73.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to Reproduce
Install "@react-native-ml-kit/text-recognition": "^1.5.1" on the 0.73.4 react-native version and try to build with debug mode from Xcode. You will encounter an error.