Text recognition not working, Troubleshooting my manual Install PLEASE

Asked by James Rundle on 2019-10-11

Hi there, I'm on an enterprise network and thus have to install sikuli manually.

when trying to extract text out of a region with Region.text() I get the following error:
[error] script [ textTest ] stopped with error in line 2
[error] java.lang.UnsatisfiedLinkError ( java.lang.UnsatisfiedLinkError: Error looking up function 'TessPDFRendererCreateTextonly': /home/rundleja/SikuliX/libs/libtesseract.so: undefined symbol: TessPDFRendererCreateTextonly )

Im going to go through the steps I took to install and was hoping maybe someone could point out what Im doing wrong.

Linux Setup
Create workspace
1. Create folder /home/rundleja/SikuliX
2. Create folder /home/rundleja/SikuliX/libs
3. Create folder /home/rundleja/SikuliX/local
4. Copy sikulix-1.1.4.jar to /home/rundleja/SikuliX
5. Copy jython-standalone-2.7.1.jar to /home/rundleja/SikuliX
6. Copy the sources folder to /home/rundleja/SikuliX
**sources contains tesseract-3.04.01.tar.gz ,leptonica-1.78.0.tar.gz,opencv-3.4.7.zip

Compile OpenCV
1. Extract opencv-3.4.7.zip to /home/rundleja/SikuliX/sources/opencv-3.4.7
2. cd into opencv-3.4.7
3. mkdir build
4. cd build
5. run: cmake ..
6. Edit CMakeCache.txt and modify the variable CMAKE_INSTALL_PREFIX. Set it to /home/rundleja/SikuliX/sources/opencv-3.4.7_install
7. run: make install
8. cd /home/rundleja/SikuliX/libs
9. run: ln -s ../sources/opencv-3.4.7-install/share/OpenCV/java/libopencv_java347.so libopencv_java.so

Compile Leptonica:
1. Extract leptonica-1.78.0.tar.gz to /home/rundleja/SikuliX/sources/leptonica-1.78.0 or something
2. cd leptonica-1.78.0
3. run: ./configure --prefix=/home/rundleja/SikuliX/local
4. run: make
5. run: make install

Compile Tesseract:
1. Extract tesseract-3.04.01.tar.gz to /home/rundleja/SikuliX/sources/tesseract-3.04.01 or something
2. cd tesseract-3.04.01
3. run: ./autogen.sh
4. export PKG_CONFIG_PATH=/home/rundleja/SikuliX/local/lib/pkgconfig
5. export LIBLEPT_HEADERSDIR=/home/rundleja/SikuliX/local/include/leptonica
6. run ./configure -prefix=/home/rundleja/SikuliX/local/ --enable-debug --with-extra-includes=/home/rundleja/SikuliX/local/include/leptonica
7. export LDFLAGS="-L/home/rundleja/SikuliX/local/lib"
8. export CFLAGS="-I/home/rundleja/SikuliX/local/include"
9. make
10. make install
** At this point I tried to run the find text part and it came up with the message that it couldnt find the libtesseract.so. So then I did the following******
11.run: ln -s /home/rundleja/SikuliX/sources/tesseract-3.04.01/api/.libs/libtesseract.so /home/rundleja/SikuliX/libs (where i have libopencv_java.so)

1. Open terminal
2. Run: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/rundleja/SikuliX/libs
3. Then run: java -jar sikulix-1.1.4.jar

At a loss for whats going on. The text recognition so far seems to be the only factor not working!

Thanks so much for taking the time to look at this.

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1
James Rundle (jamesamrundle) said : #2

Hi, thanks for the reply. I look at the sikuliversion.txt file contained in the Settings folder of my sikuli jar and this is what im seeing



Looks like its still ok for me to be running tess 3?

RaiMan (raimund-hocke) said : #3


Can you help with this problem?

Provide an answer of your own, or ask James Rundle for more information if necessary.

To post a message you must log in.