You are not logged in.
I am trying to run a simulation software called Comsol which is based on Eclipse and the SWT toolkit. It ships with its own version of Java. Officially they do not support Arch (only Debian and Red Hat based distros) so their tech support can't really help any more. Hope someone here can help or I'd have to install a new distro just for this one software.
The error I face when I run the comsol command is pasted below from the log file:
!ENTRY org.eclipse.osgi 4 0 2022-08-15 10:03:35.260
!MESSAGE Application error
!STACK 1
Exception:
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-pi4-gtk-4932r18 in java.library.path
no swt-pi4-gtk in java.library.path
/home/rushin/.swt/lib/linux/x86 64/libswt-pi4-gtk-4932r18.so: /usr/lib/libcairo.so.2: undefined symbol: FT Get Color Glyph Layer
Can't load library: /home/rushin/.swt/lib/linux/x86 64/libswt-pi4-gtk.so
/home/rushin/.swt/lib/linux/x86 64/libswt-pi4-gtk-4932r18.so: /usr/lib/libcairo.so.2: undefined symbol: FT Get Color Glyph Layer
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Could not load SWT library. Reasons:
no swt-pi4-gtk-4932r18 in java.library.path
no swt-pi4-gtk in java.library.path
/home/rushin/.swt/lib/linux/x86 64/libswt-pi4-gtk-4932r18.so: /usr/lib/libcairo.so.2: undefined symbol: FT Get Color Glyph Layer
Can't load library: /home/rushin/.swt/lib/linux/x86 64/libswt-pi4-gtk.so
/home/rushin/.swt/lib/linux/x86 64/libswt-pi4-gtk-4932r18.so: /usr/lib/libcairo.so.2: undefined symbol: FT Get Color Glyph LayerNote that I do have /home/rushin/.swt/lib/linux/x86 64/libswt-pi3-gtk-4932r18.so but not the pi4 variant. Another detail to mention is that a while ago when I was getting a similar error I could downgrade cairo and the issue would resolve itself. However that is still a messy workaround and it would break my Inkscape for example. Now downgrading cairo doesn't help either... The undefined symbol error goes away but the pi4 not found error still persists. When I rename/link my *pi4*.so to *pi3*.so the logs change as follows:
!ENTRY org.eclipse.osgi 4 0 2022-08-15 10:25:25.786
!MESSAGE Application error
!STACK 1
Exception:
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-pi4-gtk-4932r18 in java.library.path
no swt-pi4-gtk in java.library.path
/home/rushin/.swt/lib/linux/x86 64/libswt-pi3-gtk-4932r18.so: /usr/lib/libharfbuzz.so.0: undefined symbol: FT Get Transform
Can't load library: /home/rushin/.swt/lib/linux/x86 64/libswt-pi4-gtk.so
/home/rushin/.swt/lib/linux/x86 64/libswt-pi3-gtk-4932r18.so: /usr/lib/libharfbuzz.so.0: undefined symbol: FT Get Transform
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Could not load SWT library. Reasons:
no swt-pi4-gtk-4932r18 in java.library.path
no swt-pi4-gtk in java.library.path
/home/rushin/.swt/lib/linux/x86 64/libswt-pi3-gtk-4932r18.so: /usr/lib/libharfbuzz.so.0: undefined symbol: FT Get Transform
Can't load library: /home/rushin/.swt/lib/linux/x86 64/libswt-pi4-gtk.so
/home/rushin/.swt/lib/linux/x86 64/libswt-pi3-gtk-4932r18.so: /usr/lib/libharfbuzz.so.0: undefined symbol: FT Get TransformAgain I hope this is not beyond the scope of the forums being an unsupported proprietary software but I really really do not want to switch distros just for this and I find it hard to believe that there is no way to fix this in Arch.
Last edited by rushinc (2022-08-29 18:48:46)
Offline
Eclipse + SWT has been a steaming heap of version hell for a while. You should run the EXACT version of Eclipse that the vendor/project recommends, which usually also means running on a specific JDK to match. You may even be forced to run the ol' Sun/Oracle JDK. I would look at that first before entering the world of pain that is GTK-compatibility-with-SWT.
Offline
I see. I have not installed any versions of Eclipse and the software ships with its own JDK so I don't even fidget with that. I will try to install the right version of Eclipse and try pointing the software to those libraries in case that helps.
For now I just dual boot to something Deb-based so I can work. It is really surprising (and somewhat disappointing) how well it works there though. In Arch, even when it worked I had issues like menus popping randomly anywhere and textboxes not taking focus. Pretty annoying because I am so much comfortable with Arch in every way except when it comes to this software... Just curious, what are Debian/RHEL doing differently to maintain compatibility with all this mess?
Offline
I had the same problem. Here is what fixed it for me.
1) I replaced the jdk bundled with Comsol with jdk11-openjdk provided by archlinux (Comsol specifically requires java 11). You do this in the Comsol installer.
2) The error message changed to harfbuzz missing a symbol (FT_Get_Transform or something along this line). I've then noticed that Comsol is using the libfreetype library provided by Matlab. I removed the 3 files (MATLAB)/bin/glnx64a/libfreetype* (ugly I know) and everything started working. Matlab is also working.
To answer your last question, probably Debian et al use older library versions which work with the libraries bundled with Comsol and Matlab. I remember that Comsol 6 worked after I installed it but stopped working after a couple of days, probably after an update .
[Update]: Actually, step 2 by itself seems to work well.
Last edited by bog (2022-08-27 18:39:58)
Offline
Thanks so much! Don't know why Comsol is looking inside Matlab for some library files but whatever.
Offline
I further figured out that you could just run
LD_PRELOAD=/usr/lib/libfreetype.so comsoland it works fine.
Offline