[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] [patch] make darwin 'work' with classpath
From: |
Andreas Tobler |
Subject: |
Re: [cp-patches] [patch] make darwin 'work' with classpath |
Date: |
Wed, 03 Aug 2005 06:35:50 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.5 (Macintosh/20050711) |
Hi Mark,
Mark Wielaard wrote:
On Tue, 2005-08-02 at 06:41 +0200, Andreas Tobler wrote:
Well, here I should have said 'once', with the actual cp I didn't. :(
But I know jamvm will fail because it in src/dll.c:300 it checks against
.so and new will .dylib on darwin.
In the meantime I built cp with .dylib and with .so. Also jamvm was
tuned to work with both. (Not simultaneously, but this should be a
little effort)
Unfortunately cp cvs does crash when I run a swing app. An awt based app
does somehow work with jamvm, but only when I build cp with .dylib.
Built with .so it segfaults. For both, awt and swing based apps.
The awt based app seems to work when I resize the frame (I tried
awt.Demo). If I do not resize, I get a blank frame with the menubar
only. Resizing the frame brings me the buttons to see, except the close
button. This is all against gnome-2.10 core.
The swing based app aborts with the following message:
** ERROR **: file gnu_java_awt_peer_gtk_GdkGraphics.c: line 161
(Java_gnu_java_awt_peer_gtk_GdkGraphics_initFromImage): assertion
failed: (pixmap != NULL)
aborting...
java.lang.InternalError
at gnu.java.awt.peer.gtk.GdkGraphics.initFromImage (Native Method)
at gnu.java.awt.peer.gtk.GdkGraphics.<init> (GdkGraphics.java:107)
at gnu.java.awt.peer.gtk.GtkImage.getGraphics (GtkImage.java:311)
at gnu.java.awt.peer.gtk.GtkComponentPeer.createImage
(GtkComponentPeer.java:234)
at java.awt.Component.createImage (Component.java:2058)
at java.awt.Component.createImage (Component.java:2056)
at javax.swing.RepaintManager.getOffscreenBuffer
(RepaintManager.java:487)
at javax.swing.JComponent.paint (JComponent.java:1440)
at java.awt.Container$GfxPaintVisitor.visit (Container.java:1737)
at java.awt.Container.visitChild (Container.java:1541)
at java.awt.Container.visitChildren (Container.java:1503)
at java.awt.Container.paint (Container.java:752)
at gnu.java.awt.peer.gtk.GtkComponentPeer.handleEvent
(GtkComponentPeer.java:311)
at java.awt.Component.dispatchEvent (Component.java:2320)
at java.awt.EventQueue.dispatchEvent (EventQueue.java:518)
at java.awt.EventDispatchThread.run (EventDispatchThread.java:75)
Program received signal SIGABRT, Aborted.
[Switching to process 2154 local thread 0x3407]
0x9002ca98 in semaphore_wait_signal_trap ()
Ok, maybe it's a general ppc problem?
OK. Useful additional datapoint :)
Maybe the simplest solution then would be to symlink the .dylib to a .so
with the same name as an additional workaround for darwin based systems.
No, .so and .dylib are not the same and you can not symlink apples to
pears :)
I looked a bit around and also found the extension .jnilib used on
darwin systems for libraries loaded through jni. There is a patch for
libtool to add a -jnimodule option, but I don't believe that has been
integrated.
http://lists.gnu.org/archive/html/libtool/2002-07/msg00010.html
You can dlopen/link against dylib. See the testsuite in
gcc/libjava/testsuite/jni.exp there we test against. So I think we do
not need an additional extension.
Chris had a fight around this same issue for our libxmlj:
http://lists.gnu.org/archive/html/classpath/2004-07/msg00207.html
But this was something different, he ended up using a wrong jni.h.
It seems it is all a bit of a maze of extensions and options I am
afraid :(
I know. But I can't change it :)
Regards,
Andreas