Tux Guitar


Subject [ubuntu 64bit] tuxguitar work only with console

Author Message
Post: Nov 17th 2007 at 6:15 PM

when I execute:
on console...it works.
I create an element with alacarte
and I have this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/tuxguitar-0.9.1/lib/libswt-pi-gtk-3232.so: Can't load IA 32-bit .so on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
at org.eclipse.swt.internal.gtk.OS.(OS.java:22)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.(Display.java:126)
at org.herac.tuxguitar.gui.TuxGuitar.displayGUI(Unknown Source)
at org.herac.tuxguitar.gui.TuxGuitar.main(Unknown Source)

so I would like to know why it doesn't take:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/:/opt/tuxguitar-0.9.1/lib/
export CLASSPATH=$CLASSPATH:/usr/lib/java/swt.jar:/opt/tuxguitar-0.9.1/lib/swt

on ~/.bashrc ???
How to execute tuxguitar with gnome menu?
thanks for your help!

Back to Top
Post: Nov 17th 2007 at 6:54 PM

libswt-pi-gtk-3232.so is already taked..
the problem, is the library was builder for 32-bit but you have a 64 bit Arch.

You say "on console...it works.", So i think you have 2 swt version installed on your system..

your CLASSPATH say: /usr/lib/java/swt.jar
I'm sure you have "libswt3.2-gtk-java" and "libswt3.2-gtk-jni" packages installed from repositories for you 64 bit.
and libswt3.2-gtk-jni package add native libraries to:

tuxguitar, already include SWT library ( see at /opt/tuxguitar-0.9.1/lib ), but you downloaded a 32 bit version of tuxguitar..

So now take a look at your library path:
the last "/opt/tuxguitar-0.9.1/lib/" is overriden the first /usr/lib/jni/.. so you are loading the 32 bit *.so files..

The same happend with the CLASSPATH and swt.jar

So you should do this:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/
export CLASSPATH=$CLASSPATH:/usr/lib/java/swt.jar

Well, i'm not sure what "alacarte" is, but i don't think you need edit your .bashrc, i think you only need modify the "/opt/tuxguitar-0.9.1/tuxguitar" script file. and set the paths for your 64 bit version of SWT..
and remove /opt/tuxguitar-0.9.1/lib/swt* because it's only taking disk space

Back to Top
Post: Nov 17th 2007 at 7:13 PM

Yes I have remove
#export JAVA=/usr/lib/jvm/java-1.5.0-sun-
#export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/:/opt/tuxguitar-0.9.1/lib/
#export CLASSPATH=$CLASSPATH:/usr/lib/java/swt.jar:/opt/tuxguitar-0.9.1/lib/swt$

in .bashrc (like said on doc/README)
and I put:

in /etc/environment and I remove call of tuxguitar lib and it works.

Back to Top