SikuliJavaAPI: Linux: libVisionProxy.so: libml.so.2.1 missing

Asked by AndreAnastacio

reference page: https://code.google.com/p/sikuli-api/
---------------------------------------------------------------------------

solved the problem!

Compiled and Installed OpenCV 2.4 - https://gist.github.com/4194910
runs JRuby with Sikuli-API. - https://gist.github.com/4195129

-------------------------------------------------------------------------------------

with sikuli-ide works fine, but with jruby take this error

java.lang.UnsatisfiedLinkError: /tmp/tmplib/libVisionProxy.so: libml.so.2.1: cannot open shared object file: No such file or directory (NativeException)
      java/lang/ClassLoader.java:-2:in `load'
      java/lang/ClassLoader.java:1750:in `loadLibrary0'
      java/lang/ClassLoader.java:1646:in `loadLibrary'
      java/lang/Runtime.java:787:in `load0'
      java/lang/System.java:1022:in `load'
      com/wapmx/nativeutils/jniloader/NativeLoader.java:44:in `loadLibrary'
      org/sikuli/script/Finder.java:33:in `<clinit>'
      org/sikuli/script/Region.java:1029:in `doFind'
      org/sikuli/script/Region.java:1232:in `run'
      org/sikuli/script/Region.java:1203:in `repeat'
      org/sikuli/script/Region.java:497:in `wait'
      org/sikuli/script/Region.java:381:in `find'
      org/sikuli/script/Region.java:1129:in `getLocationFromPSRML'
      org/sikuli/script/Region.java:606:in `click'
      java/lang/ClassLoader.java:-2:in `load'
      java/lang/ClassLoader.java:1750:in `loadLibrary0'
      java/lang/ClassLoader.java:1646:in `loadLibrary'
      java/lang/Runtime.java:787:in `load0'
      java/lang/System.java:1022:in `load'
      com/wapmx/nativeutils/jniloader/NativeLoader.java:44:in `loadLibrary'
      org/sikuli/script/Finder.java:33:in `<clinit>'
      org/sikuli/script/Region.java:1029:in `doFind'
      org/sikuli/script/Region.java:1232:in `run'
      org/sikuli/script/Region.java:1203:in `repeat'
      org/sikuli/script/Region.java:497:in `wait'
      org/sikuli/script/Region.java:381:in `find'
      org/sikuli/script/Region.java:1129:in `getLocationFromPSRML'
      org/sikuli/script/Region.java:606:in `click'
      /home/andreanastacio/Workspace/Project/sikuli_ruby/lib/sikuli/clickable.rb:185:in `click_image'
      /home/andreanastacio/Workspace/Project/sikuli_ruby/lib/sikuli/clickable.rb:21:in `click'
      ./features/step_definitions/example_steps.rb:3:in `(root)'
      org/jruby/RubyKernel.java:2091:in `instance_exec'
      org/jruby/RubyArray.java:1620:in `each'
      org/jruby/RubyProc.java:270:in `call'
      org/jruby/RubyProc.java:220:in `call'
      org/jruby/RubyProc.java:270:in `call'
      org/jruby/RubyProc.java:220:in `call'
      org/jruby/RubyProc.java:270:in `call'
      org/jruby/RubyProc.java:220:in `call'
      org/jruby/RubyArray.java:1620:in `each'
      org/jruby/RubyArray.java:1620:in `each'
      org/jruby/RubyKernel.java:1087:in `load'
      org/jruby/RubyKernel.java:1112:in `eval'

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
AndreAnastacio
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

You are running Sikuli on a Linux, where Tesseract 2.01 is not installed (latest Ubunt's e.g. come with Tesseract 3 installed in the standard).

The current Sikuli excpects Tesseract 2.01

There are some questions in this board about that and you might find some answers on the net, how to get it ready for your Linux.

Revision history for this message
AndreAnastacio (andre-anastacio) said :
#2

Ubuntu 12.04

Tesseract 3.0 uninstalled

(Source https://launchpad.net/ubuntu/+source/tesseract/2.01-1 )
Tesseract 2.01 Compiled ("./configure" and "make") and Installed ("sudo make install")

however the error remains.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Sorry, for the misleading:

the libml belongs to the OpenCV stuff.

(but the Tesseract 2.01 will be needed anyway)

So check your OpenCV installation and first try with symlinks.

Revision history for this message
AndreAnastacio (andre-anastacio) said :
#4

which version of OpenCV?

Revision history for this message
RaiMan (raimund-hocke) said :
#5

your Sikuli seems to look for OpenCV 2.1

But even if you have 2.2, 2.3 or 2.4 installed, you might first try to make a symlink libml.so.2.1 to the existing libel.so.2.x and then for all the others if this helps.

Revision history for this message
AndreAnastacio (andre-anastacio) said :
#6

I have installed via apt-get and compile/install (https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_0.sh)

but i don't find the libml.so with " sudo find . 'libml.so*' "

Revision history for this message
AndreAnastacio (andre-anastacio) said :
#7

sudo find . -name 'libml.so*

Revision history for this message
RaiMan (raimund-hocke) said :
#8

I do not have a Linux at hand, but on my Mac, the OpenCV 2.4 libs are named
libopencv_ml...

So you should look for libopencv

Revision history for this message
AndreAnastacio (andre-anastacio) said :
#9

sudo ln -s /usr/local/lib/libopencv_ml.so.2.4 /usr/lib/libml.so.2.1
sudo ln -s /usr/local/lib/libopencv_highgui.so.2.4.2 /usr/lib/libhighgui.so.2.1
sudo ln -s /usr/local/lib/libopencv_core.so.2.4.2 /usr/lib/libcxcore.so.2.1

find and ldd output
https://gist.github.com/4168177

but i don't find the 'cvaux' and 'cv'.

Revision history for this message
RaiMan (raimund-hocke) said :
#10

the switch from the old module structure in OpenCV to the new one was from 2.1 to 2.2
there is no information available on the net, that tells wether it is possible to symlink these modules to newer ones.
the features seem to be splitted across the new modules.

the newest versions of Sikuli are compatible with this new structure.

So you either try a newer Sikuli version (sikuli.org/downloads) or you get an openCV 2.1 on your machine.

Revision history for this message
AndreAnastacio (andre-anastacio) said :
#11

with Sikuli latest version + OpenCV 2.4

 $ sudo ldd ~/Workspace/Sikuli-IDE/libs/libVisionProxy.so
 not a dynamic executable

Sikuli-IDE doesn't open.

 $ sh sikuli-ide.sh
[info] locale: en_US

Run JRuby + Sikuli

java.lang.UnsatisfiedLinkError: /tmp/tmplib/libVisionProxy.so: /tmp/tmplib/libVisionProxy.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) (NativeException)

Make OpenCV 2.1 and 2.2 return error in 46%
https://gist.github.com/4168853

#fml

Revision history for this message
AndreAnastacio (andre-anastacio) said :
#12

solved the problem!

Compiled and Installed OpenCV 2.4 - https://gist.github.com/4194910
runs JRuby with Sikuli-API. - https://gist.github.com/4195129 (Sorry for my code, but works :D)

Sorry for my English.

Revision history for this message
RaiMan (raimund-hocke) said :
#13

I put your solution references to the top.

Never be sorry for anything like bad english or for coding ;-)

Since it does not hurt anyone, no need to be sorry.

What counts is the solution and sometimes the way to get there.

All the best.