Go Down

Topic: my experience trying to install arduino on Ubuntu (Read 4026 times) previous topic - next topic

android

I downloaded arduino-0009 onto my AMD 64-bit Ubuntu.

When I run arduino I get an error to the effect "can't link a 32-bit .so on your 64-bit Linux box" so I used svn to checkout the source from berliOS.de...

i found make.sh under [...]/trunk/build/linux; in that script it has this comment:

"before running this script, you must set CLASSPATH to your standard Java classpath"

what is "my standard Java classpath" I wonder? Can you tell I've built nothing with Java on this Linux flavor before?

mellis

You don't actually need to rebuild all of Arduino, just avrdude.  Grab it from the avrdude-5.4-arduino directory of the Arduino svn (instead of trunk).  You should be able to do a standard ./configure; make.  Then copy avrdude and avrdude.conf over the ones in the Arduino 0009 distribution.

android

thanks for the reply; i did

svn co svn://svn.berlios.de/arduino/avrdude-5.4-arduino

...but I don't see a configure script; ./configure at the bash prompt gives:


[...] No such file or directory

mellis

Damn.  I'm an idiot.  I forgot that the version in SVN doesn't have a configure script; you need to run the bootstrap script, which requires that you have the right versions of autoconf and automake installed.  I'll upload an archive of the source with the configure scripts already generated on Monday.  If you don't want to wait, just run bootstrap and it will tell you which versions you need to generate the configure script.

android

thanks. I ran bootstrap, it told me I needed autoconf 2.59 (I didn't have any version installed).

I installed autoconf using Synaptic Package Manager, but it only listed version 2.61. bootstrap doesn't seem to do anything except tell me I don't have the right version. How can I get 2.59? If I install it, will it interfere with 2.61, or could they coexist?

I can wait until Monday if need be, but I'd certainly like to learn as much as possible, as soon as I can, about developing/building/configuring software under Linux (Ubuntu Feisty in particular). And I am very eager to do something with the Arduino board I just bought :-)

thanks for the help.

mellis

You can install autoconf from source (that at least doesn't require you to have autoconf installed :) ).  I would probably uninstall the one you installed with the package manager first, just to make sure that the bootstrap script sees the right version.  http://ftp.gnu.org/gnu/autoconf/

Really, though, I think the main lesson about building under Linux may be simply that I should remember to upload source packages of the custom binaries I include in Arduino, since there's always going to be someone who needs to compile it themselves.

android

well, I downloaded autoconf 2.59 from that link. I then

./configure
make
sudo make install

and then bootstrap (in the avrdude folder) told me I needed automake 1.9, which I found in Synaptic & installed from there. I then ran bootstrap again & it seemed to run through. So I did:

./configure

which seemed to work; followed by

make

which choked because I apparently don't have yacc installed. A search for yacc in Synaptic yielded numerous packages -- btyacc, byacc, cl-yacc, etc., etc., but no plain old yacc. I have a feeling If I knew what I were doing I could use one of those, aliased if necessary... but clearly, I don't know what I'm doing so... I guess I'll see if GNU has a yacc I can try to install (after my apparent success with their autoconf). Or do some Googling. Anyway thanks again, I'm confident I'll succeed eventually :-)

mellis

I think you might need to install bison (to get yacc).  Let me know, because I'll need to put it in the documentation.

android

so, I tried

sudo apt-get install bison
alias yacc='bison'

...then make complained about missing flex so I did

sudo apt-get install flex

...now I'm getting "In function read_config [...] undefined reference to `yyin'" and "In function `yyparse' [...] undefined reference to `yylex'" ... which makes me wonder if bison & yacc are as interchangeable as I hoped. Perhaps I'll put this aside 'til Monday after all...

android

Did anyone update the repository,as indicated? I checked on that Monday & Tuesday (8/13-14) but nothing was new. Any help for me out there? What to try next?

mellis

Actually, after you installed bison and flex, did you have a "yacc" in your path before you added the alias?  You might need to do a "make clean" and then "make", or even start over from the avrdude-5.4-arduino.tgz (which should be easy if you've got all the tools installed).

android

thanks... avrdude apparently built (I did 'make clean' then 'make' as you suggested). I then ran a 'make install' which reported no errors.

Now I'm back where I started: I run arduino; I select the directory for my source files, then I get:

java.lang.UnsatisfiedLinkError: /home/adam/arduino-0009/lib/librxtxSerial.so: Can't load IA 32-bit .so on a AMD 64-bit platform thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/andrew/arduino-0009/lib/librxtxSerial.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 gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
       at processing.app.Editor.populateSerialMenu(Editor.java:899)
       at processing.app.Editor.buildToolsMenu(Editor.java:737)
       at processing.app.Editor.<init>(Editor.java:181)
       at processing.app.Base.<init>(Base.java:202)
       at processing.app.Base.main(Base.java:177)

...I shall now check out the 'playground' mentioned in the readme.txt file, and perhaps investigate librxtxSerial.so to see what I can learn about that.

mellis

Ah yes, you'll need rxtx as well.  I think you should be able to install it with apt-get, and just delete the one in the Arduino distribution (you'll probably want to get rid of the rxtxcomm.jar too, as one should come with the Ubuntu package).

android

sudo apt-get install rxtx

generates:

E: Couldn't find package rxtx

... I found a similar thread (rxtx .so for AMD64) in a Processing forum, btw, via a Google search. I've now  found my way to www.rxtx.org by searching for "download rxtx."

Their server is not responding well to my download attempts. Do you happen to know of any mirror, or other source? I guess I'll try their CVS.

Stoner

Running 64-bit Feisty Fawn. To get Arduino up and running:

- install sun-java5-bin and sun-java5-jdk per instructions from Ubuntu web site https://help.ubuntu.com/7.04/programming/C/java.html
- install avr-gcc, lib-avr and librxtx-java

Note: I installed Java 5 because I didn't want to install Java 6 - personal preference, not a technical one.

- rename or remove the RXTXcomm.jar and librxtxSerial.so from lib directory where you installed arduino-0009

Edit the arduino script:

- change the "lib/RXTXcomm.jar" to "/usr/share/java/RXTXcomm.jar" in the CLASSPATH line
- add ":/usr/lib" to the end of the LD_LIBRARY_PATH line


Go Up