Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56516 - SWT in eclipse-gtk-3.0.0 doesn't support mozilla embedding
Summary: SWT in eclipse-gtk-3.0.0 doesn't support mozilla embedding
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Karl Trygve Kalleberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-09 00:07 UTC by Ming Zhao (RETIRED)
Modified: 2004-07-28 06:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
eclipse-sdk-3.0.0.ebuild (eclipse-sdk-3.0.0.ebuild,10.94 KB, text/plain)
2004-07-09 00:09 UTC, Ming Zhao (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ming Zhao (RETIRED) gentoo-dev 2004-07-09 00:07:02 UTC
running the test program from http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/snippits/snippet128.html

and the following error:
Exception in thread "main" org.eclipse.swt.SWTError: No more handles (java.lang.UnsatisfiedLinkError: /usr/lib/eclipse-3/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/libswt-mozilla-gtk-3062.so: /usr/lib/eclipse-3/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/libswt-mozilla-gtk-3062.so: undefined symbol: NS_InitEmbedding)
	at org.eclipse.swt.SWT.error(SWT.java:2717)
	at org.eclipse.swt.SWT.error(SWT.java:2616)
	at org.eclipse.swt.browser.Browser.<init>(Browser.java:122)
	at SWTBrowser.main(SWTBrowser.java:52)
*** Stack trace of contained error ***
java.lang.UnsatisfiedLinkError: /usr/lib/eclipse-3/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/libswt-mozilla-gtk-3062.so: /usr/lib/eclipse-3/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/libswt-mozilla-gtk-3062.so: undefined symbol: NS_InitEmbedding
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
	at java.lang.Runtime.loadLibrary0(Runtime.java:788)
	at java.lang.System.loadLibrary(System.java:834)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:100)
	at org.eclipse.swt.browser.Browser.<init>(Browser.java:119)
	at SWTBrowser.main(SWTBrowser.java:52)

It seems like libswt-mozilla-gtk-3062.so doesn't link against /usr/lib/mozilla/libgtkembedmoz.so properly. So I change the ebuild a bit, and now it works.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Ming Zhao (RETIRED) gentoo-dev 2004-07-09 00:09:15 UTC
Created attachment 35054 [details]
eclipse-sdk-3.0.0.ebuild

here are the changes:
--- eclipse-sdk-3.0.0.ebuild~	2004-07-07 07:35:49.000000000 +0800
+++ eclipse-sdk-3.0.0.ebuild	2004-07-09 14:55:36.000000000 +0800
@@ -64,6 +64,14 @@
  
	# If neither enabled, default to gtk+
	${use_gtk} || ${use_motif} || use_gtk='true'
+
+	if ${use_gtk} && use mozilla && [ ! -f
${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ]
+	then
+		eerror "you need mozilla compiled against gtk+-2"
+		eerror "export USE=\"gtk2\" ;emerge mozilla -p "
+		eerror "or remove \"mozilla\" from use flags"
+		die "Need Mozilla compiled with gtk+-2.0!!"
+	fi
 }
  
 set_dirs() {
@@ -133,7 +141,7 @@
		-e "s:\`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0
libgnomeui-2.0\`:${gnome_lib}:" \
		-e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include
-I\$(JAVA_HOME)/include/linux:" \
		-e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include
-I\$(JAVA_HOME)/include/linux:" \
-		-e "s:-L\$(MOZILLA_HOME)/lib
-lembed_base_s:-L\$(MOZILLA_HOME):" \
+		-e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L\$(MOZILLA_HOME)
-lgtkembedmoz:" \
		-e "s:MOZILLACFLAGS = -O:MOZILLACFLAGS = -O -fPIC:" \
		-e "s:\$(JAVA_HOME)/jre/bin:\$(JAVA_HOME)/jre/lib/i386:" \
		-i make_gtk.mak
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-07-09 11:47:05 UTC
Yup, you're right. This is one of the things I've been wanting to do, but
never got around to actually testing it. Thanks a lot!
Comment 3 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-07-28 06:01:46 UTC
Fixed (hopefully). Check out dev-util/eclipse-sdk-3.0.0-r1 or newer.