Re: [Java-gnome-developer] UnsatisfiedLinkError on HTMLDocument ( html_document_new)
Brought to you by:
afcowie
From: Nicholas R. <ni...@mn...> - 2004-10-25 08:10:12
|
Thanks for the info. It is quite strange. Here's a small test program that shows the problem. import java.io.IOException; import java.net.MalformedURLException; import org.gnu.gnome.App; import org.gnu.gnome.Program; import org.gnu.gtk.Gtk; import org.gnu.gtk.ScrolledWindow; import org.gnu.gtkhtml.HTMLDocument; import org.gnu.gtkhtml.HTMLView; public class TestHTML { public static void main( String[] argv ) { // Initialization Program.initGnomeUI("First", "0.1", argv); App app = new App("First", "First App"); app.show(); HTMLDocument document = new HTMLDocument(); HTMLView view = new HTMLView(); ScrolledWindow sw = new ScrolledWindow(); sw.add( view ); try { document.loadURL( "http://www.google.com" ); view.setDocument( document ); } catch( MalformedURLException ex ) { System.err.println( ex ); } catch( IOException ex ) { System.err.println( ex ); } Gtk.main(); } } I compile and run this (with Java 1.4.2 or 1.5) and i get the following exception: Exception in thread "main" java.lang.UnsatisfiedLinkError: html_document_new at org.gnu.gtkhtml.HTMLDocument.html_document_new(Native Method) at org.gnu.gtkhtml.HTMLDocument.<init>(HTMLDocument.java:44) at TestHTML.main(TestHTML.java:19) I then run it with strace to see what's going on and i can see that it is loading the correct library, but the UnsatisfiedLinkError is raised just after the load. However, if i run nm on my library, i can see that the above mentioned function is in the library. i thought then that it might be my compile of the libgtkhtml-2.6.2 library, so i re-emerged it. didn't work. then i compliled it by hand into /usr/local. still the same error. perhaps if there's some other gentooers out there (with a standard gentoo setup) they could try out the little program above and see what happens. i'll probably also post to the gentoo forum to see if anyone there has had a similar experience. As for a 2.8 ebuild, let me know if you want some help with testing. Currently, I'm trying to get the CVS version of java-gnome installed, hoping i'll have better luck with that (i have gnome 2.8 installed already as it's in gentoo's ~x86). Nick On Sat, 2004-10-23 at 19:21 -0400, Andrew Cowie wrote: > On Sat, 2004-23-10 at 11:15 +0100, Mark Howard wrote: > > Sounds like it could be a problem with the way it was compiled. Has anyone else > > on the list managed to get libgtkhtml-java working on gentoo? > > Yes, I have... > > ...er, I just reconsidered the question and realized that of course I'm > running from CVS and have an entire Gnome installation in /opt/gnome2 > and that's what I'm linking against. > > Nicholas, java-gnome 2.8 has a considerably re-arranged internal layout > and my experience has been that it works whereas I had trouble with 2.6 > > I promise when 2.8.x is stable I'll get an ebuild out - in fact I'm > becoming a Gentoo developer presently largely so I can take care of the > java-gnome ebuild. > > AfC > Toronto > -- |