-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
CMake currently does not support Tesseract builds for non Intel hosts (Android cross-build error) #2337
Comments
Is this a duplicate of issue #2334? All errors shown in your make output are in files which are not part of the Tesseract sources. Those files obviously are for the Intel architecture, so they should not be included by ARM toolchains. This looks like a wrong build setting. I don't know whether the CMake build settings work for non Intel architectures. I know that the autoconf based build works, so please use that. |
@stweil: this is cmake related related issue and 2334 is autotools related, so from perspective of build tools it is not duplicate. |
Thank you, @zdenop. Yes, the current CMake has fixed unconditional settings for Intel builds and cannot support cross builds for other architectures like ARM. I update the summary. |
@Bleach665 : try current master - there is detection of available features in cmake. |
@zdenop.
PS. CMakeList.txt changes to perform Windows build: |
Seems like missing include path for leptonica. How did you run
configuration?
Dňa po 22. 4. 2019, 12:24 Bleach665 <[email protected]> napísal(a):
… @zdenop <https://github.com/zdenop>.
I do not have at fingertips Linux, therefore I try to build in Windows 10.
I configure Tesseract via CMake with Android 16 toolchain and MinGW
makefile. MinGW was taken from Qt distrib.
Leptonica configured in such way was build successfully. Tesseract CMake
configuration performed well (with minimal changes CMakeList.txt), but on
build I receive errors:
In file included from E:\Lib_prebuild\tesseract\source\src\ccmain\adaptions.cpp:26:
E:\Lib_prebuild\tesseract\source\src\ccmain/tesseractclass.h:30:10: fatal error: 'allheaders.h' file not found
#include "allheaders.h" // for pixDestroy, pixGetWidth, pixGetHe...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2337 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEMFTFQOEN6Z4ZQUCANNMTPRWG4NANCNFSM4G7RCFGQ>
.
|
Just run path-to\mingw32-make.exe in CMake build directory.
|
Make does not start configuration....
Dňa po 22. 4. 2019, 13:24 Bleach665 <[email protected]> napísal(a):
… Just run path-to\mingw32-make.exe in CMake build directory.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2337 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEMFTAD2DNNGIJHXBSZXHDPRWN7DANCNFSM4G7RCFGQ>
.
|
In xubuntux64 I receive same error:
|
Configure button pressed again. Are you building leptonica after tesseract? You need to build it before. |
Leptonica was build before Tesseract. As far as I remember in CMakeList.txt Leptonica find_package is with REQUIRED flag, so Leptonica_DIR should point to right dir (cmake dir in our install dir), if not then we get an error while configuring. At least in Windows so. And, maybe that's important, |
@Bleach665 : |
@zdenop . Yes,
added to CMake config file fix it.
UPD.
at the time of compilation
Does anyone know how |
Sorry, but this is not tesseract related. You should go to some android forum. |
Ok. Recent changes to make worked solution. So, with all of the above described changes we have successful CMake configuration and build for Android cross build in Widows using android NDK toolchain and MinGW32. |
thanks |
This breaks the normal Linux build:
This is because
checks for |
thanks for report. should be fixed. |
What is error message? |
d5f23a6 actually works on MacOS 10.14.4git clone https://github.com/tesseract-ocr/tesseract.git
cd tesseract
git reset --hard d5f23a61b36de564c660ce37fec28bbc2b58f1e1
mkdir build && cd build
cmake ..
make -j8 ...
[100%] Built target tesseract 087576f fails (and 7a5b9b8 behaves exactly the same way)git clone https://github.com/tesseract-ocr/tesseract.git
git reset --hard 087576f2d9d320cff5ba41df29120a8d8cc0e08b
cd tesseract
mkdir build && cd build
cmake .. ...
Configuring tesseract version 5.0.0-alpha-45-g7a5b...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMake Error at CMakeLists.txt:149 (message):
Missing required pkg-config
-- Configuring incomplete, errors occurred! Although cmake .. -D PKG_CONFIG_EXECUTABLE=/usr/local/bin/pkgconf
make -j8 ...
[ 99%] Linking CXX shared library libtesseract.dylib
ld: library not found for -lleptonica
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libtesseract.5.0.0.dylib] Error 1
make[1]: *** [CMakeFiles/libtesseract.dir/all] Error 2
make: *** [all] Error 2 Altough Leptonica is present in ls /usr/local/lib/liblept* /usr/local/lib/liblept.dylib -> libleptonica.1.79.0.dylib
/usr/local/lib/libleptonica.1.79.0.dylib
/usr/local/lib/libleptonica.5.3.0.dylib -> libleptonica.1.79.0.dylib
/usr/local/lib/libleptonica.dylib -> libleptonica.5.3.0.dylib Thanks for the quick reply. |
How did you install leptonica? Leptonica cmake build also requires pkg-config. |
Leptonica seems to be able compile even without git clone https://github.com/DanBloomberg/leptonica.git
cd leptonica && mkdir build && cd build
cmake .. ...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
...
-- Generating done
My approach is a bit unusual, as I am compiling everything from source, as most users seem to install it using |
@Bleach665: can you please test the latest code if it works for you? |
@zdenop. I will be able to do it from the middle of next week. (Cross-platform arm7 build, using CMake with mingw32 in Windows) CMake GUI output
CMake changes:
|
@zdenop. I try perform cross build in Windows 10, mingw32, CMake 3.13.4, android ndk r16b (a few commits ago build with this configuration was successful) and get CMake configuration error: CMake gui output:
It look like problem is with using OpenCL. |
@Bleach665 can you please do check once more time? |
@zdenop.
CMake changes:
|
Can you please make a clean build (maybe including git cloning). |
Build was clean and repo cloned from scratch. |
than please provide full log from configuration. |
UPD. Sorry, I forgot about log files. I looked at them - there's a couple of mistakes. |
And I guess problem is that you first (clean) run is started as cppan build and then you try to reconfigure at non cppan build, but is does not work (cmake uses cached results during reconfiguration!) |
Host OS: Linux xubuntu64 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux; CMake GUI 3.10.2; Android toolchain - android-ndk-r15c; gcc version 7.3.0; Tesseract rev. ac7ea43.
CMake GUI changes: CMAKE_PREFIX_PATH:PATH="/home/bleach/Lib/leptonica/build_arm" specified.
Build error received:
make output
Please advise how to quickly remove AVX(2) support from the code or Cmake config. I tried
my changes
The text was updated successfully, but these errors were encountered: