Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » libxul.so: undefined symbol: gtk_major_version(in internal web browser)
libxul.so: undefined symbol: gtk_major_version [message #746180] Sun, 23 October 2011 04:41 Go to next message
Ilya Basin is currently offline Ilya Basin
Messages: 8
Registered: October 2011
Junior Member
I have Archlinux64, eclipse 3.7.1, openjdk6 6.b22_1.10.3 , gtk2 2.24.6
I followed h t t p://www.eclipse.org/swt/faq.php#browserlinux ;
built and installed xulrunner 1.9.2 ;
export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9.2
export LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9.2

open internal web browser and see: Embedded browser not available ... libxul.so: undefined symbol: gtk_major_version

gtk_major_version is in /usr/lib/libgtk-x11-2.0.so and libxul.so has this lib in dependencies.

I even attached to eclipse with gdb and 'info shared' shows /usr/lib/libgtk-x11-2.0.so.0 among loaded libraries.

So why it can't resolve gtk_major_version?


No more handles [MOZILLA_FIVE_HOME='/usr/lib/xulrunner-1.9.2'] (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	/home/il/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/org.eclipse.osgi/bundles/797/1/.cp/libswt-mozilla-gtk-3738.so: /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
	no swt-mozilla-gtk in java.library.path
	/home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk-3738.so: /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
	Can't load library: /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so
)
org.eclipse.swt.SWTError: No more handles [MOZILLA_FIVE_HOME='/usr/lib/xulrunner-1.9.2'] (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	/home/il/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/org.eclipse.osgi/bundles/797/1/.cp/libswt-mozilla-gtk-3738.so: /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
	no swt-mozilla-gtk in java.library.path
	/home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk-3738.so: /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
	Can't load library: /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so
)
	at org.eclipse.swt.SWT.error(SWT.java:4308)
	at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1857)
	at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:687)
	at org.eclipse.swt.browser.Browser.<init>(Browser.java:99)
	at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:225)
	at org.eclipse.ui.internal.browser.WebBrowserView.createPartControl(WebBrowserView.java:48)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:4317)
	at org.eclipse.ui.internal.WorkbenchPage$18.runWithException(WorkbenchPage.java:3359)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	/home/il/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/org.eclipse.osgi/bundles/797/1/.cp/libswt-mozilla-gtk-3738.so: /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
	no swt-mozilla-gtk in java.library.path
	/home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk-3738.so: /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
	Can't load library: /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so

	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
	at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1842)
	... 41 more
