-
Notifications
You must be signed in to change notification settings - Fork 750
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
tesseract - Couldn't load gnustl_static: findLibrary returned null - android #38
Comments
The problem isn't |
I have unpacked the leptonica.jar for android-arm and renamed the liblept.so to liblept.so.4 now the stacktrace looks like:
I had also tried having one liblept.so and liblept.so.4 at the same time but it ended with stacktrace I have included in the first post. Still no clue what is going on. Edit: found something interesting. Edit 2: So basing on the "could not load needed library: >>liblept.so.4<<" I assume that the problem is the lack of support for versioned libraries in Android OS. In the above link to SO question there is an explaination and possible fix. @saudet what do you think? |
Yes, I'm aware of Android's dislike for versioning, but I neglected to do it for Leptonica. It should be fixed now. Give it a spin and let me know if it doesn't work for some reason, thanks! |
Will definitely do. Any chance for a mavenised .jar file or compiled .so? (Windows... :/) |
I've uploaded something here: |
So I have extracted all .so files from the snapshot .jar. A fresh stacktrace for you:
Edit: correct me if I am wrong but apparently libtesseract.so as well is depending on liblept and needs it in version 4.x.x? |
Right, we need to remove versions from Tesseract as well. I've uploaded some binaries for that here: |
This time a totally different stacktrace...
Lack of ChoiceIterator class? |
Yes, that's been added recently, so make sure to use the recent class files too. |
Downloaded the java wrapper .jar.
This is all when trying to call
There are also some warnings in gradle console, Cast for instance is shown multiple times:
Thank you for your patience. :) |
Sounds like issues with Proguard...
|
I have double checked my build.gradle:
Proguard, even if it would fire (but is disabled) - shouldn't do anything. |
Have you by any chance also neglected to copy |
Of course I did. Dummy me but I find it quite confusing that I need to include 5 different dependencies just to use tesseract. I should have studied the example .pom file more carefully. The final gradle dependency list needs to look like this:
Anyways, BIG thanks for your help and assistance. Finally I was able to create a Last question: any ETA on when a fixed maven release will be in place? (I will be also interested in android-x86) |
Well, there's another guy here who would also like to have a lean version of Tesseract, with the minimum required from Leptonica: #36 But I feel it's Tesseract that should first be enhanced by removing this dependency on Leptonica altogether... As for the releases, I make one every few months, but if we can get continuous integration running, this wouldn't really matter anymore. Someone here started looking at Travis CI, and it seems to be feasible, but I haven't received any news recently: #22 If you start trying stuff out with Travis CI, please let me know! There are a few other interested people, and I'm sure that as a team we could get something running more easily. |
Finally, I have a moment today's evening. What exact info you would like to have? |
This should all be fixed with the -0.11 release. Let me know if you still have problems. Thanks for reporting and for testing all this! BTW, are you still interested in trying things out with Travis CI? It would help a lot, thanks for your interest! |
I'm having a similar problem running
My dependencies are:
|
@robertoandrade Same issue with version 0.11? |
@saudet same thing. |
Actually after a clean build it went away! Good stuff. Thanks @saudet |
Spoke too early, it was my code path that didn't hit it. Still have the same issue with 0.11 and associated presets. |
I'm wondering if this could have something to do with the distributed presets for x86. Given that all works fine if I'm using the ARM dependencies instead. Could it be that the x86 presets of ffmpeg are not built from the same source as the arm? ie: don't have http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2013-November/150424.html in it? |
They are built from the same source and they work fine in the x86 emulator.
It would help if you could provide more debug info from the log.
|
I fixed it on NDK r17 by adding this to my params the default android-arm.properties file has |
@zkrige Good catch! Please send a pull request. |
Update linkpath. this should fix bytedeco/javacpp-presets#38
Hello!
First of all - I will mention that I am new to using JNI so my problem may be a bit noobish.
I am trying to get tesseract to work on Android. I am using a Windows machine to develop so I decided to use precompiled libs from maven as there would be probably a lot of problems with lack of needed dependency libs.
I am using Gradle so I have added in dependencies:
Everything seems fine, tesseract is being seen, lept as well, but then:
As a bit of background - I try to run the application and create a
new TessBaseAPI()
on a Samsung Galaxy S1 (old but gold) with Android 2.3.3.As I was googling around for a solution I have found some page which makes me think:
Thank you in advance.
Best Regards
The text was updated successfully, but these errors were encountered: