Arduino-IDE on openSUSE 11.2

Hi Arduino-Comunity,

I installed Arduino-Software on a 64-bit-openSUSE 11.2. When starting it, the following message is displayed just at the beginning (first message):

Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2

After having read some postings about that problem I copied the current version of java-rte (version 6, as provided by openSUSE) librxtxSerial.so from the /usr/lib64 directory to the arduino/lib dir. With this, the shown message changes only a little (without pre2):

Native lib Version = RXTX-2.2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2

The most actual version I could find is the one from /usr/lib64, its last modification was 2010.01.19. The one from arduino: 2009.07.16.

So I have two questions:

  1. From where results the versionnr: RXTX-2.1-7 ? Is it from arduinos-startup-code (startup-code compiled with the RXTX-2.1-7 ?). If this is the case, then I wonder why the arduino-soft is shipped with the 2.2pre2 ?)

  2. Any Idea how to get rid of this version-missmatch ?

Many thanx in advance, elgitanito

While waiting for a reply (without success), I' found something like a solution (up to now I haven't programmed nothing yet, but...):

With the old versions of the librxtxSerial AND RXTXComm.jar from the year 2006 (both version 2-1.7), the arduino-IDE starts without warnings.Furthermore I had to change from COM1 to /dev/ttyS0 in the /root/.arduino/preferences.txt.
All together it was necessary to work on all this 3 points in order to avoid the type-missmatch-warning AND to have the tools-serial-menu blacked (not greyed inactive).

It was once more the RTFM-Problem :slight_smile:
(Read The Fucking Manual :-))

Greets

I forgot:
The file rxtx-2.1-7-bins-r2.zip can be downloaded at:
http://rxtx.qbang.org/wiki/index.php/Download
Ok, now let's see, if the blinker will blink !

Where did you place the rxtx-2.1-7 files, and did you have to delete any of the files that came with the distribution? I'm getting the same Java warning, but it doesn't seem to be creating any problems.

Be sure to check your version of avr-gcc also.

avr-gcc --version

If you have gcc 4.1.x or 4.4.x (the only options YaST gives you), you will have problems sooner or later. Gcc 4.1 does not support the ATmega328, and 4.4 is causing compile and/or link errors for a lot of people. You can search the forum for the issues that people are having with gcc 4.4. I was unable to compile the asynch_labs WiShield code.

So here's how to get it all working under OpenSuse 11.2:

  1. Install avr-libc, avrdude and cross-avr-binutils using YaST. It will pull in cross-avr-gcc as a dependency.

  2. To update the avr cross-compilation portion of gcc with the correct version, do the following:

wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.3.4/gcc-4.3.4.tar.gz
tar xzvf gcc-4.3.4.tar.gz 
cd gcc-4.3.4 
mkdir obj 
cd obj 
../configure --prefix=/opt/cross --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp 
make 
sudo make install

The download and compile will take awhile, so enjoy some coffee. :slight_smile: You may experience some configure or compile errors and need to install additional dependencies like gmp-devel and mpfr-devel. Do this with YaST. Check your version of avr-gcc again when you are done.

  1. After you install the Arduino environment and plug in the board, make sure you can see the /dev/ttyUSBx device.
ls -la /dev/ttyU*

If you don't see the device file, execute the following as superuser:

modprobe ftdi_sio

Also, make sure your user is in the dialout and uucp groups to have access to the device file.

Good luck and happy hacking!

Hi David,

many thanks for your reply.
At first the answer to your question:
I copied the two files (librxtxSerial.so and the RXTXcomm.jar) directly into the ~/arduino-0018/lib-directory.

Maybe you also read the other thread, which I started yesterday, some hours after having started this thread. So, obviously, I already have problems with my actual configuration. But before starting to fix the problem according to your solution, could you please answer the following questions ? (just for a better understanding of the things that happen):

1 Does your suggestion mean, that I shouldn't worry about the different version-numbers of the java-libs ? (Or in other words: shall I switch back to the original rxtx-libs, as they are content of the current arduino-IDE ?)

2 Why is the 13Pin-LED already blinking although I haven't uploaded anything yet ? The Pin13-LED started to blink immediately when I connected the (brandnew) Duemilanove the first time after unpacking it. Is this OK, or does the blinking LED mean that anything is wrong with the board ?

Greetings from good old Germany, Rafa

Hello Rafa,

I would not worry about your version of rxtx. You can leave it as it is. Regarding the blinking LED, it is possible that the board came pre-programmed with something as a test (it of course comes with the bootloader). I honestly don't remember what my board did when I first powered it on.

I will post a separate reply in your other thread regarding the serial problems.

Kind regards,

David

Hello David,

OK, so I'll try to fix my problem according to your suggestion and keep the forum posted about the results... but that could take one or two days...
Thanks a lot and have a nice day

Rafa

Hello David,

the following versions of the libraries you have mentioned are already installed:
avr-libc (1.6.1-55.3),
avrdude (5.5-112.3),
cross-avr-binutils (2.19.51-11.26.2)

Installing the gcc:

wget http://ftp.gnu.org/gnu/gcc/gcc-4.3.4/gcc-4.3.4.tar.gz
tar xzvf gcc-4.3.4.tar.gz
cd gcc-4.3.4
mkdir obj
cd obj

