public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH, boehm-gc: silence warning
@ 2009-11-30  4:28 Ben Elliston
  2009-11-30 10:07 ` Andrew Haley
  0 siblings, 1 reply; 8+ messages in thread
From: Ben Elliston @ 2009-11-30  4:28 UTC (permalink / raw)
  To: java, gcc-patches; +Cc: aph

When compiling mark_rts.c, GCC warns about taking the address of a local
variable.  This is not a bug, but an explicit hack to get the
approximate address of a new stack frame, to calculate the limits of the
current frame.  There is a cleaner way to do this with GCC: use
__builtin_frame_address.  My reading of the code suggests that this will
work just as well.

Tested with a bootstrap on x86_64-linux and a full regression testsuite
run, including make check-target-boehm-gc. Okay for mainline?

2009-11-30  Ben Elliston  <bje@au.ibm.com>

	* mark_rts.c (GC_approx_sp): Use __builtin_frame_address when
	compiling with GCC rather than taking the address of a local
	variable.

Index: mark_rts.c
===================================================================
--- mark_rts.c	(revision 154749)
+++ mark_rts.c	(working copy)
@@ -376,7 +376,13 @@ ptr_t GC_approx_sp()
 #   ifdef _MSC_VER
 #     pragma warning(disable:4172)
 #   endif
-    return((ptr_t)(&dummy));
+#ifdef __GNUC__
+    /* Eliminate a warning from GCC about taking the address of a
+       local variable.  */
+    return __builtin_frame_address (0);
+#else
+    return ((ptr_t)(&dummy));
+#endif /* __GNUC__ */
 #   ifdef _MSC_VER
 #     pragma warning(default:4172)
 #   endif


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PATCH, boehm-gc: silence warning
  2009-11-30  4:28 PATCH, boehm-gc: silence warning Ben Elliston
@ 2009-11-30 10:07 ` Andrew Haley
  2012-01-10 23:40   ` Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath Yannick
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Haley @ 2009-11-30 10:07 UTC (permalink / raw)
  To: Ben Elliston; +Cc: java, gcc-patches

Ben Elliston wrote:
> When compiling mark_rts.c, GCC warns about taking the address of a local
> variable.  This is not a bug, but an explicit hack to get the
> approximate address of a new stack frame, to calculate the limits of the
> current frame.  There is a cleaner way to do this with GCC: use
> __builtin_frame_address.  My reading of the code suggests that this will
> work just as well.
> 
> Tested with a bootstrap on x86_64-linux and a full regression testsuite
> run, including make check-target-boehm-gc. Okay for mainline?

OK, but make sure this goes upstream to gc@linux.hpl.hp.com

Andrew.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath
  2009-11-30 10:07 ` Andrew Haley
