I had a project that worked marvelously under GWT/Mac. However, I
have moved over to a Linux machine for my development. At the same
time I attempted to migrate to the GWT 1.5 RC1 from the website.
After downloading the Linux version of the GWT library and moving all
of my links in the Eclipse project to reflect the new jar files, I
attempted to recompile and run the application. However, it fails
with the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/hellings1/Public/gwt-linux-1.5.0/libswt-pi-gtk-3235.so:
/home/hellings1/Public/gwt-linux-1.5.0/libswt-pi-gtk-3235.so: wrong
ELF class: ELFCLASS32 (Possible cause: architecture word width
mismatch)
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 org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
at org.eclipse.swt.internal.gtk.OS.<clinit>(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.<clinit>(Display.java:126)
at com.google.gwt.dev.GWTShell.<clinit>(GWTShell.java:302)
I am on Ubuntu 8.04, AMD x86_64 system.
hellings1@ubuntu-desktop:~/workspace$ uname -a
Linux ubuntu-desktop 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC
2008 x86_64 GNU/Linux
Any ideas on how to remedy that?
--Greg
The least invasive solution would be to install a 32-bit JVM. The
more invasive solution is to install 32-bit Ubuntu. I'm not sure
which would be easier.
Ian
I'd say a .so is _exactly_ the same as a .dll, but I'd be wrong
because one is for Linux (and maybe other Unix-like operating systems)
and the other is for Windows. They serve the same purpose. The s and
o in .so stand for "shared object".
Any way, opening a .so won't do you any good--it's full of compiled
code and the pre-initialized data for that code. Glossing over
details, the reason the error is cropping up is because GWT (so far)
only comes with the bits to run in a 32-bit environment. Running in a
64-bit environment requires at least a recompile of the
platform-specific code but, because there are differences between 64-
and 32-bit environments (pointer size, definition of a long, etc.),
there are sometimes problems that need to be smoothed over as well.
Thankfully, when AMD decided to create a 64-bit extension to the x86
instruction set, they did so in a backwards-compatible way, so you can
run 32-bit code in a 64-bit environment, and you'll never know the
difference. The only trick is that you have to set things up properly
to take advantage of this backwards-compatibility. Installing a
32-bit JVM should be enough. If that causes incompatibilities (it
shouldn't--I had that configuration running perfectly fine two years
ago until I realized the 64-bitness wasn't buying me anything except
grief and I went 32-bit all the way), you can just install a 32-bit
Linux on your 64-bit machine. 32-bit Linux provides all the same
features you have now, except your database will be limited to
consuming terabytes of disk space instead of yottabytes, or something
equally irrelevant, and your processes will be limited to roughly 3
gigabytes of RAM rather than several exabytes. I admit there are some
specialized circumstances where a 64-bit processor is actually
necessary, but I'd be really surprised if any machine running GWT's
hosted mode fell into one of those.
Ian
Ian