Ubuntu - Wireless Toolkit 2.5.1 EA
I successfully installed the new Sun Wireless Toolkit 2.5.1 EA on my Ubuntu 6.06 Dapper system.
However, when I try to run any example MIDlet in the toolkit, it gives me this error:
java.lang.UnsatisfiedLinkError: /usr/share/WTK2.5.1EA/bin/sublime.so: Can't load IA 32-bit .so on a IA 32-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:1647)
at java.lang.Runtime.load0(Runtime.java:769)
at java.lang.System.load(System.java:968)
at com.sun.kvem.Sublime.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.sun.kvem.Lime.createLime(Unknown Source)
at com.sun.kvem.KVMBridge.<init>(Unknown Source)
at com.sun.kvem.KVMBridge.getBridge(Unknown Source)
at com.sun.kvem.midp.MIDP.run(Unknown Source)
at com.sun.kvem.environment.EmulatorInvoker.runEmulatorImpl(Unknown Source)
at com.sun.kvem.environment.EmulatorInvoker.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.kvem.environment.JVM.main(Unknown Source)
What am I doing wrong? It says I can't load an IA 32-bit .so on an IA 32-bit platform. What does that mean?
Any feedback would be most appreciated.
# 2
> i have no idea about Ubuntu. But the error seems to
> be of native Library. And that can be solved by add
> native library path to path Enviorment
> Variable. At least it worked for me in Windows
> Enviorment.
Well, I added the path to the SDK and WTK. Mind you, I also specified their respective bin and lib paths.
I still got the same error. Anyone else get a chance to run this in Linux?
# 6
I tried the LD_LIBRARY_PATH variable, although it is said:
LD_LIBRARY_PATH is used in preference to any run time or default system linker path. If (God forbid) you had it set to something like /dcs/spod/baduser/lib, if there was a hacked version of libc in that directory (for example) your account could be compromised. It is for this reason that set-uid programs completely ignore LD_LIBRARY_PATH.
However, I created the variable and made sure it used the WTK lib path AND I upgraded to the 1.6 JDK. Doing both of these things did not resolve the issue...
There are a lot of Ubuntu users out there, which is now even shipping with some Dell computers. Ironic: The WTK is actually easier to install in a Windows environment than a Linux environment.
# 8
that's not all there is to it -- for example, on Debian etch, it does not work at all. That is probably due to the fact that sublime.so is compiled against libc6 2.4.
Since Debian etch (and Ubuntu dapper) only have glibc 2.3.x, the library is incompatible. You can see that when you do ldd /path/to/sublime.so -- like this:
mcornils@asus:~/bt/WTK2.5.1/bin$ ldd sublime.so
./sublime.so: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by ./sublime.so)
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e3f000)
/lib/ld-linux.so.2 (0x80000000)
So, upgrade to more recent versions (lenny has glibc 2.5, edgy and feisty are ok, too) or get Sun to recompile against the older glibc (which might be difficult since they probably rely on some new glibc 2.4 features).
Good luck,
-Malte
# 9
I don't know if you worked out this problem, but it seems pretty obvious to me you have the wrong java packages installed. As I understand it, the ia32-* packages are for 64bit boxes wanting to have a ia32 JRE, get ride of those and install the native ones, as in:
(*) dpkg --purge ia32-sun-java6-bin ; apt-get install sun-java6-jre sun-java6-bin
after that, make sure you point your alternatives* to the right one using 'update-alternatives' script or 'update-java-alternatives'. Keep in mind that
you don't really need the first step described here if you know how to work with debian's alternatives system, you just need to choose the right java provider.
Best regards and sorry for my weird English.
Reynaldo
(*) Same goes for -java5- packages