Tux Guitar

Problems

Subject 10rc2 does not work with swt-3.3



Author Message
SiD
Post: Mar 13th 2008 at 6:24 PM

The Linux_x86 binary version needs swt-version 3.4 but it's the development version. Stable Version is swt-3.3.

With swt-3.3 I Tuxguitar does not start and I get this error.

[code]
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-gtk-3428 or swt-gtk in swt.library.path, java.library.path or the jar file
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.(Unknown Source)
at org.herac.tuxguitar.gui.TuxGuitar.displayGUI(Unknown Source)
at org.herac.tuxguitar.gui.TGMain.main(Unknown Source)
[/code]


Back to Top
 
Julian
Post: Mar 13th 2008 at 7:03 PM

1.0-rc* was developed with SWT-3.3, and it work without any problem. ( the app was released with 3.4 because it fix some 3.3 bugs )

the exeption you paste here, is because SWT native libraries of your swt package are not at java.library.path. (it'll happen with 3.4 too if *.so files aren't at library path )

However... since 3.3 swt ( official package ) include *.so files on the jar package. and when swt load, extract that files to /tmp and load them. so if you have an official swt release, the native libraries should be already on the swt.jar file.

but if you have a third party release, maybe the .so files are on other folder. so you must set the java.library.path property to the JVM on the tuxguitar launcher script.


Back to Top
 
Anonymous
Post: Mar 13th 2008 at 7:15 PM

ah, ok, the problem was that I mounted my /tmp partition "noexec"


Back to Top
 
Julian
Post: Mar 13th 2008 at 7:30 PM

mmm.. ok i understand, but... why swt-3.4 worked ? ( or just you didn't test with 3.4 ? )

if you want keep your /tmp on noexec, you can extract the *.so files from swt.jar to the lib folder..
e.g:
tuxguitar-1.0-rc2-xxx/lib/swt.jar
tuxguitar-1.0-rc2-xxx/lib/libswt-xxx.so

Important: if you extract the files, don't forget remove them from the .jar


Back to Top
 
SiD
Post: Mar 13th 2008 at 8:02 PM

Yes with swt-3.4 installed it worked. The libswt-xxx.so files are installed in /usr/lib/ in my distro. (Arch-Linux)

Hm, with swt-3.3 installed on my system tuxguitar tried to use the extracted files on /tmp but that failed cause of the 'noexec' option, right?


Back to Top
 
SiD
Post: Mar 13th 2008 at 8:09 PM

I mean:
Tuxguitar tries to use the swt-3.4 files on /tmp cause it does not find them in /usr/lib if swt-3.3 is installed on my system. If swt-3.4 is installed it uses the files in /usr/lib. Am I right?


Back to Top
 
Julian
Post: Mar 13th 2008 at 8:29 PM

well, really tuxguitar don't try load nothing.
tuxguitar use swt classes ( swt.jar ), and swt is who load his native libraries.
about how swt work ( since 3.3 ) :

1* first swt try get lib*.so as "resource" files from java classpath (swt.jar is at java classpath ).
if it found them, it copy that files to /tmp and try load.

2* only if first step fails (if fails it don't show errors ), it try load the libraries from java.library.path, and if it also fails, it throw the "UnsafisfiedLinkError".

so in your error, if first tried to load from .jar ( i think because the 'nonexec' option. but i'm not sure )
then as if failed, i tried to load from java.library.path, but as it don't found nothing it throwed the error.

tuxguitar script file, already set java.library.path from standart LD_LIBRARY_PATH folders.
so i think 3.4 worked because it could found the libraries on /usr/lib


Back to Top
 
SiD
Post: Mar 13th 2008 at 8:34 PM

ah, ok.
THANKS


Back to Top