RE: [Java-gnome-developer] Question 10 In The FAQ (Long story short: got it up and limping)
Brought to you by:
afcowie
From: Jeff M. <ku...@ne...> - 2000-11-04 00:58:14
|
Dan, This is great information to know. The defs have many problems. I have been going through the gtk defs file and adding methods and correcting mistakes. I will apply your changes and check into CVS tonight. As far as the error that you are having with TestGNOME, this is caused (as you might guess) by the grabDefault method which calls the native method gtk_widget_grab_default. It is failing on a check to see if the widget can default. I notices this as I was working on TestGTK and just commented it out for the time being hoping to fix it prior to release 0.5. I will comment this out of the TestGNOME and also check it in tonight. As you can see, there is still much work to be done on this project. We would welcome all the help you can give. -Jeff -----Original Message----- From: jav...@li... [mailto:jav...@li...]On Behalf Of Dan Bornstein Sent: Friday, November 03, 2000 6:49 PM To: To: Java-Gnome-Developer@Lists. Sourceforge. Net Subject: [Java-gnome-developer] Question 10 In The FAQ (Long story short: got it up and limping) Strangely enough, upon my first attempt to use Java-Gnome, I ran into the symptom described by question 10 in the FAQ: % java TestGNOME Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/lib/libGNOMEJava.so.0.4.5: /usr/local/lib/libGNOMEJava.so.0.4.5: undefined symbol: gnome_entry_max_saved at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306) at java.lang.Runtime.loadLibrary0(Runtime.java:749) at java.lang.System.loadLibrary(System.java:820) at gnome.Gnome.<clinit>(Gnome.java:23) at TestGNOME.main(TestGNOME.java:410) The FAQ has this to say: >The most common error of this type is caused by the fact that your system >can not find the libraries it needs to load. Try to run make install as >root and ensure that the directory the two libraries (libGtkJava.so and >libGNOMEJava.so) end up in is in the dynamic loader's path. >If you did this and it still gives you the same error message please >contact us with the version of the JDK, GTK and GNOME that you use and >detail on the error that you get. Well, I think I tried every reasonable test. I tried just leaving the libs in the build location (I have an aversion to installing stuff as root), in /usr/local/lib, and finally even in /usr/lib, and I still got the error. So, all the above having failed, I did a little investigation, and, in fact, near as I can tell, that symbol isn't defined in any of the libs in /usr/lib on my machine: % nm /usr/lib/lib*.so* |& grep 'gnome_entry.*max_saved' U gnome_entry_set_max_saved U gnome_entry_set_max_saved 000591f0 T gnome_entry_set_max_saved 000591f0 T gnome_entry_set_max_saved 000591f0 T gnome_entry_set_max_saved There are entries for the notably similar "gnome_entry_set_max_saved", though. Looking in the Gnome header files, I found this in libgnomeui/gnome-entry.h: void gnome_entry_set_max_saved (GnomeEntry *gentry, guint max_saved); This looks similar to the definition for gnome_entry_max_saved in defs/gnome.defs: (define-func gnome_entry_max_saved none ((GnomeEntry gentry) (int max_saved))) I tried replacing "gnome_entry_max_saved" with "gnome_entry_set_max_saved" in gnome.defs and recompiled, and this *particular* problem went away, but I got a similar error with a different symbol. I reiterated the process until I got it working. Here are the changes I ended up making: gnome_entry_max_saved => gnome_entry_set_max_saved gnome_icon_entryi_set_pixmap_subdir => gnome_icon_entry_set_pixmap_subdir gnome_icon_entryi_set_icon => gnome_icon_entry_set_icon gnome_app_dock_item => gnome_app_add_dock_item gnome_dialog_append_buttonv => gnome_dialog_append_buttonsv gtk_container_need_resize => (removed) gtk_enry_set_max_length => gtk_entry_set_max_length gtk_progress_get_current_percentage_from_value => gtk_progress_get_percentage_from_value gtk_widget_restore_state => gtk_widget_restore_default_style gtk_widget_basic => (removed) After making all of these changes, I actually got TestGNOME to run[*] (yay!), although, among the output I got this message: Gtk-CRITICAL **: file gtkwidget.c: line 3174 (gtk_widget_grab_default): assertion `GTK_WIDGET_CAN_DEFAULT (widget)' failed. Of course, I might not have ended up exercising the method definitions I changed in a meaningful way, so I don't know if I guessed wrong at the mappings. My guess is that, if these aren't typos in gnome.defs, then the Gnome libraries changed from when the defs files were originally made. Here's the salient version info. Let me know if you'd like to know something not listed here: % rpm --query gnome-libs gnome-libs-1.2.4-0_helix_2 % rpm --query --list gnome-libs |& grep '/usr/lib' /usr/lib/libart_lgpl.so.2 /usr/lib/libart_lgpl.so.2.2.0 /usr/lib/libgnome.so.32 /usr/lib/libgnome.so.32.3.11 /usr/lib/libgnomesupport.so.0 /usr/lib/libgnomesupport.so.0.0.0 /usr/lib/libgnomeui.so.32 /usr/lib/libgnomeui.so.32.11.3 /usr/lib/libgnorba.so.27 /usr/lib/libgnorba.so.27.1.8 /usr/lib/libgnorbagtk.so.0 /usr/lib/libgnorbagtk.so.0.0.0 /usr/lib/libgtkxmhtml.so.1 /usr/lib/libgtkxmhtml.so.1.0.1 /usr/lib/libzvt.so.2 /usr/lib/libzvt.so.2.2.7 Hope this helps, -dan [*] I'm running Sun's JDK 1.3 for Linux, on RedHat 6.2, with a relatively up-to-date Helix GNOME installation on top of it. I ran with a remote (ssh-tunnelled) X display. _______________________________________________ java-gnome-developer mailing list jav...@li... http://lists.sourceforge.net/mailman/listinfo/java-gnome-developer |