was OK, without problems (well, I used http://ftp... instead of ftp://ftp...)

But

../configure --prefix=/opt/cross --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp

gives the following protocol:

###BEGIN PROTOCOL###

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... avr-unknown-none
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... no
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

###END PROTOCOL###

I guess the main-problem is, as you already mentioned, the gmp and mpfr:

"Building GCC requires GMP 4.1+ and MPFR 2.3.0+"

So I checked whether they are installed. Well... it might be the same problem as with the gcc. Means: Both, GMP and MPFR are already installed on my system, but maybe the wrong version.

GMP (4.3.1-2.2) and
MPFR (2.4.1-3.2)

When I try to operate the configure-command expanded by the "--with-mpfr" and the "--with-gmp" options, as suggested in the protocol:

../configure --prefix=/opt/cross --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-gmp=/usr/lib64 --with-mpfr=/usr/lib64

in order to inform the configure-command about the location of this libraries, the new protocol is nearly the same:

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... avr-unknown-none
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

I guess now you'll ask me to download the source-code of the correct versions and to compile and build them in order to get the libgmp.a, libgmp.so and the libgmpxx.so and so on....
Well, I tried it already... without success. I'm not an expert in compiling, building and making of system-libraries and so I'm not able to interpret the amount of error-messages which I get from the make-process. (I'd love to be such an expert, but not yet. I'm working on it) :-(((

What I also tried was to copy the mpfr.h from the source-code-directory of gmp to the /usr/include directory and directly to the new created gcc-4.1.3/obj-dir (from where the configure-process is to be started). Without success.

Theres no happy-hacking at all :frowning:

Don't you have an idea how I can get the arduino-software started without reprogramming all the software of my system :slight_smile: ? For example: Isn't it possible for you to send me the following versions (of your system) of the following files, in order to copy them into my gcc../obj- directory before running the configure-command:

GMP:
gmp.h
gmpxx.h
libgmp.a
libgmp.so
libgmpxx.so

MPFR:
mpfr.h
libmpfr.so.1
libmpfr.so.1.2.0

Well, maybe that could be something like a workaround... But therefore at least all the other messages in the protocol should be also fixed... cross-compiling ? gnatbind ? gnatmake ?

I pray to god that you have an Idea... otherwise I guess the Arduino-SUSE11.2-project has to be canceled :frowning:

Thanks in advance and a virtual box of 20 bottles of fine german beer for you :slight_smile:

Greets, Rafa

Hello Rafa,

I am sorry that you are still having difficulties. Did you install "gmp-devel" and "mpfr-devel" (not the runtimes) with YaST? I experienced the same configure errors as you did before I installed them. I also have 11.2 on AMD64, so the versions should be the same as yours.

David

Hello David,

Well, I don't know why, but yesterday I only checked the gmp-devel, which was already installed. With your reply now I also checked the mpfr-devel, which wasn't installed yet :slight_smile:
Here we say: Thinking is an issue of luck... and luck isn't an everyday-issue :slight_smile:
Now it is installed, and the configure-command now terminates without error-message. And so there is really a lot of time for a lot of coffee :slight_smile:

OK, everything went fine. Make and make install as well. The version-check says gcc-4.3.4.

ls -la /dev/ttyUSB0 shows
crw-rw---- 1 root dialout 188, 0 Mar 3 10:31 /dev/ttyUSB0, -> OK

The user is member of the dialout- and the uucp-group. -> OK

The librxtx.so and the RXTXcomm.jar are the original-versions, as part of the original arduino-0018-installation. --> OK

I connect the cable to my boardie -->, green LED, Pin13LED already blinking --> OK

I can start the arduino-IDE with only the old warning of the version-missmatch of the rxtx-library (what we are expecting --> OK)

The Serial-port is shown in normal state (can be selected or unselected) --> OK

A test-sketch can be opened (choosing the simple blinker) --> OK

Trying to upload the programm to the board --> NOT OK

Protocol:

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c: In function 'attachInterrupt':

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c:91: error: 'EIMSK' undeclared (first use in this function)

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c:91: error: (Each undeclared identifier is reported only once

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c:91: error: for each function it appears in.)

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c:91: error: 'INT0' undeclared (first use in this function)

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c:95: error: 'INT1' undeclared (first use in this function)

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c: In function 'detachInterrupt':

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c:135: error: 'EIMSK' undeclared (first use in this function)

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c:135: error: 'INT0' undeclared (first use in this function)

/home/rafa/bin/arduino-IDE/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c:138: error: 'INT1' undeclared (first use in this function)

Buhuhuhu... It could have been such a wonderful day... buhuhuhuuuuuuuuuuuuu.... but arduino does not like me ....buhuhuhuhuhhhuuuu

I guess I have to drink the whole virtual box of beer on my own... :frowning: ... right now... buhuhuhuhuuuuuuuuuuuuuuuuuuu !!!!!!!!! :slight_smile:

Whats going on there ?

More Ideas ?

Thanks, hicks... Rafa

Hello Rafa,

I think your avr-libc is too old. Check which version is installed using YaST. Add the repository http://download.opensuse.org/repositories/CrossToolchain:/avr/openSUSE_11.2/ in order to get the latest version. You may need to remove everything AVR-related using YaST and then reinstall everything after adding the repository. Don't forget to downgrade gcc to 4.3 again as YaST will want to bring in gcc 4.4. You won't need to recompile gcc if you haven't deleted the object files--just do a "sudo make install".

The Arduino environment can be a real pain under Linux compared to Windows, since the Windows package is self-contained. Let us know how it turns out.

David

Hi David,

I started a new thread "How to install arduino-IDE on openSUSE 11.2". There you can read that all the problems are solved. I installed the entire system once again.. with success.

Thank you for your reply and time,

ciao, Rafa