0

I'm having trouble installing the pods for Tesseract OCR.

pod 'TesseractOCRiOS', '4.0.0'

and it throws the error

[!] The `Test [Debug]` target overrides the `CLANG_CXX_LIBRARY` build setting defined in `Pods/Target Support Files/Pods-Test/Pods-Test.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

Where can I find the CLANG_CXX_LIBRARY flag ?

When I search for CLANG_CXX_LIB flag in build settings , it showed me the C++ standard library and set to compiler-default and I can't add $(inherited) to it.

I tried adding $(inherited) to OtherLinker flags but it didn't help.

Podfile:

platform :ios, '9.0'

def application_pods
    #use_frameworks!
    pod 'TesseractOCRiOS'
    pod 'Realm'
end

def extension_pods
    #use_frameworks!
    pod 'Realm'
end


target 'Test' do
  # Pods for Test
  application_pods
end

target 'CallerID' do
   extension_pods
end 

Edit:

This is happening only with Xcode 9.3 beta. I checked with prod release of Xcode and I do not have this issue.

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109

1 Answers1

2

The CLANG_CXX_LIBRARY flag is coming from the TesseractOCRiOS podspec.

Most likely the podspec should be using the pod_target_xcconfig option instead of the deprecated xcconfig so it only impacts the build options for the pod instead of the whole workspace.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • what do I need to do to fix this ? – Teja Nandamuri Feb 12 '18 at 19:14
  • In the Tesseract podspec,https://github.com/CocoaPods/Specs/blob/master/Specs/b/d/c/TesseractOCRiOS/4.0.0/TesseractOCRiOS.podspec.json, they are using xcconfig. – Teja Nandamuri Feb 12 '18 at 19:21
  • Some options - 1. Contact the podspec maintainers to make a fix 2. Create your own podspec file with the fix 3. Manually update the CocoaPods generated xcconfig files every time you run pod install/update 4. Live with the error 5. Try older CocoaPods versions – Paul Beusterien Feb 12 '18 at 19:28