gali8 / Tesseract-OCR-iOS

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.
http://www.nexor.it
MIT License
4.22k stars 949 forks source link

iOS Simulator: ld: file not found: /System/Library/PrivateFrameworks/PrototypeTools.framework/PrototypeTools for architecture x86_64 #235

Closed chyt closed 8 years ago

chyt commented 9 years ago

I installed Tesseract version 4.0.0 through CocoaPods. Everything works fine on the device, but I'm getting the following error when trying to rune my app in the iOS simulator:

Ld /Users/CYT/Library/Developer/Xcode/DerivedData/SWRuneOptimizer-cjllapsozjwnfydbvupbhtxeweii/Build/Products/Debug-iphonesimulator/SWOptimizer.app/SWOptimizer normal x86_64
    cd /Users/CYT/Dropbox/Projects/iOS/SWRuneOptimizer/SWRuneOptimizer
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk -L/Users/CYT/Library/Developer/Xcode/DerivedData/SWRuneOptimizer-cjllapsozjwnfydbvupbhtxeweii/Build/Products/Debug-iphonesimulator -L/Users/CYT/Dropbox/Projects/iOS/SWRuneOptimizer/SWRuneOptimizer/../Pods/TesseractOCRiOS/TesseractOCR/lib -F/Users/CYT/Library/Developer/Xcode/DerivedData/SWRuneOptimizer-cjllapsozjwnfydbvupbhtxeweii/Build/Products/Debug-iphonesimulator -filelist /Users/CYT/Library/Developer/Xcode/DerivedData/SWRuneOptimizer-cjllapsozjwnfydbvupbhtxeweii/Build/Intermediates/SWOptimizer.build/Debug-iphonesimulator/SWOptimizer.build/Objects-normal/x86_64/SWOptimizer.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -objc_abi_version -Xlinker 2 -lstdc++ -undefined suppress -flat_namespace -ObjC -weak_library /usr/lib/libstdc++.6.0.9.dylib -lCTAssetsPickerController -lFMDB -lPureLayout -lTesseractOCRiOS -llept -lsqlite3 -lstdc++ -ltesseract_all -framework Foundation -framework Photos -framework UIKit -fobjc-arc -fobjc-link-runtime -lTesseractOCRiOS -framework QuartzCore -framework AVFoundation -framework OpenGLES -framework CoreVideo -framework CoreMedia -lGPUImage -lsqlite3.0 -lstdc++.6.0.9 -framework Photos -framework UIKit -framework CoreGraphics -framework Foundation -framework CoreImage -lPods -Xlinker -dependency_info -Xlinker /Users/CYT/Library/Developer/Xcode/DerivedData/SWRuneOptimizer-cjllapsozjwnfydbvupbhtxeweii/Build/Intermediates/SWOptimizer.build/Debug-iphonesimulator/SWOptimizer.build/Objects-normal/x86_64/SWOptimizer_dependency_info.dat -o /Users/CYT/Library/Developer/Xcode/DerivedData/SWRuneOptimizer-cjllapsozjwnfydbvupbhtxeweii/Build/Products/Debug-iphonesimulator/SWOptimizer.app/SWOptimizer

ld: file not found: /System/Library/PrivateFrameworks/PrototypeTools.framework/PrototypeTools for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is the problem that Tesseract only works on armv architecture? I get the same thing if I'm running the iPhone simulator (architecture is i386). I really need to test my app on other iOS versions; is there some other way to get it to compile?

ws233 commented 9 years ago

@chyt, the Tesseract works on simulator as well. I'm not sure about release version from CocoaPods. Can you try the current developer version? Just change you Podfile to this: pod 'TesseractOCRiOS', :git => https://github.com/gali8/Tesseract-OCR-iOS.git

chyt commented 9 years ago

Hey @ws233,

I'm still getting the same error with that version.

ws233 commented 9 years ago

What is '/System/Library/PrivateFrameworks/PrototypeTools.framework/PrototypeTools'? It doesn't seem to be a part of TesseractOCR-iOS. Just try to remove this lib from the project linking phase.

chyt commented 9 years ago

The weird thing is that there is no PrototypeTools framework at that path, nor is it ever linked under Build Phases. But based on the error message it definitely looks like it has something to do with the Tesseract library, which is why I posted here.

ws233 commented 9 years ago

But based on the error message it definitely looks like it has something to do with the Tesseract library

Why do you think so? TesseractOCR-iOS definetely doesn't use PrototypeTools.framework. I've just tried the Template Framework Project with xCode 7.1.1 on iPhone4S and iPhone6s+ simulators. No linking errors as expected. The issue seems to be somewhere outside of our scope.

ws233 commented 8 years ago

I'm closing the issue, since it doesn't seem to be related to TesseractOCR-iOS. @chyt, feel free to reopen it if you have more details related to the Project.