@ 2012-01-10 23:40   ` Yannick
  2012-01-10 23:53     ` Brian Jones
  2012-01-11  9:05     ` Mark Wielaard
  0 siblings, 2 replies; 8+ messages in thread
From: Yannick @ 2012-01-10 23:40 UTC (permalink / raw)
  To: java

Hello,

I try to create a Java J2SE (Java Desktop) port to HP webOS with Gnu
Claspath and JamVVM.

You can find my working page here :
Building JamVM and GNU Classpath and Jikes (for Java support in webOS)
with scratchbox2
http://www.webos-internals.org/wiki/Building_JamVM_and_GNU_Classpath_and_Jikes_%28for_Java_support_in_webOS%29_with_scratchbox2

All the compilation options and installation steps for Gnu Classpath 0.98,
escher 0.3.0, javm 1.5.4 are detailed in the web page here :
http://www.webos-internals.org/wiki/Building_JamVM_and_GNU_Classpath_and_Jikes_%28for_Java_support_in_webOS%29_with_scratchbox2

1) I patch Gnu Classpath 0.98 with the patch here
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41057 to compile and install
it with
escher 0.3.0.

2) I use this line for compiling Gnu Classpath :
LDFLAGS="-L/usr/local/lib -Wl,-rpath=/media/internal/opt/lib"
CPPFLAGS="-I/usr/local/include" ./configure --prefix=/media/internal/opt
--disable-examples --with-x --disable-gtk-peer --disable-gconf-peer
--disable-plugin --disable-alsa --disable-dssi
--with-escher=/home/ubuntu/java-project/escher-0.3/src
--enable-local-sockets
--enable-collections --enable-xmlj

3) Makefile for X server binaries on webos :
http://git.webos-internals.org/preware/cross-compile/tree/packages/x/xserver-package/Makefile

4) Packagind and script to use X server on webOS :
http://git.webos-internals.org/x11/xserver/tree/

My problem is that escher, a Java lib that is a Java client, can not
connect to
the X server or that Gnu Classpath can find the escher lib/java classes.
How works escher : http://marcosroriz.wordpress.com/2010/06/14/gsoc-updates/

In my webOS process list, I have :

root@Palm
Pre:/media/cryptofs/apps/usr/palm/applications/org.webosinternals.xserver/bin#
ps -edf
...
root 1902 1 2 04:38 ? 00:00:38
/media/cryptofs/apps/usr/palm/applications/org.webosinternals.xserver/bin/Xsdl
-retro -noreset :0.0
root 1936 1 0 04:38 ? 00:00:00
/media/cryptofs/apps/usr/palm/applications/org.webosinternals.xterm/bin/xterm
-display :0.0 -maximize -xrm *metaSendsEscape: true -u8 -e login -p -f root
...

When I launch the JRE and with Xterm started, I have the following error
message :

root@Palm Pre:/media/internal# /media/internal/opt/bin/jamvm HelloWorld
-bootclasspath
/media/internal/opt/share/jamvm/classes.zip:/media/internal/opt/share/classpath/glibj.zip:/media/internal/
opt/share/classpath/escher-0.3.jar:/media/internal/opt/share/classpath/collections.jar
HelloWorld -Dawt.toolkit=gnu.java.awt.peer.x.XToolkit HelloWorld
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
gnu.java.awt.peer.gtk.GtkToolkit
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
at java.awt.Window.(Window.java:133)
at java.awt.Frame.(Frame.java:246)
at java.awt.Frame.(Frame.java:234)
at HelloWorld.(HelloWorld.java:7)
at HelloWorld.main(HelloWorld.java:5)
Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not
found
(as file `libgtkpeer.so') in gnu.classpath.boot.library.path and
java.library.path
at java.lang.Runtime.loadLibrary(Runtime.java:763)
at java.lang.System.loadLibrary(System.java:670)
at gnu.java.awt.peer.gtk.GtkToolkit.(GtkToolkit.java:177)
at java.lang.VMClass.forName(Native Method)
at java.lang.Class.forName(Class.java:233)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
...6 more
But here Gnu Classpath is not compiled to use libgtkpeer.so (c/C++ lib
with Qt
or GTK) but escher java lib.
And I found no error when I launch it in webos /var/log/messages file.

In escher documentation on the Internet, I found that :
* To test X Awt peer, you must remove "-nolisten TCP" from XServer start
script.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41057
*in console type the command line xhost+
http://rbytes.net/linux/escher-review/
The problem is that I can not change the XServer start script used by webOS.
I have no xhost script or binary on my webOS device.

Here : http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41057
I found a patch that I have applied on Gnu Classpath 0.98 to use it with
escher
0.3.0
and in the diff for this patch :
http://gcc.gnu.org/bugzilla/attachment.cgi?id=18352&action=diff
you can find the line
display = new Display(socket, "localhost", displayName.display_no,
displayName.screen_no);

Do I need to use login and a password  for connexion with the X server
on webOS
device ?

Can you help me to :
1) to check that all is OK with escher and my Gnu Classpath ?
2) to check conexion problem between Gnu Classpath/escher and the X server ?

My goal is to create the webOS internals's Java Desktop PDK for webOS as
webOS
PDK with C/C++.

Thank you for your help.

Best regards

