You are not logged in.

#1 2022-03-25 23:10:36

rdkehn
Member
Registered: 2015-03-04
Posts: 9

[SOLVED] Could not load SWT library.

I just updated (pacman -Syu) and now STM32CubeIDE 1.5.1 fails to run with the error below. I read and tried the solution in https://bbs.archlinux.org/viewtopic.php?id=262390 with no luck. Any suggestions will be appreciated. My system is 5.16.16-arch1-1 with java-8-openjdk/jre. I have not yet tried rolling back the update.

Thanks,
...doug

---8<---

!SESSION 2022-03-25 16:23:00.533 -----------------------------------------------
eclipse.buildId=Version 1.5.1
java.version=1.8.0_272
java.vendor=AdoptOpenJDK
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2022-03-25 16:23:01.431
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
    no swt-pi4-gtk-4934r6 in java.library.path
    no swt-pi4-gtk in java.library.path
    Can't load library: /home/dkehn/.swt/lib/linux/x86_64/libswt-pi4-gtk-4934r6.so
    Can't load library: /home/dkehn/.swt/lib/linux/x86_64/libswt-pi4-gtk.so

    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:342)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:256)
    at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:90)
    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:164)
    at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:760)
    at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:166)
    at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:180)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

Last edited by rdkehn (2022-03-28 14:43:11)

Offline

#2 2022-03-26 09:59:39

robinOP
Member
From: San Francisco, US
Registered: 2022-01-20
Posts: 12
Website

Re: [SOLVED] Could not load SWT library.

 Can't load library: /home/dkehn/.swt/lib/linux/x86_64/libswt-pi4-gtk-4934r6.so 
 Can't load library: /home/dkehn/.swt/lib/linux/x86_64/libswt-pi4-gtk.so

Did you try to download missing SWT library files?

Offline

#3 2022-03-28 14:36:46

rdkehn
Member
Registered: 2015-03-04
Posts: 9

Re: [SOLVED] Could not load SWT library.

robinOP wrote:

Did you try to download missing SWT library files?

At first, no. My initial searches didn't reveal the swt AUR. After loading swt, and linking /usr/lib/libswt-pi4-gtk-4948r9.so to $HOME/.swt.lib/linux/x86_64/libswt-pi4-gtk-4934r6.so, I got the following error:

/usr/lib/libswt-pi4-gtk-4948r9.so: /usr/lib/libcairo.so.2: undefined symbol: FT_Get_Color_Glyph_Layer

I found this related post:

https://www.reddit.com/r/archlinux/comm … em_update/

I downgraded cairo from 1.17.6-1 to 1.17.4-5 and STM32CubeIDE 1.5.1 is working again. I also uninstalled the swt AUR and STM32CubeIDE 1.5.1 still works. The problem appears to be with the latest cairo update.

Last edited by rdkehn (2022-03-28 14:37:44)

Offline

#4 2022-03-28 14:48:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Could not load SWT library.

FT_Get_Color_Glyph_Layer is part of the current freetype2. Sounds like a partial update problem, what version do you have?

Offline

#5 2022-03-28 14:57:52

rdkehn
Member
Registered: 2015-03-04
Posts: 9

Re: [SOLVED] Could not load SWT library.

Scimmia wrote:

FT_Get_Color_Glyph_Layer is part of the current freetype2. Sounds like a partial update problem, what version do you have?

I have 2.11.1-1

~
$ pacman -Qi freetype2
Name            : freetype2
Version         : 2.11.1-1
Description     : Font rasterization library
Architecture    : x86_64
URL             : https://www.freetype.org/
Licenses        : GPL
Groups          : None
Provides        : libfreetype.so=6-64
Depends On      : zlib  bzip2  sh  libpng  harfbuzz  brotli
Optional Deps   : None
Required By     : cairo  chromium  ffmpeg  ffmpeg4.4  fontconfig  harfbuzz  imlib2  java8-openjfx  jre-openjdk-headless
                  libass  libbluray  libraqm  librsvg  libxfont2  mupdf  webkit2gtk
Optional For    : grub  tumbler
Conflicts With  : None
Replaces        : None
Installed Size  : 1628.54 KiB
Packager        : Andreas Radke <andyrtr@archlinux.org>
Build Date      : Thu 02 Dec 2021 08:24:20 AM CST
Install Date    : Fri 17 Dec 2021 04:18:06 PM CST
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature

Offline

#6 2022-03-28 15:03:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Could not load SWT library.

Then you're probably loading an old libfreetype from somewhere else. If you can't find it, setting LD_DEBUG=files should tell you where it is.

Offline

#7 2022-03-28 16:36:12

rdkehn
Member
Registered: 2015-03-04
Posts: 9

Re: [SOLVED] Could not load SWT library.

Scimmia wrote:

Then you're probably loading an old libfreetype from somewhere else. If you can't find it, setting LD_DEBUG=files should tell you where it is.

That was it! Thanks for the suggestion.

STM32CubeIDE 1.5.1 provides/uses it's own libfreetype.so.6 (<install-path>/stm32cubeide_1.5.1/jre/lib/amd64/libfreetype.so.6). I linked to /lib/libfreetype.so and the IDE still worked. I then updated Arch (pacman -Syu) and the IDE still works.

Offline

Board footer

Powered by FluxBB