From owner-freebsd-java Mon Nov 19 10: 5:20 2001 Delivered-To: freebsd-java@freebsd.org Received: from zircon.seattle.wa.us (sense-sea-CovadSub-0-228.oz.net [216.39.147.228]) by hub.freebsd.org (Postfix) with SMTP id 1948337B417 for ; Mon, 19 Nov 2001 10:05:16 -0800 (PST) Received: (qmail 95904 invoked by uid 1001); 19 Nov 2001 18:06:27 -0000 From: Joe Kelsey MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="NDJejMx8bV" Content-Transfer-Encoding: 7bit Message-ID: <15353.18978.717379.778079@zircon.zircon.seattle.wa.us> Date: Mon, 19 Nov 2001 10:06:26 -0800 To: freebsd-java@freebsd.org Subject: Plugin status -Mailer: VM 6.96 under Emacs 21.1.1 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --NDJejMx8bV Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit I have been working on the plugin for Mozilla for a while, so I guess I should post my results and maybe someone can improve on them. The plugin compiles, with a few changes to the master Makefile in the port. I attach the diffs at the end of this message. Basically, the plugin needs to find glib12, gmodule12, gdk12, gtk12, and nspr4 libraries. The first four come from the glib12 and gtk12 ports, so I added LIB_DEPENDS to cover those. nspr4 is inthe mozilla port, so I added a dependency on mozilla to the port. I don't mind adding the glib and gtk dependencies, but the mozilla dependency seems like a stretch, especially for someone who doesn't want the plugin. Anyway, the plugin makefile cannot find the libraries directly, since it is looking for -lglib instead of -lglib12, so I added a pre-patch set to create a directory and place symbolic links to the actual libraries. Then, we can merely set the appropriate make environment variables, and the patch builds nicely. We can solve the nspr4/mozilla problem by including a copy of the i386 nspr4 library in j2sdk1.3.1/plugin/.oji-plugin/src/motif/lib/solaris/i386/libnspr4.so as part of the port. It's up to Greg. Also, there is a false comment about needing to build images before plugin on i386 in some makefile somewhere. This is just wrong. If you don't build the plugin before images, the plugin will not be included in the installed images. So, I changed the all target to "all plugin images" and everything seems to work. If you are interested in testing, have a look at j2sdk1.3.1/ext/plugin/oji-plugin/src/motif/Notes. This explains how to set up the plugin for debugging. You need to at least set the environment variable THREADS_FLAG=green before starting mozilla, or you will get nowhere. You can also set JAVA_PLUGIN_TRACE to enable the creation of plugin trace files in /tmp named plugin_parent131.trace and child_java_vm131.trace. My experiments show that the child runs up to the point of calling JNI_CreateJavaVM and dies somewhere in that function. Any furhter details require work with gdb. I hope this encourages others to help inthe debugging process. /Joe --NDJejMx8bV Content-Type: text/plain Content-Description: diff Content-Disposition: inline; filename="Makefile.diff" Content-Transfer-Encoding: 7bit --- Makefile.orig Tue Oct 16 05:43:07 2001 +++ Makefile Mon Nov 19 09:48:25 2001 @@ -19,7 +19,10 @@ zip:${PORTSDIR}/archivers/zip \ gtar:${PORTSDIR}/archivers/gtar \ ${JDK13DIR}/bin/javac:${PORTSDIR}/java/linux-jdk13 \ - ${X11BASE}/lib/libMrm.a:${PORTSDIR}/x11-toolkits/open-motif-devel + ${X11BASE}/lib/libMrm.a:${PORTSDIR}/x11-toolkits/open-motif-devel \ + mozilla:$(PORTSDIR)/www/mozilla +LIB_DEPENDS= glib12:$(PORTSDIR)/devel/glib12 \ + gtk12:$(PORTSDIR)/x11-toolkits/gtk12 RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper WRKSRC= ${WRKDIR}/j2sdk1.3.1/make @@ -38,8 +41,14 @@ SYS_CFLAGS="${CFLAGS}" \ CLASSPATH="" \ LD_LIBRARY_PATH="" \ - JAVA_COMPILER="" -ALL_TARGET= all images + JAVA_COMPILER="" \ + LIBG_HDRS=/usr/local/include/glib12 \ + GTK_HDRS=/usr/X11R6/include/gtk12 \ + LIBIDL_HDRS= \ + LIBG_LIB_DIR=${WRKDIR}/j2sdk1.3.1/ext/plugin/build/bsd \ + GTK_LIB_DIR=${WRKDIR}/j2sdk1.3.1/ext/plugin/build/bsd \ + LIBIDL_LIB_DIR=/usr/X11R6/lib/mozilla +ALL_TARGET= all plugin images TAR= gtar # Necessary for proper extraction of sources BSD_TAR= /usr/bin/tar PLIST_SUB+= JDK_VERSION=${JDK_VERSION} @@ -71,6 +80,11 @@ ${MKDIR} -p j2sdk1.3.1/ext/plugin/oji-plugin/include/bsd/jdk12 && \ ${MKDIR} -p j2sdk1.3.1/ext/plugin/oji-plugin/include/solaris/navig5/private && \ ${MKDIR} -p j2sdk1.3.1/src/bsd/doc/man && \ + ${MKDIR} -p j2sdk1.3.1/ext/plugin/build/bsd && \ + ln -s /usr/local/lib/libglib12.so j2sdk1.3.1/ext/plugin/build/bsd/libglib.so && \ + ln -s /usr/local/lib/libgmodule12.so j2sdk1.3.1/ext/plugin/build/bsd/libgmodule.so && \ + ln -s /usr/X11R6/lib/libgdk12.so j2sdk1.3.1/ext/plugin/build/bsd/libgdk.so && \ + ln -s /usr/X11R6/lib/libgtk12.so j2sdk1.3.1/ext/plugin/build/bsd/libgtk.so && \ ${PATCH} < ${WRKDIR}/jdk131.patches .if !defined(NODEBUG) --NDJejMx8bV-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message