Yannick

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath
  2012-01-10 23:40   ` Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath Yannick
@ 2012-01-10 23:53     ` Brian Jones
  2012-01-11  9:05     ` Mark Wielaard
  1 sibling, 0 replies; 8+ messages in thread
From: Brian Jones @ 2012-01-10 23:53 UTC (permalink / raw)
  To: Yannick; +Cc: java

Ideally here you'd probably want to write peers not using X & remove
that dependency.

On Jan 10, 2012, at 6:40 PM, Yannick <yleny@laposte.net> wrote:

> Hello,
>
> I try to create a Java J2SE (Java Desktop) port to HP webOS with Gnu
> Claspath and JamVVM.
>
> You can find my working page here :
> Building JamVM and GNU Classpath and Jikes (for Java support in webOS)
> with scratchbox2
> http://www.webos-internals.org/wiki/Building_JamVM_and_GNU_Classpath_and_Jikes_%28for_Java_support_in_webOS%29_with_scratchbox2
>
> All the compilation options and installation steps for Gnu Classpath 0.98,
> escher 0.3.0, javm 1.5.4 are detailed in the web page here :
> http://www.webos-internals.org/wiki/Building_JamVM_and_GNU_Classpath_and_Jikes_%28for_Java_support_in_webOS%29_with_scratchbox2
>
> 1) I patch Gnu Classpath 0.98 with the patch here
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41057 to compile and install
> it with
> escher 0.3.0.
>
> 2) I use this line for compiling Gnu Classpath :
> LDFLAGS="-L/usr/local/lib -Wl,-rpath=/media/internal/opt/lib"
> CPPFLAGS="-I/usr/local/include" ./configure --prefix=/media/internal/opt
> --disable-examples --with-x --disable-gtk-peer --disable-gconf-peer
> --disable-plugin --disable-alsa --disable-dssi
> --with-escher=/home/ubuntu/java-project/escher-0.3/src
> --enable-local-sockets
> --enable-collections --enable-xmlj
>
> 3) Makefile for X server binaries on webos :
> http://git.webos-internals.org/preware/cross-compile/tree/packages/x/xserver-package/Makefile
>
> 4) Packagind and script to use X server on webOS :
> http://git.webos-internals.org/x11/xserver/tree/
>
> My problem is that escher, a Java lib that is a Java client, can not
> connect to
> the X server or that Gnu Classpath can find the escher lib/java classes.
> How works escher : http://marcosroriz.wordpress.com/2010/06/14/gsoc-updates/
>
> In my webOS process list, I have :
>
> root@Palm
> Pre:/media/cryptofs/apps/usr/palm/applications/org.webosinternals.xserver/bin#
> ps -edf
> ...
> root 1902 1 2 04:38 ? 00:00:38
> /media/cryptofs/apps/usr/palm/applications/org.webosinternals.xserver/bin/Xsdl
> -retro -noreset :0.0
> root 1936 1 0 04:38 ? 00:00:00
> /media/cryptofs/apps/usr/palm/applications/org.webosinternals.xterm/bin/xterm
> -display :0.0 -maximize -xrm *metaSendsEscape: true -u8 -e login -p -f root
> ...
>
> When I launch the JRE and with Xterm started, I have the following error
> message :
>
> root@Palm Pre:/media/internal# /media/internal/opt/bin/jamvm HelloWorld
> -bootclasspath
> /media/internal/opt/share/jamvm/classes.zip:/media/internal/opt/share/classpath/glibj.zip:/media/internal/
> opt/share/classpath/escher-0.3.jar:/media/internal/opt/share/classpath/collections.jar
> HelloWorld -Dawt.toolkit=gnu.java.awt.peer.x.XToolkit HelloWorld
> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
> gnu.java.awt.peer.gtk.GtkToolkit
> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
> at
> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
> at java.awt.Window.(Window.java:133)
> at java.awt.Frame.(Frame.java:246)
> at java.awt.Frame.(Frame.java:234)
> at HelloWorld.(HelloWorld.java:7)
> at HelloWorld.main(HelloWorld.java:5)
> Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not
> found
> (as file `libgtkpeer.so') in gnu.classpath.boot.library.path and
> java.library.path
> at java.lang.Runtime.loadLibrary(Runtime.java:763)
> at java.lang.System.loadLibrary(System.java:670)
> at gnu.java.awt.peer.gtk.GtkToolkit.(GtkToolkit.java:177)
> at java.lang.VMClass.forName(Native Method)
> at java.lang.Class.forName(Class.java:233)
> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
> ...6 more
> But here Gnu Classpath is not compiled to use libgtkpeer.so (c/C++ lib
> with Qt
> or GTK) but escher java lib.
> And I found no error when I launch it in webos /var/log/messages file.
>
> In escher documentation on the Internet, I found that :
> * To test X Awt peer, you must remove "-nolisten TCP" from XServer start
> script.
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41057
> *in console type the command line xhost+
> http://rbytes.net/linux/escher-review/
> The problem is that I can not change the XServer start script used by webOS.
> I have no xhost script or binary on my webOS device.
>
> Here : http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41057
> I found a patch that I have applied on Gnu Classpath 0.98 to use it with
> escher
> 0.3.0
> and in the diff for this patch :
> http://gcc.gnu.org/bugzilla/attachment.cgi?id=18352&action=diff
> you can find the line
> display = new Display(socket, "localhost", displayName.display_no,
> displayName.screen_no);
>
> Do I need to use login and a password  for connexion with the X server
> on webOS
> device ?
>
> Can you help me to :
> 1) to check that all is OK with escher and my Gnu Classpath ?
> 2) to check conexion problem between Gnu Classpath/escher and the X server ?
>
> My goal is to create the webOS internals's Java Desktop PDK for webOS as
> webOS
> PDK with C/C++.
>
> Thank you for your help.
>
> Best regards
>
> Yannick
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath
  2012-01-10 23:40   ` Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath Yannick
  2012-01-10 23:53     ` Brian Jones