Re: libxul.so: undefined symbol: gtk_major_version [message #748143 is a reply to message #746180] Mon, 24 October 2011 10:11 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
I've never seen this before, but I suspect that you'll have better luck
if you _don't_ set MOZILLA_FIVE_HOME and LD_LIBRARY_PATH, and instead
set the org.eclipse.swt.browser.XULRunnerPath property as described in
http://www.eclipse.org/swt/faq.php#specifyxulrunner .

Setting MOZILLA_FIVE_HOME/LD_LIBRARY_PATH thing should only be used to
point at pre-XULRunner versions of mozilla, which are quite old. I'll
update the SWT FAQ to make this more clear.

Grant


On 10/23/2011 4:41 AM, Ilya Basin wrote:
> I have Archlinux64, eclipse 3.7.1, openjdk6 6.b22_1.10.3 , gtk2 2.24.6
> I followed h t t p://www.eclipse.org/swt/faq.php#browserlinux ;
> built and installed xulrunner 1.9.2 ;
> export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9.2
> export LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9.2
>
> open internal web browser and see: Embedded browser not available ...
> libxul.so: undefined symbol: gtk_major_version
>
> gtk_major_version is in /usr/lib/libgtk-x11-2.0.so and libxul.so has
> this lib in dependencies.
>
> I even attached to eclipse with gdb and 'info shared' shows
> /usr/lib/libgtk-x11-2.0.so.0 among loaded libraries.
>
> So why it can't resolve gtk_major_version?
>
>
>
> No more handles [MOZILLA_FIVE_HOME='/usr/lib/xulrunner-1.9.2']
> (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
> /home/il/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/org.eclipse.osgi/bundles/797/1/.cp/libswt-mozilla-gtk-3738.so:
> /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
> no swt-mozilla-gtk in java.library.path
> /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk-3738.so:
> /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
> Can't load library: /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so
> )
> org.eclipse.swt.SWTError: No more handles
> [MOZILLA_FIVE_HOME='/usr/lib/xulrunner-1.9.2']
> (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
> /home/il/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/org.eclipse.osgi/bundles/797/1/.cp/libswt-mozilla-gtk-3738.so:
> /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
> no swt-mozilla-gtk in java.library.path
> /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk-3738.so:
> /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
> Can't load library: /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so
> )
> at org.eclipse.swt.SWT.error(SWT.java:4308)
> at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1857)
> at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:687)
> at org.eclipse.swt.browser.Browser.<init>(Browser.java:99)
> at
> org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:225)
>
> at
> org.eclipse.ui.internal.browser.WebBrowserView.createPartControl(WebBrowserView.java:48)
>
> at
> org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
>
> at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
>
> at
> org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:4317)
>
> at
> org.eclipse.ui.internal.WorkbenchPage$18.runWithException(WorkbenchPage.java:3359)
>
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
>
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
>
> at
> org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
>
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library.
> Reasons:
> /home/il/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/org.eclipse.osgi/bundles/797/1/.cp/libswt-mozilla-gtk-3738.so:
> /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
> no swt-mozilla-gtk in java.library.path
> /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk-3738.so:
> /usr/lib/xulrunner-1.9.2/libxul.so: undefined symbol: gtk_major_version
> Can't load library: /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so
>
> at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
> at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
> at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1842)
> ... 41 more
>
Re: libxul.so: undefined symbol: gtk_major_version [message #748307 is a reply to message #748143] Mon, 24 October 2011 12:16 Go to previous messageGo to next message
Ilya Basin is currently offline Ilya Basin
Messages: 8
Registered: October 2011
Junior Member
I see now that MOZILLA_FIVE_HOME is unneeded here. Eclipse detects the location correctly: No more handles [MOZILLA_FIVE_HOME='/usr/lib64/xulrunner-1.9.2']
/usr/lib64 is a symlink to /usr/lib

But with -vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-1.9.2 a new error message box appears: "Could not launch internal web browser. Please set an external browser in the Browser preferences".

Re: libxul.so: undefined symbol: gtk_major_version [message #748321 is a reply to message #748307] Mon, 24 October 2011 12:26 Go to previous messageGo to next message
Ilya Basin is currently offline Ilya Basin
Messages: 8
Registered: October 2011
Junior Member
with default options error is the following:

No more handles [MOZILLA_FIVE_HOME='/usr/lib64/xulrunner-1.9.2'] (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	/home/il/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/org.eclipse.osgi/bundles/797/1/.cp/libswt-mozilla-gtk-3738.so: libxpcom.so: cannot open shared object file: No such file or directory
	no swt-mozilla-gtk in java.library.path
	/home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk-3738.so: libxpcom.so: cannot open shared object file: No such file or directory
	Can't load library: /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so
)

Just for test I removed the symlink /usr/lib64 -> /usr/lib . Error changed to:
No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]

Why it can detect xulrunner in /usr/lib64, but not in /usr/lib ?

[Updated on: Mon, 24 October 2011 12:27]

Report message to a moderator

Re: libxul.so: undefined symbol: gtk_major_version [message #753508 is a reply to message #748321] Thu, 27 October 2011 10:13 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
This still seems confusing. If the
org.eclipse.swt.browser.XULRunnerPath property is set then it should be
attempting to use libswt-xulrunner-gtk-3738.so, not
libswt-mozilla-gtk-3738.so. Can you confirm/try the following:

- you're using a xulrunner downloaded from
http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/ (any
version <= 3.6.23)
- your xulrunner arch matches your eclipse/swt (ie.- if you're using
64-bit eclipse/swt then your xulrunner is 64-bit, and vice versa if your
eclipse/swt is 32-bit)
- your xulrunner is registered on your OS by running "./xulrunner
--register-global" (this is a preferred alternative to pointing at it
with the org.eclipse.swt.browser.XULRunnerPath property)
- what does the following snippet print to stdout:
http://www.eclipse.org/swt/faq.php#printmozillapath ?

Grant


On 10/24/2011 12:26 PM, Ilya Basin wrote:
> with default options error is the following:
> [code]
> No more handles [MOZILLA_FIVE_HOME='/usr/lib64/xulrunner-1.9.2']
> (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
> /home/il/.eclipse/org.eclipse.platform_3.7.0_1543616141/configuration/org.eclipse.osgi/bundles/797/1/.cp/libswt-mozilla-gtk-3738.so:
> libxpcom.so: cannot open shared object file: No such file or directory
> no swt-mozilla-gtk in java.library.path
> /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk-3738.so: libxpcom.so:
> cannot open shared object file: No such file or directory
> Can't load library: /home/il/.swt/lib/linux/x86_64/libswt-mozilla-gtk.so
> )
> [code]
> Just for test I removed the symlink /usr/lib64 -> /usr/lib . Error
> changed to:
> No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
>
> Why it can detect xulrunner in /usr/lib64, but not in /usr/lib ?
>
Previous Topic:Sample SWT Browser Plug-in Source attached
Next Topic:Problem with ScrolledPageBook, SashFom and TableViewer combined
Goto Forum:
  


Current Time: Fri Jul 25 09:00:43 EDT 2014

Powered by FUDForum. Page generated in 0.02066 seconds