This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCStudio crashes on Fedora 36 on startup (UnsatisfiedLinkError)

Hello,

I upgraded from Fedora 35 to Fedora 36 and now CCS refuses to launch. Under Fedora 35 everything worked fine. I tested with a fresh install of the newest CCS version (11.2).

The error is logged in a file (attached) and boils down to the following:

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
Can't load library: ~/swt/lib/linux/x86_64/libswt-pi4-gtk.so

This seems to be an eclipse problem. I found the discussion [1] and several similar posts, none of which could solve my problem.

Any ideas on how to tackle this?

Convenience warning: I'll be offline until next week shortly.

Thanks in advance

[1] github.com/.../42

!SESSION 2022-05-25 11:52:16.634 -----------------------------------------------
eclipse.buildId=4.19.0.I20210303-1800
java.version=11.0.13
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Framework arguments:  -product com.ti.ccstudio.branding.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product com.ti.ccstudio.branding.product

!ENTRY org.eclipse.osgi 4 0 2022-05-25 11:52:17.569
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	no swt-pi4-gtk-4942r22 in java.library.path: [/home/markus/ti/ccs1120/ccs/eclipse/jre/lib/server, /home/markus/ti/ccs1120/ccs/eclipse/jre/lib, ., /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
	no swt-pi4-gtk in java.library.path: [/home/markus/ti/ccs1120/ccs/eclipse/jre/lib/server, /home/markus/ti/ccs1120/ccs/eclipse/jre/lib, ., /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
	Can't load library: /home/markus/.swt/lib/linux/x86_64/libswt-pi4-gtk-4942r22.so
	Can't load library: /home/markus/.swt/lib/linux/x86_64/libswt-pi4-gtk.so

	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:338)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:257)
	at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:96)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:209)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:155)
	at org.eclipse.swt.widgets.Display.<clinit>(Display.java:163)
	at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:726)
	at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:168)
	at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:182)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1461)

  • Hello,

    The vast majority of these issues are due to missing dependencies.

    Can you confirm that you resolved any missing dependencies that was detected by the installer?

    Also please note that Fedora is not an officially supported environment by CCS (though many people do use it successfully with CCS) hence the level of support we can provide for this will be limited.

    Thanks

    ki

  • I reran the installer and it did not report any dependency issues.

    The issue I linked references a comment [1] having the same problem on Ubuntu LTS 22.04.

    [1] github.com/.../38

  • I could not reproduce the problem with Ubuntu 22.04, so this seems to be an issue specific to Fedora 36 and its package collection.

  • I can reproduce the issue on Fedora 36. However I don't have an issue on Fedora 35.

  • This seems to be an incompatibility between CCS and the Fedora glibc. After some tinkering I got the following error message:

    java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    /home/markus/ti/ccs1120/ccs/eclipse/configuration/org.eclipse.osgi/479/0/.cp/libswt-pi3-gtk-4942r22.so: /home/markus/ti/ccs1120/ccs/eclipse/../ccs_base/common/bin/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib64/libicuuc.so.69)
    no swt-pi3-gtk in java.library.path: [/home/markus/ti/ccs1120/ccs/eclipse/jre/lib/server, /home/markus/ti/ccs1120/ccs/eclipse/jre/lib, ., /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
    /home/markus/.swt/lib/linux/x86_64/libswt-pi3-gtk-4942r22.so: /home/markus/ti/ccs1120/ccs/eclipse/../ccs_base/common/bin/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib64/libicuuc.so.69)
    Can't load library: /home/markus/.swt/lib/linux/x86_64/libswt-pi3-gtk.so
    /home/markus/.swt/lib/linux/x86_64/libswt-pi3-gtk-4942r22.so: /home/markus/ti/ccs1120/ccs/eclipse/../ccs_base/common/bin/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib64/libicuuc.so.69)

    I then moved away the libstc++ so that the system version will be used:

    cd /home/markus/ti/ccs1120/ccs/eclipse/../ccs_base/common/bin/

    mkdir exclude

    mv libstdc++.so* exclude/

    Now everything works as desired.

  • For reference: the trick was to start CCS with SWT_GTK4="1" in the environment.

  • Glad you were able to resolve the issue and thank you for sharing your solution!