IDE errors under Linux

Thank you for reading this.

After compiling gmp, mpfr, binutils, gcc and avr-libc I thought compiling something under the Arduino IDE would be a snap, but not so. An attempt to compile anything generates the follow errors and several others:

/usr/local/src/arduino-0017/hardware/cores/arduino/pins_arduino.c:25:20: error: avr/io.h: No such file or directory

/usr/local/src/arduino-0017/hardware/cores/arduino/wiring_private.h:29:27: error: avr/interrupt.h: No such file or directory

/usr/local/src/arduino-0017/hardware/cores/arduino/wiring_private.h:30:23: error: avr/delay.h: No such file or directory

/usr/local/src/arduino-0017/hardware/cores/arduino/wiring_private.h:31:19: error: stdio.h: No such file or directory

I've spent the better part of a full day searching for a solution and I see others have asked the same question and the only answer that I can find is:

cd Arduino/tools
ln -s /usr/local/avr/avr

Gcc and avr-libc are installed in /usr/local/avr and the include files can be found in /usr/local/avr/avr/include/avr.

Can someone offer a suggestion?

Regards,
Phil

So probably your avr-gcc is configured to look for the include files somewhere else. What flags did you use to configure the gcc build ?

Hi,
for which Linux distribution are you trying this?

Here are the instructions for the toolchain. Looks like the compiler can't find the headers for the avr-libc. You should look into the section about setting the path for includes
http://www.nongnu.org/avr-libc/user-manual/install_tools.html

Eberhard

You gotta laugh. I went to that page and thought to myself Sh...

Thes guys understand what they are doing but find it impossible to come back to common type explanatory language. The newbe is swamped with totally useless detail. The stuff they need is never clear. Its as if the writers have to follow up every if possibility recursively right there and then.

I could not understand or follow that page . Everything is just tossed in almost as afterthoughts . Linux in with Windows etc ,you name it its there . Gives Linux a bad name

Gives Linux a bad name

I don't think so. Installing the avr-packages for all the major distributions seems to have become be fairly painless in the last two years.

That's why I asked for the name of the distribution that requires the user to compile the toolchain by hand.
You can always find some freaked out Linux distro if you have some time to kill. But if you only want to run the Arduino software you simply install some Ubtuntu-flavour-distro and get going..

Eberhard

Eberhard

While we are pushing our own barrow on Linux then let me offer an alternative, Fedora11 by red hat .
Free distro CD in the magazine Linux Format September 2009
Simple install instructions are

Install Arduino 0017
yum install avr-gcc-c++ -y
add user to Lock ,uucp and dialout
and away you go

No six pages of unfathomable instructions just niceclean fresh lines . I commend it to you

Thanks for the replies.

I followed the instructions to the letter to install avr-gcc and the rest of the files. Avr-gcc is in /usr/linux/avr as suggested in the documents. I cut and pasted the configure flags so that I would not make a mistake.

I’m using Mandriva 2010. There have been errors in the binaries since 2008 and that’s why I have compiled all of the AVR files from source files.

I’ve checked and rechecked and all of the files are where they should be according to the docs. I have tried different configure flags for av r-libc because that’s where I feel the error is based on the error message from the Arduino IDE.

I see my plea for help has been read many time so I’m not the only one having troubles.

All suggestions greatly appreciated.

Phil

Heres a list of all the avr's on a Debian system

deb:/home/steve# find / -iname avr
/usr/lib/gcc/avr
/usr/lib/avr
/usr/lib/avr/include/avr
/usr/i486-linux-gnu/avr

A little more research led me to Arduino playground-old where it is suggested that five links should be added to arduino-0017/tools. The five links mentioned are:

avr-gcc
avr-objcopy
avr-dump
avr-size
uisp

Are these instructions still current or there new ones somewhere?

Only one of the files, avr-gcc, can be found. Howevever binutils contains objcopy, objdump and size. Are these new names for the same files? I don't have uisp.

Needless to say, adding links to the four files that are present hasn't changed the error messages at all.

Getting the Arduino IDE going can't be that hard surely.

Phil

The avr files

avr-gcc
avr-objcopy
avr-dump
avr-size

are not the same files as objcopy, size etc.

The avr versions should probably be in /usr/bin.
It is hard to know because I don’t know many people (anybody) that use Mandriva.

[edit]
Have you installed binutils-avr and gcc-avr?
[/edit]

If you read the OP he says he has compiled all these and it would seem probable then that he installed them OK.
I have been an avid fan of Mandriva for 5 years and considered it the best until I could not get Arduino to run despite going back to it time and time again for 2 months. (Mandriva 2009)

I recently swapped to Fedora11 which is, so far, proving beneficial with an easy install for Arduino , see here
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1255321226

Phil_F I commiserate with you . I had different errors related to arduino not finding avr-g++ . Mandriva dont seem to have a package in the repository for this but I think if you visit the Mandriva forum and ask there, someone will know whats happening . I think its a problem with arduino finding the right files and Mandriva does put some files in places other distros dont. The answer might lie in the PATH statement which you can see by the command "env" . Putting the files where Arduino expects to find them though is another matter as I found no literature on that and no support on the mandriva site to help. Thats why I swapped .

You could try to find packages named by the previous poster but I seem fairly sure they were covered with what you have installed . There was noted a change to gcc where avr-g++ (i think) had been dropped and could be installed separately but it was so technical that I never did sort it out . The problem might well lie there.

Thanks for your input tytower.

I’ve come to a dead end with Mandriva and arduino. I’m now experimenting with Debian. Hopefully that will lead to something useful.

Please disregard my previous e-mail. I've been going around in circles with this for two solid days and I must be starting to hallucinate. The avr- files are in fact within /usr/local/bin and I have corrected the links but of course still no joy.

Hi,
if you have all the binaries for the AVR-tools in /usr/local/bin you should now add this directroy to your path.

This is usually set in file ".profile" in you home-dir. You have to add a line to the file

PATH=$PATH:/usr/local/bin

but since the mandriva people like to do a remix of some of some odf the linux concepts, doing a simple grep in your home-dir should find the file where the PATH variable is set

 grep "PATH" .*

You have to log out and log in again so the changes take effect.
Then you open a console window and type avr-gcc and see what happens. If you are able to run the compiler that way, the Arduino-IDE will find it too.

I'm now experimenting with Debian

????
If you use on of the already mentioned distributions (Ubuntu etc) there is nothing to experiment

Eberhard

Well everhard some people dont like the name connotations of your choice of Linux . I am one of those who would not go near it with a 10 foot pole