| [news.eclipse.platform] Re: how to specify GTK? |
Hi Andres, Tom,
Thanks for your suggestions.
How to make sure the new library path is picked up?
8:# C [libgtk-x11-2.0.so.0+0x1e8498] 41:C [libgtk-x11-2.0.so.0+0x1e8498] 46:C [libswt-pi-gtk-3449.so+0x328cd] Java_org_eclipse_swt_internal_gtk_OS__1g_1main_1context_1iteration+0x20 47:j org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(IZ)Z+0 48:j org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(IZ)Z+9 62:j org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(IZ)Z+0 63:j org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(IZ)Z+9 223:00722000-009ca000 r-xp 00000000 68:01 1073922 /usr/lib/libgtk-x11-2.0.so.0.400.13 224:009ca000-009d3000 rwxp 002a8000 68:01 1073922 /usr/lib/libgtk-x11-2.0.so.0.400.13 321:52146000-52149000 r-xp 00000000 68:01 1200134 /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so 322:52149000-5214a000 rwxp 00003000 68:01 1200134 /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so 398:52ab5000-52abf000 r-xp 00000000 00:2c 2003498 <eclipse-install-location>/configuration/org.eclipse.osgi/bundles/398/1/.cp/libswt-cairo-gtk-3449.so 399:52abf000-52ac0000 rwxp 00009000 00:2c 2003498 <eclipse-install-location>/configuration/org.eclipse.osgi/bundles/398/1/.cp/libswt-cairo-gtk-3449.so 404:52c3d000-52c43000 r-xp 00000000 00:2c 2003496 <eclipse-install-location>/configuration/org.eclipse.osgi/bundles/398/1/.cp/libswt-atk-gtk-3449.so 405:52c43000-52c44000 rwxp 00005000 00:2c 2003496 <eclipse-install-location>/configuration/org.eclipse.osgi/bundles/398/1/.cp/libswt-atk-gtk-3449.so 474:53519000-5351e000 r-xp 00000000 68:01 1200130 /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-gif.so 475:5351e000-5351f000 rwxp 00004000 68:01 1200130 /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-gif.so 486:53592000-535e7000 r-xp 00000000 00:2c 2003495 <eclipse-install-location>/configuration/org.eclipse.osgi/bundles/398/1/.cp/libswt-pi-gtk-3449.so 487:535e7000-535e9000 rwxp 00054000 00:2c 2003495 <eclipse-install-location>/configuration/org.eclipse.osgi/bundles/398/1/.cp/libswt-pi-gtk-3449.so 489:535ea000-535ed000 r-xp 00000000 00:2c 2003494 <eclipse-install-location>/configuration/org.eclipse.osgi/bundles/398/1/.cp/libswt-gtk-3449.so 490:535ed000-535ee000 rwxp 00002000 00:2c 2003494 <eclipse-install-location>/configuration/org.eclipse.osgi/bundles/398/1/.cp/libswt-gtk-3449.so 498:535fe000-53610000 r-xs 001d8000 00:2c 12779120 <eclipse-install-location>/plugins/org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar 526:53934000-53937000 r-xp 00000000 68:01 1200129 /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-bmp.so 527:53937000-53938000 rwxp 00002000 68:01 1200129 /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-bmp.so 528:53940000-5394c000 r-xp 00000000 68:01 1200766 /usr/lib/gtk-2.0/2.4.0/engines/libbluecurve.so 529:5394c000-5394d000 rwxp 0000b000 68:01 1200766 /usr/lib/gtk-2.0/2.4.0/engines/libbluecurve.so 544:53b39000-53b44000 r-xp 00000000 00:2c 23342803 <eclipse-install-location>/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/eclipse_1115.so 545:53b44000-53b45000 rwxp 0000a000 00:2c 23342803 <eclipse-install-location>/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/eclipse_1115.so 612:jvm_args: -Dosgi.requiredJavaVersion=1.5 -Xms2048m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m -Djava.library.path=/tmp/gtk-root-for-2.14.7/lib 613:java_command: <eclipse-install-location>/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar -os linux -ws gtk -arch x86 -showsplash -launcher <eclipse-install-location>/eclipse -name Eclipse --launcher.library <eclipse-install-location>/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/eclipse_1115.so -startup <eclipse-install-location>/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar -exitdata 20f8007 -vm /auto/integration/jdk1.6.0_03/bin/java -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms2048m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m -Djava.library.path=/ws/jmagnuso-sjc/gtk-root-for-2.14.7/lib -jar <eclipse-install-location>/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar 618:LD_LIBRARY_PATH=/auto/integration/jdk1.6.0_03/jre/lib/i386/server:/auto/integration/jdk1.6.0_03/jre/lib/i386:/auto/integration/jdk1.6.0_03/jre/../lib/i386:/tmp/gtk-root-for-2.14.7/lib
Thanks Maggie
Note that the eclipse launcher will be loading gtk to show the splash screen. This is c code and independent of java, -Djava.library.path won't work here. If you aren't using the splash screen, then swt will be the first to load gtk and then java.library.path would work.
To change the gtk found by the launcher you would need to set an environment variable LD_LIBRARY_PATH to point to the correct one.
(The launcher is just doing dlopen("libgdk-x11-2.0.so.0") )
-Andrew
Maggie wrote:Hi Tom,
Thanks for the suggestions.
Since I don't have "root" access to the system, so I can't try a) unless it's verified that is the cause of the crash.
I will try b).
Our system is RHEL4 with Ganymede+CDT 5.
Thanks Maggie
Tom Schindl wrote:Hi,
libgtk-x11-2.0.so.0 is a system library so you'd have to:
a) Upgrade your system to have the appropriate lib in your path b) You could tell Java to search for native libs in an additional location using -Djava.library.path
What system are you on? Which version of Eclipse are you trying?
Tom
Maggie schrieb:Hi,
Is there a way to specify a different version of libgtk to use? For example, like how we could specify a Java with "-vm"?
We recently see random crashes at libgtk-x11-2.0(see below) with
Ganymede and CDT 5. A little bit googling shows GTK 2.0 is a 7 years old
release. I want to try out the latest GTK which is 2.14. But not sure
how to invoke Eclipse with the new GTK?
# # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x0090a464, pid=28615, tid=4160527264 # # Java VM: Java HotSpot(TM) Server VM (1.6.0_03-b05 mixed mode) # Problematic frame: # C [libgtk-x11-2.0.so.0+0x1e8464] # # An error report file with more information is saved as hs_err_pid28615.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #
Any other ideas?
Thanks Maggie