@ 2012-01-11  9:05     ` Mark Wielaard
  2012-01-16 20:44       ` Yannick
  2012-01-16 20:45       ` Yannick
  1 sibling, 2 replies; 8+ messages in thread
From: Mark Wielaard @ 2012-01-11  9:05 UTC (permalink / raw)
  To: Yannick; +Cc: java, classpath

Hi Yannick,

The classpath list is probably the best to discuss this problem (CCed).

On Wed, 2012-01-11 at 00:30 +0100, Yannick wrote:
> When I launch the JRE and with Xterm started, I have the following error
> message :
> 
> root@Palm Pre:/media/internal# /media/internal/opt/bin/jamvm HelloWorld
> -bootclasspath
> /media/internal/opt/share/jamvm/classes.zip:/media/internal/opt/share/classpath/glibj.zip:/media/internal/
> opt/share/classpath/escher-0.3.jar:/media/internal/opt/share/classpath/collections.jar
> HelloWorld -Dawt.toolkit=gnu.java.awt.peer.x.XToolkit HelloWorld
> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
> gnu.java.awt.peer.gtk.GtkToolkit
> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
> at
> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
> at java.awt.Window.(Window.java:133)
> at java.awt.Frame.(Frame.java:246)
> at java.awt.Frame.(Frame.java:234)
> at HelloWorld.(HelloWorld.java:7)
> at HelloWorld.main(HelloWorld.java:5)
> Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not
> found
> (as file `libgtkpeer.so') in gnu.classpath.boot.library.path and
> java.library.path
> at java.lang.Runtime.loadLibrary(Runtime.java:763)
> at java.lang.System.loadLibrary(System.java:670)
> at gnu.java.awt.peer.gtk.GtkToolkit.(GtkToolkit.java:177)
> at java.lang.VMClass.forName(Native Method)
> at java.lang.Class.forName(Class.java:233)
> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
> ...6 more
> But here Gnu Classpath is not compiled to use libgtkpeer.so (c/C++ lib
> with Qt
> or GTK) but escher java lib.

See https://www.gnu.org/software/classpath/docs/hacking.html#SEC7

        In this release you have to enable the X peers at runtime by
        setting the system property
        awt.toolkit=gnu.java.awt.peer.x.XToolkit by passing
        `-Dawt.toolkit=gnu.java.awt.peer.x.XToolkit' to the java command
        when running an application.
        
Running configure --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit
should also work. That should probably be the default when configuring
with --disable-gtk-peer and --with-escher.

Hope that helps,

Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath
  2012-01-11  9:05     ` Mark Wielaard
@ 2012-01-16 20:44       ` Yannick
  2012-01-16 20:45       ` Yannick
  1 sibling, 0 replies; 8+ messages in thread
From: Yannick @ 2012-01-16 20:44 UTC (permalink / raw)
  To: java; +Cc: classpath

Hello Mark,

Le 11/01/2012 10:05, Mark Wielaard a écrit :
> Hi Yannick,
> 
> The classpath list is probably the best to discuss this problem (CCed).
OK

