Hello, I'm trying to launch java with awt on Freescale i.MX28, but I have a problem with libXtst and libXi.
I need this files, but link is not available: http://www.imxdev.org/wiki/images/9/91/Libxtst_libxi_specs.tar.gz
So, I find files on http://packages.ubuntu.com/en/utopic/libxtst-dev
then put
libXi.spec in ltib
/dist/lfs-5
.1
/libXi/
libXtst.spec in ltib
/dist/lfs-5
.1
/libXtst/
.tar and .patch in ltib/rpm/SOURCES
and add into ltib/config/userspace/packages.lkc
config PKG_LIBXI
depends CAP_HAS_MMU
select PKG_XORG_SERVER
select PKG_LIBXMU
select PKG_LIBXPM
bool "libXi"
help
X.Org X11 libXi runtime library
config PKG_LIBXTST
depends CAP_HAS_MMU
select PKG_XORG_SERVER
select PKG_LIBXMU
select PKG_LIBXPM
bool "libXtst"
help
X.Org X11 libXtst runtime library
and into ltib/config/userspace/pkg_map
PKG_LIBXI = libXi
PKG_LIBXTST = libXtst
After that I find packages libXtst and libXi in ./ltib -m confid in X11 package.
But when I do ./ltib, I get this error:
Processing: libXi
===================
dropping %name-%version.tar
in spec token: sources
dropping %name-%version-%release.patch
in spec token: patches
Build path taken because: no prebuilt rpm,
Use of uninitialized value $file in concatenation (.) or string at ./ltib line 780.
Use of uninitialized value $file in concatenation (.) or string at ./ltib line 780.
rpmbuild --dbpath /home/ubuntu/Projects/TionPro28/ltib/ltib/rootfs//var/lib/rpm --target arm --define '_unpackaged_files_terminate_build 0' --define '_target_cpu arm' --define '__strip strip' --define '_topdir /home/ubuntu/Projects/TionPro28/ltib/ltib/rpm' --define '_prefix /usr' --define '_tmppath /home/ubuntu/Projects/TionPro28/ltib/ltib/tmp' --define '_rpmdir /home/ubuntu/Projects/TionPro28/ltib/ltib/rpm/RPMS' --define '_mandir /usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir /var' -bb --clean --rmsource /home/ubuntu/Projects/TionPro28/ltib/ltib/dist/lfs-5.1/libXi/libXi.spec
Building target platforms: arm
Building for target arm
error: failed build dependencies:
asciidoc is needed by libXi-1.7.4-alt1
libX11-devel is needed by libXi-1.7.4-alt1
libXext-devel is needed by libXi-1.7.4-alt1
libXfixes-devel is needed by libXi-1.7.4-alt1
xmlto is needed by libXi-1.7.4-alt1
xorg-inputproto-devel is needed by libXi-1.7.4-alt1
xorg-sgml-doctools is needed by libXi-1.7.4-alt1
xorg-util-macros is needed by libXi-1.7.4-alt1
Build time for libXi: 0 seconds
Failed building libXi
I try apt-get install, but there is no changes. Something wrong with dependencies? Can anybody help me with this dependencies or advise another way of installing libXtst and libXi?
Thanks in advance
Solved! Go to Solution.
Please check if X11 is selected in LTIB.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Yes, X11 is selected
Is it possible to try using the Freescale demo image (Gnome) with Java ?
(the demo should contain all libs)
~Yuri.
I didn't try demo image, yet. I don't know about it, can you tell me about How to instal demo?
But I want try to do something with my image. Can you tell about X11 and libXtst? Should I select packages libXtst and libXi (which I created in my first message), or it is not nessesary? And if I should, which libXtst.spec and libXi.spec I must use? Maybe you have this files http://www.imxdev.org/wiki/images/9/91/Libxtst_libxi_specs.tar.gz ?
And one more question. If I not selected the libXtst and libXi in packages of X11 (may be I added them incorrectly? ), ./tlib compile with success, and on i.MX java -jar with output in console run, everything is OK. But when I run java -jar with awt, I get this message:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /ejdk1.8.0_06/linux_a
rm_sflt/jre/lib/arm/libawt_xawt.so: libXtst.so.6: cannot open shared object file
: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1083)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1835)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at java.awt.Toolkit$3.run(Toolkit.java:1651)
at java.awt.Toolkit$3.run(Toolkit.java:1649)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1648)
at java.awt.Toolkit.<clinit>(Toolkit.java:1683)
at java.awt.Component.<clinit>(Component.java:595)
I have libXtst.so.6 in usr/lib.
1.
I will send You the link to download the demo: it is just SD image copy with Linux command dd.
If Java apps will be working (after JVM istalling) with this system it is possible just to change
kernel (if needed) and use the filesystem as is.
2.
I do not have this file http://www.imxdev.org/wiki/images/9/91/Libxtst_libxi_specs.tar.gz ?
(I tried searching all available for me resources.)
~Yuri.
Hello again, I want to ask one more question. You told me about building libXtst and libXi packages from sources. I have no idea, how to do it and which sources look for. Could you tell, how to do it? Thanks in advance
Oh, thank you for this links, finally I succesfully built libXtst and libXi packages!
There is no more libXtst.so.6 error.
But I got another problem, which I need to solve. When I run java -jar with awt, I get this message:
Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server
using ':0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:122)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at java.awt.Toolkit$2.run(Toolkit.java:872)
at java.awt.Toolkit$2.run(Toolkit.java:865)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:864)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1749)
at java.awt.EventQueue.invokeLater(EventQueue.java:1245)
at Main.GoTest.main(GoTest.java:63)
I tried to set DISPLAY variable = ":0" and ":0.0" and just "0" (without quotes). It seems, that problem in X11 server. How to start it?
When I print Xfbdev or startx, I get:
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/freescale:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
mxsfb_pan_display: var->xoffset 0, info->var.xoffset 0
mxsfb_check_var: xres 640, yres 480, bpp 16
get_matching_pentry: 480:640:16 vs 480:640:16
get_matching_pentry: 480:640:16 vs 480:640:16
mxsfb_pan_display: var->xoffset 0, info->var.xoffset 0
(EE) XKB: Couldn't open rules file /usr/share/X11/xkb/rules/base
(EE) XKB: No components provided for device Virtual core keyboard
or this one:
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/freescale:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
mxsfb_pan_display: var->xoffset 0, info->var.xoffset 0
mxsfb_check_var: xres 640, yres 480, bpp 16
get_matching_pentry: 480:640:16 vs 480:640:16
get_matching_pentry: 480:640:16 vs 480:640:16
mxsfb_pan_display: var->xoffset 0, info->var.xoffset 0
syntax error: line 1416 of pc
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error: Error interpreting include file "pc"
> Exiting
> Abandoning geometry file "default"
Errors from xkbcomp are not fatal to the X server
(EE) Error compiling keymap (server-0)
(EE) XKB: Couldn't compile keymap
syntax error: line 1416 of pc
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error: Error interpreting include file "pc"
> Exiting
> Abandoning geometry file "default"
Errors from xkbcomp are not fatal to the X server
(EE) Error compiling keymap (server-0)
(EE) XKB: Couldn't compile keymap
What I can do now?
I hope, it will be the last problem with running java awt)
Thanks in advance
--------------------------
Well,
export DISPLAY=:0
export TSLIB_TSDEVICE=/dev/input/ts0
Xfbdev -mouse tslib,2,device=/dev/input/ts0 &
solved this error, but I saw my java application on VGA monitor, but not on touchscreen. I created for this another topic. Thanks for your help!!!
Please check xorg.conf file
As for "I hope, it will be the last problem with running java awt)" : Оптимист однако !
~Yuri.