-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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 4 android build issue #875
Comments
It looks like Tesseract already uses its own |
Hi romaderi, I am also trying to build tesseract 4 using the base of tess-two, to prevent the log2 issue I think you need to add the code below before the namespace in lstm.cpp and weightmatrix.cpp:
Now after doing that I found some other errors: Error:error: assigning to 'PROGRESS_FUNC' (aka 'bool (*)(int, int, int, int, int)') from incompatible type 'bool (void *, int, int, int, int, int)': different number of parameters (5 vs 6) Not sure how to solve this one... |
hi! I faced the same problem, was able to fix it inserting log2() implementation into lstm.cpp and weightmatrix.cpp. I guess it would be nice if source code maintainers fix it in upstream |
Can this be fixed in the repo? Related issue posted in the forum |
Sure. The easy solution would use the code shown above, but I want to replace the log function by faster pure integer calculations here (which needs a little bit more time to implement it). |
@stweil Would it make sense to implement the easy solution now and revert it when you replace the log function later? |
Related: android/ndk#82 |
The issue is addressed by pull request #1353. |
Hi there, I did |
Android has log2() now. |
That's good. And the Tesseract code has code which supports older installations without |
I think the log2() for android is obsolete. The older NDKs that needed that custom code are no longer supported by Google. AFAIK, new NDKs can be used to build apps for old android releases. |
Hi I have juste replaced the jni\com_googlecode_tesseract_android\src in the tess two project with 4.0 tesseract src and try to compile it with ndkbuild. I'm facing an issue with the following error ...
[armeabi] Install : libjpgt.so => libs/armeabi/libjpgt.so
[armeabi] Install : liblept.so => libs/armeabi/liblept.so
[armeabi] Install : libpngt.so => libs/armeabi/libpngt.so
[armeabi] Compile++ thumb: tess <= lstm.cpp
jni/com_googlecode_tesseract_android/src/lstm/lstm.cpp:85:64: error: use of
undeclared identifier 'log2'
nf_ = type_ == NT_LSTM_SOFTMAX ? no_ : IntCastRounded(ceil(log2(no_)));
^
jni/com_googlecode_tesseract_android/src/lstm/lstm.cpp:183:31: error: use of
undeclared identifier 'log2'
nf_ = IntCastRounded(ceil(log2(no_)));
^
2 errors generated.
make: *** [obj/local/armeabi/objs/tess/src/lstm/lstm.o] Error 1
Any idea ?
The text was updated successfully, but these errors were encountered: