Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UML Designer 9 - Can't load library: libswt-pi3-gtk.so #1060

Open
ruddy32 opened this issue Mar 29, 2020 · 2 comments
Open

UML Designer 9 - Can't load library: libswt-pi3-gtk.so #1060

ruddy32 opened this issue Mar 29, 2020 · 2 comments

Comments

@ruddy32
Copy link

ruddy32 commented Mar 29, 2020

Hi,
Starting UML Designer 9 on ArchLinux shows following message :

Can't load library: /home/.../.swt/lib/linux/x86_64/libswt-pi3-gtk-4763.so
Can't load library: /home/.../.swt/lib/linux/x86_64/libswt-pi3-gtk.so 

Previous version of UML Designer was package with libswt-pi3-gtk.so library. This is not the case for UML Designer 9. Is it normal ?
Regards.

@plibither8
Copy link

No response :(

@feheleno
Copy link

It's been a while but let me put my workaround here so if someone with the same problem happens to find this thread he/she can try to make it work the same way I did

First of all my setup:

Fedora 34 - 5.14.17-201.fc34.x86_64 

openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment 21.9 (build 17.0.1+12)
OpenJDK 64-Bit Server VM 21.9 (build 17.0.1+12, mixed mode, sharing)

My stacktrace shows as following

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
        /home/f148580/programas/UMLDesigner/configuration/org.eclipse.osgi/349/0/.cp/libswt-pi3-gtk-4763.so: 
/lib64/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
        no swt-pi3-gtk in java.library.path
        /home/f148580/.swt/lib/linux/x86_64/libswt-pi3-gtk-4763.so: /lib64/libfontconfig.so.1: 
undefined symbol: FT_Done_MM_Var
        Can't load library: /home/f148580/.swt/lib/linux/x86_64/libswt-pi3-gtk.so
        ...

It looks like the program can't load the libswt-pi3-gtk.so, but it actually find a undefined symbol FT_Done_MM_Var when it's expecting a defined one, as it seems.

I came to that conclusion reading this thread and as they point out it's some problem with the freetype lib. And in this thread prusa3d/PrusaControl#115 (comment) I found out how she dealt with her problem, and as it was solved with just preloading the freetype lib I thought it could work with UMLDesigner too.

So if your stacktarce is the same as mine then it's simple, you just preload the libfreetype.so like this:

$ LD_PRELOAD=/usr/lib64/libfreetype.so ./UMLDesigner

Now there were some things I did before getting to that solution and I don´t know if they are having unintended effects here, so I'm explainig all I did for completeness sake, but I undid everything I'm explaining below:

First I thought I didn´t have the libswt-pi3-gtk-4763.so, so I installed eclipse-swt

$ sudo dnf install eclipse-swt

I missed it because it is located in a hidden directory: /home/f148580/.swt/lib/linux/x86_64/libswt-pi3-gtk-4763.so

Then, because the error pointed to a libswt-pi3-gtk.so that I couldn't find anywhere, I went to that directory and created a symlink like this:

$ ln -s ./libswt-pi3-gtk-4763.so ./libswt-pi3-gtk.so

And I also did some customization in the UMLDesigner.ini file following #971 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants