Tesseract-OCR-iOS
Tesseract-OCR-iOS copied to clipboard
Cannot build on XCode 10, ios12
library not found for -lstdc++.6.0.9 issue when trying to build the template project in XCode 10. As far as i read lstdc++ is not supported anymore and should be replaced with libc++
having the same issue but only on simulator, works on device. Did you manage to make it work?
Same here. Any progress so far?
Libstdc++ was deprecated, the support was removed from the iOS 12 simulator but not the device, so it should work for now. This library would need to be updated to libc++. If you want to hack around this, you will need to copy the libstdc++.*dylib from the iOS 11.4 simulator runtime to the iOS 12.0 simulator runtime in addition to copying the libstdc++.tbd between the SDKs.
I just updated to Xcode 10 and I'm facing the same issue whenever I try to run a project that depends on Tesseract using the iOS 12 simulator.
Is there any hope that this issue will be fixed (by switching from libstdc++ to libc++) any time soon? This might turn into a bigger deal in the future if left unchecked.
Thank you.
You could give #378 a try.
It uses tesseract-4.0.0 though so you'll need to update your tessdata
.
It doesn't use libstdc++ anymore though, so it should fix your problem
Thank you for the quick reply.
I tried adding the following to my Podfile:
pod 'TesseractOCRiOS', :git => 'git://github.com/hamchapman/Tesseract-OCR-iOS.git', :branch => 'macos-support'
...after a long pod install, I got the following error message:
[!] The platform of the target XYZ (iOS 9.3) is not compatible with
TesseractOCRiOS (4.0.0)
, which does not supportios
.
Any help would be appreciated.
EDIT: I managed to solve this issue after coming back to it a few days later.
I found a pull request that addresses the problem I was having that is based on the pull request that @hamchapman linked.
For anyone that might be interested, you just have to add the following to your Podfile:
pod 'TesseractOCRiOS', :git => 'git://github.com/parallaxe/Tesseract-OCR-iOS.git', :branch => 'macos-support'
Thank you for the help.
@pandraos, I have the same problem as before with the pod you’ve provided.
Here is StackOverflow issue https://stackoverflow.com/questions/52331634/xcode-10-0-gm-dyld-lazy-symbol-binding-failed-cant-resolve-symbol-cxa-gu
@yeleleo What problem are you having exactly?
@pandraos crash on simulator (X10.iOS12)
dyld: can't resolve symbol ___cxa_guard_acquire in /Users/~/Library/Developer/CoreSimulator/Devices/EA8FFB5B-29B4-23E5-8BD4-A50F6D43A657/data/Containers/Bundle/Application/3A8D9B3A-1EDA-48A7-9A5A-F297A84A22F1/App.app/Frameworks/TesseractOCR.framework/TesseractOCR because dependent dylib #1 could not be loaded
@Jnis does not work for me (both)
@yeleleo Maybe you should try clearing your CocoaPods cache, deleting your project's pods and running a fresh pod install and then testing a clean build. I hope that helps.
@pandraos just tried, nope =(
You can try this library https://github.com/SwiftyTesseract/SwiftyTesseract
@yeleleo , yes, it does not work for me too. 1/ But, on device this library works well. 2/ And (stupid, but it works) you can download simulator iOS11.4 for testing on simulator. 3/ And waiting/hoping for update of this library. Or you can try another library (ex. @GaevYuriy )
@Jnis and how you test on new devices if you don't have any?)
@Jnis and how you test on new devices if you don't have any?)
I do. New devices are proven to be compatible with old (6.0.9) runtime lib. In other words iOS 12 runtime has lstdc++.6.0.9 on board.
Add that command to your pod file => https://gist.github.com/gali8/7d090865a904a16caf5a7a3116c3c3ab
Hi @gali8 not helped in my case =(
any new news on when this library will be updated to libc++ ?
@hamchapman @parallaxe @gali8
I can confirm that by specifying pod 'TesseractOCRiOS', :git => 'git://github.com/parallaxe/Tesseract-OCR-iOS.git', :branch => 'macos-support'
in my project that I can build AND run in the Xcode 10.1/iOS 12.1 Simulator.
This allows me to run an Xcode test suite on sample images for my app in CI...
Can confirm! Updating the pod branch to macos-support as stated by @francisli works perfectly. Thank you
@samcasm @francisli Which tessdata files do you use? I had the same issue that I could not run the app on simulator but on device (using master branch with tessdata version 3.5). Now, after updating to 'macos-support' branch I need to update tessdata to 4.0 in order to avoid weird "read_params_file: parameter not found: enable_new_segsearch" issue. And then, it runs on both simulator and device BUT outputs only garbage. I need trained tessdata for german and english, that works with this branch...
Doing the above solution does not work with the existing tessdata files. Which tessdata files do you have to use?
This works: https://gist.github.com/gali8/7d090865a904a16caf5a7a3116c3c3ab - but it does not work on the simulator, only on the device.
https://github.com/devdawei/libstdc- This repository help me add libstdc to Xcode12 by .sh. And it's also useful to Xcode10 Xcode11.