Closed sawankumar94 closed 4 years ago
Given the information you provide, we cannot help because we cannot identify the problem. At least, please provide the complete error message. Please, also consider to test whether your Tesseract installation actually works before you work with tesstrain.
Hi,
Thank you for your response . I am attaching two screenshots where i have highlighted error messages too.
This looks like a linking error. Very strange. I fear that you will have to redo the installation procedure from scratch and provide the complete command line output as a text file.
@stweil Have you ever encountered such linking errors when building tesseract/tesstrain?
I'm having a similar issue when I try to run
make leptonica tesseract
This fails in the Makefile line 328 when trying to build tesseract
tesseract.built: tesseract-$(TESSERACT_VERSION)
cd $< && \
sh autogen.sh && \
PKG_CONFIG_PATH="$(LOCAL)/lib/pkgconfig" \
./configure --prefix=$(LOCAL) && \
LDFLAGS="-L$(LOCAL)/lib"\
make -j$(CORES) install training-install && \
date > "$@"
I have attached the entire stdout and stderr that I got when running the command tesstrain_std.txt
@rambalachandran Do you encounter the same problem if you build tesseract outside of tesstrain
?
@stweil Do the Tesseract versions shipping with Linux distros contain the training tools? I.e. could installing leptonica and Tesseract via the distro and skipping make leptonica tesseract
circumvent the linking errors described above?
I had the same issue:
Making all in unittest
make[3]: Entering directory '/home/owner/Workspace/tesstrain/tesseract-4.1.0/unittest'
mkdir -p tmp
make[3]: Leaving directory '/home/owner/Workspace/tesstrain/tesseract-4.1.0/unittest'
make[2]: Leaving directory '/home/owner/Workspace/tesstrain/tesseract-4.1.0'
make[1]: Leaving directory '/home/owner/Workspace/tesstrain/tesseract-4.1.0'
Makefile:328: recipe for target 'tesseract.built' failed
make: *** [tesseract.built] Error 2
I was able to resolve it by removing -j$(CORES)
from the makefile command:
$ git diff Makefile
diff --git a/Makefile b/Makefile
index dd440a4..3d225cb 100644
--- a/Makefile
+++ b/Makefile
@@ -330,7 +330,7 @@ tesseract.built: tesseract-$(TESSERACT_VERSION)
PKG_CONFIG_PATH="$(LOCAL)/lib/pkgconfig" \
./configure --prefix=$(LOCAL) && \
LDFLAGS="-L$(LOCAL)/lib"\
- make -j$(CORES) install training-install && \
+ make install training-install && \
date > "$@"
That is interesting.
@stweil @kba Could you please confirm this defective behavior? Does this indicate a dependency in the build process of Tesseract which is not correctly resolved by the parallelization mechanism of make?
I can also confirm that I followed @abandonware-magazines and removing -j$(CORES) fixed the makefile bug
Confirmed. And yes, that's a bug in the Makefiles of Tesseract 4.1.0 (and also 4.1.1, even latest git has this issue). make leptonica tesseract CORES=1
helps to work around that bug.
Its best if you can change the README.md to help people savetime from this bug
It's even better to fix it, so people don't get a bug. I am already working on a fix.
Pull request #193 fixes this bug and updates the software versions. Maybe you can try it and confirm that it works for you, too.
The fix is merged now, so this issue can be closed. Please report if there remains a problem.
Hi, I cloned 'https://github.com/tesseract-ocr/tesstrain.git' at one of directory in desktop. I am using Ubuntu 20.04. I removed previously installed tesseract-ocr. I installed following libraries: g++ , autoconf, automake, libtool, pkg-config, libpng-dev, libjpeg8-dev, libtiff5-dev, zlib1g-dev, libicu-dev, libpango1.0-dev, libcairo2-dev, libleptonica-dev, ca-certificates from https://tesseract-ocr.github.io/tessdoc/Compiling and https://tesseract-ocr.github.io/tessdoc/Compiling-%E2%80%93-GitInstallation urls.
I tried doing 'make leptonica tesseract' on command line within 'tesstrain' directory. I have been getting this error make: ** [Makefile : 325: tesseract.built] Error 2 for long.
Please help.
Regards, Sawan