Ubuntu on ARM device: problems building libJXGrabKey

Asked by Jerry Liu

We have an ARM Panda Box. The device has Ubuntu 10.10 installed.
We build Sikuli from source code on it. When launch, the following error occurs:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/tiliu/Sikuli-X-1.0rc2-linux/Sikuli-IDE/libs/libJXGrabKey.so: /home/tiliu/Sikuli-X-1.0rc2-linux/Sikuli-IDE/libs/libJXGrabKey.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
 at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
 at java.lang.Runtime.load0(Runtime.java:787)
 at java.lang.System.load(System.java:1022)
 at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
 at org.sikuli.ide.NativeLayerForLinux.initIDE(NativeLayerForLinux.java:24)
 at org.sikuli.ide.SikuliIDE.<init>(SikuliIDE.java:661)
 at org.sikuli.ide.SikuliIDE.getInstance(SikuliIDE.java:130)
 at org.sikuli.ide.SikuliIDE.main(SikuliIDE.java:913)

Then we download source code of libJXGrabKey from http://anonscm.debian.org/gitweb/?p=collab-maint/jxgrabkey.git;a=summary, and re-build it on the ARM device. It brings us another error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/tiliu/Sikuli-X-1.0rc3-linux-armv7l/Sikuli-IDE/libs/libJXGrabKey.so: /home/tiliu/Sikuli-X-1.0rc3-linux-armv7l/Sikuli-IDE/libs/libJXGrabKey.so: undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
 at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
 at java.lang.Runtime.load0(Runtime.java:787)
 at java.lang.System.load(System.java:1022)
 at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
 at org.sikuli.ide.NativeLayerForLinux.initIDE(NativeLayerForLinux.java:29)
 at org.sikuli.ide.SikuliIDE.<init>(SikuliIDE.java:666)
 at org.sikuli.ide.SikuliIDE.getInstance(SikuliIDE.java:135)
 at org.sikuli.ide.SikuliIDE.main(SikuliIDE.java:918)

So we are blocked here. Could you please let us know how to get Sikuli work on the ARM device?
It may also be helpful if you could provide us the source code of libJXGrabKey you use to build Sikuli.

Thank you very much.
Jerry

Question information

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

The original source is available here: http://sourceforge.net/projects/jxgrabkey/

Sikuli uses the latest version.

The problem might be, that you have to build the jar AND the native libs.

Revision history for this message
Zhi (linzhi1998) said :
#2

We get the latest version jxgrabkey-0.3.2 from http://sourceforge.net/projects/jxgrabkey/.
But when we build the jar, it brings us the following error:

Buildfile: /home/tiliu/zhilib/jxgrabkey-0.3.2/JXGrabKey/Java/build.xml

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-macrodef-javac:

-init-macrodef-junit:

-init-debug-args:

-init-macrodef-nbjpda:

-init-macrodef-debug:

-init-macrodef-java:

-init-presetdef-jar:

init:

deps-jar:

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-pre-pre-compile:

-pre-compile:

-compile-depend:

-do-compile:

-post-compile:

compile:

-pre-pre-compile-test:

-pre-compile-test:

-compile-test-depend:

-do-compile-test:

-post-compile-test:

compile-test:

-pre-test-run:

-do-test-run:
    [junit] Testsuite: jxgrabkey.JXGrabKeyTest
    [junit] Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: jxgrabkey.JXGrabKey.listen()V
    [junit] at jxgrabkey.JXGrabKey.listen(Native Method)
    [junit] at jxgrabkey.JXGrabKey.access$000(JXGrabKey.java:30)
    [junit] at jxgrabkey.JXGrabKey$1.run(JXGrabKey.java:47)
    [junit] Tests run: 0, Failures: 0, Errors: 2, Time elapsed: 0.281 sec
    [junit]
    [junit] ------------- Standard Error -----------------
    [junit] Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: jxgrabkey.JXGrabKey.listen()V
    [junit] at jxgrabkey.JXGrabKey.listen(Native Method)
    [junit] at jxgrabkey.JXGrabKey.access$000(JXGrabKey.java:30)
    [junit] at jxgrabkey.JXGrabKey$1.run(JXGrabKey.java:47)
    [junit] ------------- ---------------- ---------------
    [junit] Testcase: jxgrabkey.JXGrabKeyTest: Caused an ERROR
    [junit] /home/tiliu/zhilib/jxgrabkey-0.3.2/JXGrabKey/C++/dist/Release/GNU-Linux-x86/libJXGrabKey.so: /home/tiliu/zhilib/jxgrabkey-0.3.2/JXGrabKey/C++/dist/Release/GNU-Linux-x86/libJXGrabKey.so: undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
    [junit] java.lang.UnsatisfiedLinkError: /home/tiliu/zhilib/jxgrabkey-0.3.2/JXGrabKey/C++/dist/Release/GNU-Linux-x86/libJXGrabKey.so: /home/tiliu/zhilib/jxgrabkey-0.3.2/JXGrabKey/C++/dist/Release/GNU-Linux-x86/libJXGrabKey.so: undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE
    [junit] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    [junit] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
    [junit] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
    [junit] at java.lang.Runtime.load0(Runtime.java:787)
    [junit] at java.lang.System.load(System.java:1022)
    [junit] at jxgrabkey.JXGrabKeyTest.setUpClass(JXGrabKeyTest.java:18)
    [junit]
    [junit]
    [junit] Testcase: jxgrabkey.JXGrabKeyTest: Caused an ERROR
    [junit] jxgrabkey.JXGrabKey.clean()V
    [junit] java.lang.UnsatisfiedLinkError: jxgrabkey.JXGrabKey.clean()V
    [junit] at jxgrabkey.JXGrabKey.clean(Native Method)
    [junit] at jxgrabkey.JXGrabKey.cleanUp(JXGrabKey.java:95)
    [junit] at jxgrabkey.JXGrabKeyTest.tearDownClass(JXGrabKeyTest.java:25)
    [junit]
    [junit]
    [junit] Test jxgrabkey.JXGrabKeyTest FAILED

test-report:

-post-test-run:

BUILD FAILED
/home/tiliu/zhilib/jxgrabkey-0.3.2/JXGrabKey/Java/nbproject/build-impl.xml:611: Some tests failed; see details above.

Total time: 4 seconds

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

Might be better to look for a solution in the net elsewhere (Ubuntu, ARM based systems, ...)

Revision history for this message
Zhi (linzhi1998) said :
#4

It works in the ARM Panda Box now.

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

Congratulations

and what was the solution?

Revision history for this message
Zhi (linzhi1998) said :
#6

Can you help with this problem?

Provide an answer of your own, or ask Jerry Liu for more information if necessary.

To post a message you must log in.