tiistai 14. kesäkuuta 2016

Jaspersoft Studio 6.2.2 on Fedora 23: no swt-pi-gtk in java.library.path

When starting Jaspersoft Studio 6.2.2 only thing I got was

Jaspersoft Studio:
GTK+ Version Check
Jaspersoft Studio:
An error has occurred. See the log file
/home/jyrki/projects/jasper/TIBCOJaspersoftStudio-6.2.2.final/configuration/1465956968426.log.

Log file had:

TIBCOJaspersoftStudio-6.2.2.final/configuration/org.eclipse.osgi/264/0/.cp/libswt-pi-gtk-4530.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
no swt-pi-gtk in java.library.path
/home/jyrki/.swt/lib/linux/x86/libswt-pi-gtk-4530.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
Can't load library: /home/jyrki/.swt/lib/linux/x86/libswt-pi-gtk.so
Problem got fixed after installing gtk2.i686 (32 bit version)

sudo dnf install gtk2.i686

Using ldd (print shared library dependencies) helped to find out what was actually missing, as the error message is somewhat miss leading (Can't load library: /home/jyrki/.swt/lib/linux/x86/libswt-pi-gtk.so)

ldd /home/jyrki/projects/jasper/TIBCOJaspersoftStudio-6.2.2.final/configuration/org.eclipse.osgi/264/0/.cp/libswt-pi-gtk-4530.so
ldd: warning: you do not have execution permission for `/home/jyrki/projects/jasper/TIBCOJaspersoftStudio-6.2.2.final/configuration/org.eclipse.osgi/264/0/.cp/libswt-pi-gtk-4530.so'
linux-gate.so.1 (0xf7741000)
libgtk-x11-2.0.so.0 => not found
libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0xf76af000)
libXtst.so.6 => /lib/libXtst.so.6 (0xf76a8000)
libc.so.6 => /lib/libc.so.6 (0xf74da000)
libpthread.so.0 => /lib/libpthread.so.0 (0xf74bd000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0xf737b000)
libX11.so.6 => /lib/libX11.so.6 (0xf723a000)
libXext.so.6 => /lib/libXext.so.6 (0xf7226000)
libXi.so.6 => /lib/libXi.so.6 (0xf7214000)
/lib/ld-linux.so.2 (0x5660d000)
libxcb.so.1 => /lib/libxcb.so.1 (0xf71ed000)
libdl.so.2 => /lib/libdl.so.2 (0xf71e8000)
libXau.so.6 => /lib/libXau.so.6 (0xf71e4000)