> See https://www.gnu.org/software/classpath/docs/hacking.html#SEC7
>
>         In this release you have to enable the X peers at runtime by
>         setting the system property
>         awt.toolkit=gnu.java.awt.peer.x.XToolkit by passing
>         `-Dawt.toolkit=gnu.java.awt.peer.x.XToolkit' to the java command
>         when running an application.
>
> Running configure --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit
> should also work. That should probably be the default when configuring
> with --disable-gtk-peer and --with-escher.
>
> Hope that helps,
>
> Mark
>

Thank you Mark, it solve this problem.

The option --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit is
needed with escher lib because if the parameter enable-default-toolkit
is not set , it will use gnu.java.awt.peer.gtk.GtkToolkit by default
(compile with GTK support) (Source part "dnl Default AWT toolkit" in
http://cvs.savannah.gnu.org/viewvc/classpath/configure.ac?revision=1.249&root=classpath&view=markup
)

Yannick

> On Wed, 2012-01-11 at 00:30 +0100, Yannick wrote:
>> When I launch the JRE and with Xterm started, I have the following error
>> message :
>>
>> root@Palm Pre:/media/internal# /media/internal/opt/bin/jamvm HelloWorld
>> -bootclasspath
>> /media/internal/opt/share/jamvm/classes.zip:/media/internal/opt/share/classpath/glibj.zip:/media/internal/
>> opt/share/classpath/escher-0.3.jar:/media/internal/opt/share/classpath/collections.jar
>> HelloWorld -Dawt.toolkit=gnu.java.awt.peer.x.XToolkit HelloWorld
>> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
>> gnu.java.awt.peer.gtk.GtkToolkit
>> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
>> at
>> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
>> at java.awt.Window.(Window.java:133)
>> at java.awt.Frame.(Frame.java:246)
>> at java.awt.Frame.(Frame.java:234)
>> at HelloWorld.(HelloWorld.java:7)
>> at HelloWorld.main(HelloWorld.java:5)
>> Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not
>> found
>> (as file `libgtkpeer.so') in gnu.classpath.boot.library.path and
>> java.library.path
>> at java.lang.Runtime.loadLibrary(Runtime.java:763)
>> at java.lang.System.loadLibrary(System.java:670)
>> at gnu.java.awt.peer.gtk.GtkToolkit.(GtkToolkit.java:177)
>> at java.lang.VMClass.forName(Native Method)
>> at java.lang.Class.forName(Class.java:233)
>> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
>> ...6 more
>> But here Gnu Classpath is not compiled to use libgtkpeer.so (c/C++ lib
>> with Qt
>> or GTK) but escher java lib.
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath
  2012-01-11  9:05     ` Mark Wielaard
  2012-01-16 20:44       ` Yannick
@ 2012-01-16 20:45       ` Yannick
  2012-01-17 19:13         ` Yannick
  1 sibling, 1 reply; 8+ messages in thread
From: Yannick @ 2012-01-16 20:45 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: java, classpath

Hello Mark,

Le 11/01/2012 10:05, Mark Wielaard a écrit :
> Hi Yannick,
> 
> The classpath list is probably the best to discuss this problem (CCed).
OK

> See https://www.gnu.org/software/classpath/docs/hacking.html#SEC7
>
>         In this release you have to enable the X peers at runtime by
>         setting the system property
>         awt.toolkit=gnu.java.awt.peer.x.XToolkit by passing
>         `-Dawt.toolkit=gnu.java.awt.peer.x.XToolkit' to the java command
>         when running an application.
>
> Running configure --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit
> should also work. That should probably be the default when configuring
> with --disable-gtk-peer and --with-escher.
>
> Hope that helps,
>
> Mark
>

Thank you Mark, it solve this problem.

The option --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit is
needed with escher lib because if the parameter enable-default-toolkit
is not set , it will use gnu.java.awt.peer.gtk.GtkToolkit by default
(compile with GTK support) (Source part "dnl Default AWT toolkit" in
http://cvs.savannah.gnu.org/viewvc/classpath/configure.ac?revision=1.249&root=classpath&view=markup
)

Yannick

> On Wed, 2012-01-11 at 00:30 +0100, Yannick wrote:
>> When I launch the JRE and with Xterm started, I have the following error
>> message :
>>
>> root@Palm Pre:/media/internal# /media/internal/opt/bin/jamvm HelloWorld
>> -bootclasspath
>> /media/internal/opt/share/jamvm/classes.zip:/media/internal/opt/share/classpath/glibj.zip:/media/internal/
>> opt/share/classpath/escher-0.3.jar:/media/internal/opt/share/classpath/collections.jar
>> HelloWorld -Dawt.toolkit=gnu.java.awt.peer.x.XToolkit HelloWorld
>> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
>> gnu.java.awt.peer.gtk.GtkToolkit
>> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
>> at
>> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
>> at java.awt.Window.(Window.java:133)
>> at java.awt.Frame.(Frame.java:246)
>> at java.awt.Frame.(Frame.java:234)
>> at HelloWorld.(HelloWorld.java:7)
>> at HelloWorld.main(HelloWorld.java:5)
>> Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not
>> found
>> (as file `libgtkpeer.so') in gnu.classpath.boot.library.path and
>> java.library.path
>> at java.lang.Runtime.loadLibrary(Runtime.java:763)
>> at java.lang.System.loadLibrary(System.java:670)
>> at gnu.java.awt.peer.gtk.GtkToolkit.(GtkToolkit.java:177)
>> at java.lang.VMClass.forName(Native Method)
>> at java.lang.Class.forName(Class.java:233)
>> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
>> ...6 more
>> But here Gnu Classpath is not compiled to use libgtkpeer.so (c/C++ lib
>> with Qt
>> or GTK) but escher java lib.
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath
  2012-01-16 20:45       ` Yannick
@ 2012-01-17 19:13         ` Yannick
  0 siblings, 0 replies; 8+ messages in thread
