Go Down

Topic: arduino on Gentoo AMD64 (Read 1 time) previous topic - next topic


I have problems getting arduino 0006 to work. I followedthe manual on http://www.arduino.cc/playground/Linux/Gentoo but it won't make it happen.

# ./run.sh
Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct
java.lang.UnsatisfiedLinkError: /root/arduino-0006/build/linux/work/lib/librxtxSerial.so: /root/arduino-0006/build/linux/work/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /root/arduino-0006/build/linux/work/lib/librxtxSerial.so: /root/arduino-0006/build/linux/work/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32
       at java.lang.ClassLoader$NativeLibrary.load(Native Method)
       at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
       at java.lang.Runtime.loadLibrary0(Runtime.java:788)
       at java.lang.System.loadLibrary(System.java:834)
       at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
       at processing.app.Editor.populateSerialMenu(Editor.java:836)
       at processing.app.Editor.buildToolsMenu(Editor.java:730)
       at processing.app.Editor.<init>(Editor.java:174)
       at processing.app.Base.<init>(Base.java:202)
       at processing.app.Base.main(Base.java:177)

Help is very much apreciated!

Thanks, bart


I know nothing about Gentoo, but it sounds like you're getting the 32 bit version of RXTX (which is a Java and native library for doing serial communication) when you need a 64 bit version.  You may need to download it from http://www.rxtx.org/ and compile it yourself.  


Nov 30, 2006, 04:33 pm Last Edit: Nov 30, 2006, 05:10 pm by bart Reason: 1
Thanks, in the end i got the program to run by copying librxtxSerial.so:
# cp /usr/lib64/rxtx-2/librxtxSerial.so ~/trunk/build/linux/work/lib/

Arduino is recognised, but compiling sketches fails (see below)
Could this be because more .so files are wrong?

error compiling Led_blink:

/home/abortx/trunk/build/linux/work/lib/targets/arduino/WInterrupts.c: In function `attachInterrupt':

/home/abortx/trunk/build/linux/work/lib/targets/arduino/WInterrupts.c:45: error: `GICR' undeclared (first use in this function)

/home/abortx/trunk/build/linux/work/lib/targets/arduino/WInterrupts.c:45: error: (Each undeclared identifier is reported only once

/home/abortx/trunk/build/linux/work/lib/targets/arduino/WInterrupts.c:45: error: for each function it appears in.)

/home/abortx/trunk/build/linux/work/lib/targets/arduino/WInterrupts.c: In function `detachInterrupt':

/home/abortx/trunk/build/linux/work/lib/targets/arduino/WInterrupts.c:56: error: `GICR' undeclared (first use in this function)

Couldn't determine program size: /usr/bin/avr-size: '/tmp/build58558.tmp/led_blink.hex': No such file


Ah, it sounds like you've checked the code out of svn.  It's in development at the moment, so may not be stable.  You might want to use the source distribution at http://www.arduino.cc/en/Main/Software.  Which Arduino board are you using?


Ah, it sounds like you've checked the code out of svn.  It's in development at the moment, so may not be stable.  You might want to use the source distribution at http://www.arduino.cc/en/Main/Software.  Which Arduino board are you using?

I will try this tonight.
I have an Arduino NG


Dec 01, 2006, 12:06 am Last Edit: Dec 01, 2006, 12:36 am by bart Reason: 1
Ok, in the end i reinstalled arduino as you asked me to. It runs ok, no compile errors! I actually copied  /usr/lib/rxtx-2/* and also /usr/share/rxtx-2/lib/RXTXcomm.jar to arduino-0006/build/linux/work/lib/ to make it work.

But it doesn't want to upload to the board:

Code: [Select]
Binary sketch size: 4814 bytes (of a 14336 byte maximum)

-dpart: Invalid name.

HEY! ok, just tried my Atmega8 instead of my Atmega168 (and adjusted the setting accordingly) and with my Atmega8 it uploads.
This actually means that also the installation on my older x86 pc works! (same error with same atmega168)
Kewl!! :)  EDIT: it also worked for the cvs version
Quetsion though: Maybe you have a tip how i can make it work withing a normal user (instead of root) to?
In a normal user the 'serial port' menu is greyed out..
Code: [Select]
Binary sketch size: 4610 bytes (of a 7168 byte maximum)

Error: No such file or directory
-> COM1


Ah, yes.  The program we use to upload sketches to the board, uisp, is a bit obsolete and the standard release doesn't work with ATmega168s.  The version that comes with the Arduino environment has been patched to work with ATmega168s, but the one you have probably hasn't been.  I'll try to find the patch I applied to the source so you can build a Linux version that supports the 168.


That would be great! Thanks..


The source package is available here: http://www.arduino.cc/playground/uploads/Linux/uisp-20050207-m168.zip

You'll have to build it yourself, sorry about that.  


after i installed i had to mv /usr/local/bin/uisp /usr/bin/
Actually for gentoo users who already emerged uisp, it migth be handier to just first
emerge --unmerge uisp
become root and
unzip uisp-20050207-m168.zip
cd uisp-20050207-m168
make && make install

One more question:  even though i added my user to the uusp group, if i open arduino as non-root user, i don't get acces tom the serial port. This also counts for PD, so it's not arduino related, but if you have a tip where to search?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131