[1.1.0] Linux: setup: how to generate a working libVisionProxy.so

Asked by Raghavender

Hi ,

I have installed Robotframework3.0 in a linux server. Installed SikuliLibrary and all other dependencies (OpenCV, wmctrl, xdotool, tesseract).

I have started remote server using this command " java -jar /usr/jython/Lib/site-packages/SikuliLibrary/lib/SikuliLibrary.jar 10000"

and run the following commands in another instance of same server:

root@xxxx123# jython
Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[Java HotSpot(TM) Server VM (Oracle Corporation)] on java1.8.0_91
Type "help", "copyright", "credits" or "license" for more information.
>>> from robot.libraries.Remote import Remote
>>> remote=Remote('http://127.0.0.1:10000/')
>>> remote.get_keywordnames()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Remote' object has no attribute 'get_keywordnames'
>>> remote.get_keyword_names()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/jython/Lib/site-packages/robotframework-3.0-py2.7.egg/robot/librari
    raise RuntimeError('Connecting remote server at %s failed: %s'
RuntimeError: Connecting remote server at http://127.0.0.1:10000/ failed: [Errno

root@xxxx123# java -jar /usr/jython/Lib/site-packages/SikuliLibrary/lib/SikuliLibrary.jar 10000

0 [main] INFO org.robotframework.remoteserver.RemoteServer - Mapped path / to library com.github.rainmanwy.robotframework.sikulilib.SikuliLibrary.
1 [main] INFO org.robotframework.remoteserver.RemoteServer - Robot Framework remote server starting
1 [main] INFO org.eclipse.jetty.server.Server - jetty-7.x.y-SNAPSHOT
34 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.s.ServletContextHandler{/,null}
117 [main] INFO org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector@0.0.0.0:10000
117 [main] INFO org.robotframework.remoteserver.RemoteServer - Robot Framework remote server started on port 10000.
[info] runcmd: lsb_release -i -r -s
[error] RunTimeAPI: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: libopencv_core.so.2.4: cannot open shared object file: No such file or directory
[error] RunTimeAPI: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: libopencv_core.so.2.4: cannot open shared object file: No such file or directory
[info] runcmd: ldconfig -p
[info] runcmd: wmctrl -m
[error] LinuxSupport: checking: wmctrl not available or not working
[info] runcmd: xdotool version
[error] LinuxSupport: checking: xdotool not available or not working
[info] runcmd: /root/.Sikulix/sikulixlibs/linux/runBuild
[info] runcmd: ldd -r /root/.Sikulix/sikulixlibs/linux/Build/Target/libVisionProxy.so
[error] LinuxSupport: checking: might not work, has undefined symbols: libVisionProxy.so
[error] LinuxSupport: ------- output of the build run
0
----------- COMPILING
----- cvgui.cpp
----- finder.cpp
----- pyramid-template-matcher.cpp
----- sikuli-debug.cpp
----- tessocr.cpp
----- vision.cpp
----- visionJAVA_wrap.cxx
----------- LINKING

[error] RunTimeAPI: Problematic lib: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so (...TEMP...)
[error] RunTimeAPI: libVisionProxy.so loaded, but it might be a problem with needed dependent libraries
ERROR: ...TEMP...: libopencv_core.so.2.4: cannot open shared object file: No such file or directory
[error] RunTimeAPI: *** terminating: problem with native library: libVisionProxy.so

looks like some libraries( libVisionProxy.so, libopencv_core.so.2.4)are missing, if this is true from where can i get these?

Regards,
Raghu

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Raghavender
Solved:
Last query:
Last reply:
Revision history for this message
wang yang (wang-yang1980) said :
#1

How do you installed robotframework-sikulilibrary? pip or source installation(through maven to package and install yourself).

You may download the linux version from pypi https://pypi.python.org/packages/9d/13/cc02d08884d51f10f6d98b7c7e703c32ae8692e6e88b549e08f8d78a0777/robotframework-SikuliLibrary-0.1.5-linux.zip#md5=c67715e57d54a32fb902c38b3ff5d50a
And have a try.

"libVisionProxy.so" is included in SikuliLibrary.jar for linux version.

And have your installed sikuli ide, whether it works?

Revision history for this message
Raghavender (raghu6519) said :
#2

Hi Wang,

I have built Sikuli Library using maven. but when i try to fetch keywords got the following error.

root@xxxx123# java -jar /usr/jython/Lib/site-packages/SikuliLibrary/lib/SikuliLibrary.jar 10000
0 [main] INFO org.robotframework.remoteserver.RemoteServer - Mapped path / to library com.github.rainmanwy.robotframework.sikulilib.SikuliLibrary.
1 [main] INFO org.robotframework.remoteserver.RemoteServer - Robot Framework remote server starting
1 [main] INFO org.eclipse.jetty.server.Server - jetty-7.x.y-SNAPSHOT
32 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.s.ServletContextHandler{/,null}
111 [main] INFO org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector@0.0.0.0:10000
111 [main] INFO org.robotframework.remoteserver.RemoteServer - Robot Framework remote server started on port 10000.
[info] runcmd: lsb_release -i -r -s
Java HotSpot(TM) Server VM warning: You have loaded library /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
[error] RunTimeAPI: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
[error] RunTimeAPI: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
[info] runcmd: ldconfig -p
[info] runcmd: wmctrl -m
[info] runcmd: xdotool version
[info] runcmd: /root/.Sikulix/sikulixlibs/linux/runBuild
[info] runcmd: ldd -r /root/.Sikulix/sikulixlibs/linux/Build/Target/libVisionProxy.so
[error] RunTimeAPI: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
[error] RunTimeAPI: Problematic lib: /root/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so (...TEMP...)
[error] RunTimeAPI: libVisionProxy.so loaded, but it might be a problem with needed dependent libraries
ERROR: ...TEMP...: ...TEMP...: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
[error] RunTimeAPI: *** terminating: problem with native library: libVisionProxy.so

libVisionProxy.so is present in sikulixlibs/linux/lib64/ directory i think it is searching for libVisionProxy.so in this path /root/.Sikulix/SikulixLibs_201510081336/, whereas file is already present in sikulixlibs folder.

i have tried to install suikuliIDE but it is also failing with the same error.

Regards,
Raghavender

Revision history for this message
Raghavender (raghu6519) said :
#3

Hi Wang,

Problem was with java.

Java 32 bit version was installed in my system, whereas my system is 64 bit. once 64 bit java is installed all error are gone.

Thanks you for you support.

Regards,
Raghavender