From: Yannick @ 2012-01-17 19:13 UTC (permalink / raw)
  To: java; +Cc: classpath

Hello Mark,

Le 11/01/2012 10:05, Mark Wielaard a écrit :
> Hi Yannick,
> 
> The classpath list is probably the best to discuss this problem (CCed).
OK

> See https://www.gnu.org/software/classpath/docs/hacking.html#SEC7
>
>         In this release you have to enable the X peers at runtime by
>         setting the system property
>         awt.toolkit=gnu.java.awt.peer.x.XToolkit by passing
>         `-Dawt.toolkit=gnu.java.awt.peer.x.XToolkit' to the java command
>         when running an application.
>
> Running configure --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit
> should also work. That should probably be the default when configuring
> with --disable-gtk-peer and --with-escher.
>
> Hope that helps,
>
> Mark
>

Thank you Mark, it solve this problem.

The option --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit is
needed with escher lib because if the parameter enable-default-toolkit
is not set , it will use gnu.java.awt.peer.gtk.GtkToolkit by default
(compile with GTK support) (Source part "dnl Default AWT toolkit" in
http://cvs.savannah.gnu.org/viewvc/classpath/configure.ac?revision=1.249&root=classpath&view=markup
)

Yannick

> On Wed, 2012-01-11 at 00:30 +0100, Yannick wrote:
>> When I launch the JRE and with Xterm started, I have the following error
>> message :
>>
>> root@Palm Pre:/media/internal# /media/internal/opt/bin/jamvm HelloWorld
>> -bootclasspath
>> /media/internal/opt/share/jamvm/classes.zip:/media/internal/opt/share/classpath/glibj.zip:/media/internal/
>> opt/share/classpath/escher-0.3.jar:/media/internal/opt/share/classpath/collections.jar
>> HelloWorld -Dawt.toolkit=gnu.java.awt.peer.x.XToolkit HelloWorld
>> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
>> gnu.java.awt.peer.gtk.GtkToolkit
>> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
>> at
>> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
>> at java.awt.Window.(Window.java:133)
>> at java.awt.Frame.(Frame.java:246)
>> at java.awt.Frame.(Frame.java:234)
>> at HelloWorld.(HelloWorld.java:7)
>> at HelloWorld.main(HelloWorld.java:5)
>> Caused by: java.lang.UnsatisfiedLinkError: Native library `gtkpeer' not
>> found
>> (as file `libgtkpeer.so') in gnu.classpath.boot.library.path and
>> java.library.path
>> at java.lang.Runtime.loadLibrary(Runtime.java:763)
>> at java.lang.System.loadLibrary(System.java:670)
>> at gnu.java.awt.peer.gtk.GtkToolkit.(GtkToolkit.java:177)
>> at java.lang.VMClass.forName(Native Method)
>> at java.lang.Class.forName(Class.java:233)
>> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
>> ...6 more
>> But here Gnu Classpath is not compiled to use libgtkpeer.so (c/C++ lib
>> with Qt
>> or GTK) but escher java lib.
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-16 20:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-30  4:28 PATCH, boehm-gc: silence warning Ben Elliston
2009-11-30 10:07 ` Andrew Haley
2012-01-10 23:40   ` Gnu Classpath on HP webOS : connexion problem between escher and X server / or loadling escher problem by Gnu classpath Yannick
2012-01-10 23:53     ` Brian Jones
2012-01-11  9:05     ` Mark Wielaard
2012-01-16 20:44       ` Yannick
2012-01-16 20:45       ` Yannick
2012-01-17 19:13         ` Yannick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).