LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Tesseract-4.0.0-Beta4 compiling woes (https://www.linuxquestions.org/questions/linux-software-2/tesseract-4-0-0-beta4-compiling-woes-4175636739/)

business_kid 08-20-2018 01:27 PM

Tesseract-4.0.0-Beta4 compiling woes
 
I'm on Slackware64-current, trying to compile the new tesseract engine. The first problem was that libpng16.la was missing but I got around that with --disable-static --enable-shared. Then I get this
Code:

make[2]: Leaving directory '/home/dec/download/tesseract-4.0.0-beta.4/doc'
Making all in unittest
make[2]: Entering directory '/home/dec/download/tesseract-4.0.0-beta.4/unittest'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/dec/download/tesseract-4.0.0-beta.4/unittest'
make[1]: *** [Makefile:493: all-recursive] Error 1
make[1]: Leaving directory '/home/dec/download/tesseract-4.0.0-beta.4'
make: *** [Makefile:402: all] Error 2

EDIT: The full configure line used was './configure --prefix=/usr --libdir=/usr/lib64 --disable-static --enable-shared'

Error 1 is permissions.
Directories are 0755, files 0644 all owned by myuser:mygroup. The Makefile & configure are from autogen.sh

Error 2 is "no such file or directory." :-O? Being root doesn't help.

business_kid 08-28-2018 11:33 AM

Tesseract-4.0.0beta4: I returned and put this to bed - by deleting it.

I returned and did a make clean, followed by 'make -j2 >>make.err' which caught the faults

I needed to install libpng16.la, then libgif.la. Nobody bothers with static libs these days.
The 'install' completed, but it was only includes :-/. The src/ directory doesn't appear to have been built:-o. I tried 'make' on the src/ subdirs, but the first puked for lack of libtiff.la.
Then I thought: If that's so awful, ought I not let the guy finish what is apparently a WIP?

business_kid 08-29-2018 02:25 PM

/much later
If you really want to try tesseract, don't use the supplied source. The make system doesn't cut it.

Clone the git which is on github, and use libopenjpeg instead of the old libjpeg package on sourceforge.net that a quick google points you to. The make scripts are also buggered on that. Use the instructions and links for that from the LinuxFromScratch site, except use --enable-static. You'll also have to build tiff, png, and lzma with --enable-static to extract one lousy static lib from each. You also need libopenjpeg.so, and I added libjpeg.la as a symlink to libopenjpeg.la.

business_kid 09-04-2018 02:04 PM

This is an old thread, but I have to correct my post below

Don't use libopenjpeg.la, like I did. I fed it some jpegs of letters (a basic job for an ocr program) and didn't get one word of English. Convert the jpegs to pngs, and I get fair to middling English (It pukes on '-€' and I gave it bills). Also install some languages (e.g. eng.traineddata) in the tessdata directory, and try
Code:

tesseract --list-langs
to see if it picked them up.


All times are GMT -5. The time now is 03:03 PM.