Running Arduino 1.0 on 64bit Linux, IDE won't start

Hi All,

I'm getting a weird error when I try to run the 64-bit version of the Arduino IDE on a 64-bit linux (Ubuntu 10.04):

joefernandez@joefernandez:~/opt/arduino-1.0-64bit$ ./arduino 
java.lang.UnsatisfiedLinkError: /home/joefernandez/opt/arduino-1.0-64bit/lib/librxtxSerial.so: /home/joefernandez/opt/arduino-1.0-64bit/lib/librxtxSerial.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/joefernandez/opt/arduino-1.0-64bit/lib/librxtxSerial.so: /home/joefernandez/opt/arduino-1.0-64bit/lib/librxtxSerial.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1755)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1680)
    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    at java.lang.System.loadLibrary(System.java:1047)
    at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83)
    at processing.app.Editor.populateSerialMenu(Editor.java:969)
    at processing.app.Editor.buildToolsMenu(Editor.java:697)
    at processing.app.Editor.buildMenuBar(Editor.java:482)
    at processing.app.Editor.(Editor.java:204)
    at processing.app.Base.handleOpen(Base.java:700)
    at processing.app.Base.handleOpen(Base.java:665)
    at processing.app.Base.handleNew(Base.java:561)
    at processing.app.Base.(Base.java:301)
    at processing.app.Base.main(Base.java:190)

I tried running the 32-bit version on the same machine, and it works fine.

What gives?

Ah, I found the problem! 8)

In the current (4/27/12), 64-bit version distribution there are two librxtxSerial files:

joefernandez@joefernandez:~/opt/arduino-1.0-64bit/lib$ ls -la lib*
-rw-r--r-- 1 joefernandez eng 182189 2011-11-28 17:05 librxtxSerial64.so
-rw-r--r-- 1 joefernandez eng 182189 2011-11-28 17:05 librxtxSerial.so

However, you can see from the file sizes that they exactly the same size (~177.9 KB). In the (working) 32-bit version they are different:

joefernandez@joefernandez:~/opt/arduino-1.0-32bit/lib$ ls -la lib*
-rw-r--r-- 1 joefernandez eng 182189 2011-11-28 16:56 librxtxSerial64.so
-rw-r--r-- 1 joefernandez engĀ  48304 2011-11-28 16:56 librxtxSerial.so

So I copied lib/librxtxSerial.so from the 32-bit distribution into the 64-bit /lib directory (overwriting the original) and now it works!

Looks like a mistake in the 64-bit linux distribution package. Please fix this, guys!

\Joe

Follow-up on the original solution to this problem.

I have since switched my primary JVM from a version of the 64-bit OpenJDK to the 64-bit Oracle Java JDK, by making the Oracle JDK the first one on my PATH. Now the Arduino environment starts up with no problems, using the distribution as provided (i.e., without swapping the serial libraries around).