I just installed openSUSE Tumbleweed and then downloaded eclipse latest version (eclipse-jee-2024-03-R-linux-gtk-x86_64.tar.gz). When I launch ‘eclipse’ application from this extracted folder, its failing to launch. It created a log file as shown below
!ENTRY org.eclipse.emf.ecore 2 0 2024-06-01 09:19:34.135
!MESSAGE Both ‘org.eclipse.jst.j2ee.core’ and ‘org.eclipse.jst.j2ee.core’ register a package for ‘application.xmi’
!ENTRY ch.qos.logback.classic 1 0 2024-06-01 09:19:34.246
!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized.
!ENTRY org.eclipse.osgi 4 0 2024-06-01 09:19:35.838
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-pi4-gtk-4964r8 in java.library.path: /usr/lib64/firefox:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
no swt-pi4-gtk in java.library.path: /usr/lib64/firefox:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
no swt-pi4 in java.library.path: /usr/lib64/firefox:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
Can’t load library: /home/manohar/.swt/lib/linux/x86_64/libswt-pi4-gtk-4964r8.so
Can’t load library: /home/manohar/.swt/lib/linux/x86_64/libswt-pi4-gtk.so
Can’t load library: /home/manohar/.swt/lib/linux/x86_64/libswt-pi4.so
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:345)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:97)
I googled it for very long time and tried to install GTK4 and other options given but nothing fixed it. Could you please me to fix this error and so that I would launch eclipse
!ENTRY org.eclipse.emf.ecore 2 0 2024-06-01 13:25:00.577
!MESSAGE Both ‘org.eclipse.jst.j2ee.core’ and ‘org.eclipse.jst.j2ee.core’ register a package for ‘application.xmi’
!ENTRY ch.qos.logback.classic 1 0 2024-06-01 13:25:00.754
!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized.
!ENTRY org.eclipse.osgi 4 0 2024-06-01 13:25:01.174
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-pi4-gtk-4964r8 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
no swt-pi4-gtk in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
no swt-pi4 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
Can’t load library: /home/manohar/.swt/lib/linux/x86_64/libswt-pi4-gtk-4964r8.so
Can’t load library: /home/manohar/.swt/lib/linux/x86_64/libswt-pi4-gtk.so
Can’t load library: /home/manohar/.swt/lib/linux/x86_64/libswt-pi4.so
I am unsure. However Run the following command and try again:
erlangen:~ # zypper install systemd-container
Loading repository data...
Reading installed packages...
'systemd-container' is already installed.
No update candidate for 'systemd-container-255.6-2.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
erlangen:~ #
I run eclipse-jee-2024-03 from the same tarball with Tumleweed 20240524 KDE and have no problems. I have not even installed the systemd-container package and i see no reason why systemd-container should be relevant. In my opinion the “Equinox Container” is just a OSGI component that eclipse is using as core component .
Interestingly my eclipse process does not load any of the mentioned swt shared libs
All of the swt libs are loaded from the eclipse install directory in my case.
Do you have installed other eclipse versions either manual or via zypper ?
Fyi when SWT_GTK=1 is set in the environment it should force the use of GTK4 libs. But if I do this to reproduce the problem i failed because eclipse does a fallback to the GTK3 libs:
...
SWT OS.java Error: Failed to load swt-pi4, loading swt-pi3 as fallback
..
Have you changed any eclipse settings after the installation ?
Many thanks for your inputs. I have not changed anything in my eclipse after the download. I tried with the environment variable SWT_GTK and then launched eclipse. Still its failing by looking for GTK4 libs
manohar@localhost:/opt/eclipse> ./eclipse
Jun 02, 2024 10:41:42 AM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.servlet.LogbackServletContainerInitializer of service jakarta.servlet.ServletContainerInitializer in bundle ch.qos.logback.classic
Jun 02, 2024 10:41:42 AM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic
10:41:43.546 [Start Level: Equinox Container: 10c4be4e-09d7-49f3-af7e-04e04da9cc14] DEBUG org.eclipse.jgit.internal.util.ShutdownHook – register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$160/0x00000001002663f8@6b810f6d with shutdown hook
10:41:43.546 [Start Level: Equinox Container: 10c4be4e-09d7-49f3-af7e-04e04da9cc14] DEBUG org.eclipse.jgit.internal.util.ShutdownHook – register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$160/0x00000001002663f8@6b810f6d with shutdown hook
SWT OS.java Error: Failed to load swt-pi3, loading swt-pi4 as fallback.
10:41:44.372 [ForkJoinPool-1-worker-1] DEBUG org.eclipse.jgit.internal.util.ShutdownHook – Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$160/0x00000001002663f8@6b810f6d during JVM shutdown
10:41:44.372 [ForkJoinPool-1-worker-1] DEBUG org.eclipse.jgit.internal.util.ShutdownHook – Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$160/0x00000001002663f8@6b810f6d during JVM shutdown
manohar@localhost:/opt/eclipse>
I just installed openSUSE Tumbleweed in my Windows host hyper-V and then downloaded eclipse latest tarball which is failing with the above shown errors. I also tried older versions of eclipse and they also failing with the same errors
Ok the find command sees no libswt*.so objects in your install folder.
I have installed the 2024-03 eclipse version in 2 virtual machines and in both if see the libswt*so files in the install directory e.g,
These files are not present after the installation from the tar ball in my VMs. They were extracted on the first eclipse startup from this jar file:
./plugins/org.eclipse.swt.gtk.linux.x86_64_3.125.0.v20240227-1638.jar
Even when i delete the libswt*.so files manual the next eclipse start will extract them again and eclipse is starting with no problem.
And it seems this does not happen in your case. So I would suspect that the Eclipse startup code ignores gtk3 for whatever reason and wants to force the use of GTK4. And this fails because the required libs are not installed. Unfortunately, I don’t have any in-depth knowledge of GTK and the Eclipse startup process. I also don’t know of a tumbleweed package that could provide the missing libswt-pi4 libs. Maybe it is a good idea to consult the experts of the eclipse community.
and has at least no effect on my systems for manual installed tar balls. I do not know what eclipse-swtchart is but i would not expect shaerd objects from a noarch package.
First this has absolut nothing to do with systemd-container.
I use a tarball with the same name. Here the md5 checksum so we can be sure it is the same:
> tree .swt
.swt
├── lib
│ └── linux
│ └── x86_64
└── trims.prefs
And i did install the tarball with my regular userid into ~/ide/eclipse. So when i start eclipse with my normal working account i have write permission to anything under ~/ide/eclipse.
When i trace the library laoding with
This was done on a KDE machine but works also on a second machine using gnome.
If possible log the library load with LD_DEBUG to a file and post it to paste.opensuse.org
I’m also able to reproduce this problem. On a fresh Tumbleweed install, there are some missing files (created after the first launch), when compared to the working Leap installation. On the fresh Tumbleweed install:
@heitormoreira @fmatt
I have at the moment not the time to dig deep in this but could you check if libgthread-2 is installed
LANG=C zypper se libgthread
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+------------------------+------------------------------------------------+--------
i | libgthread-2_0-0 | Portable API from glib wrapping system threads | package
| libgthread-2_0-0-32bit | Portable API from glib wrapping system threads | package
> LANG=C zypper se libgthread
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+------------------------+------------------------------------------------+--------
| libgthread-2_0-0 | Portable API from glib wrapping system threads | package
| libgthread-2_0-0-32bit | Portable API from glib wrapping system threads | package
It wasn’t installed. Installing it solved the problem.
How did you realize that this library was necessary?
Thank you very much.