Go Down

Topic: linux install help - errors in twi.c (Read 1 time) previous topic - next topic


using suse 10.1, arduino 0007.   when i launch the IDE, i get a huge number of errors from utility/twi.c, starting with :

utility/twi.c:20:18: math.h: No such file or directory

and continuing from there.  can't find stdlib.h, inttypes.h, avr/io.h, avr/interrupt.h, blah blah blah, whine, complain.  

i'm guessing i didn't install gcc, binutils, or glibc properly, but here's what i've got:


and also


should that be right?  is there a makefile somewhere that i need to tweak before launching the IDE?  what's the difference between avr-gcc and cross-avr-gcc??  


Do you get the same errors if you try to compile an example sketch (say led_blink)?

The error messages you're getting imply that avr-gcc is getting launched okay, but it's having trouble finding its header files.  Which makes it sounds like it's not installed correctly: or more precisely, as if avr-libc (which provides the header files) isn't installed in the location that avr-gcc expects it to be.  How did you install those packages?  I don't know what the difference is between avr-gcc and cross-avr-gcc, but it's possible that they're somehow conflicting with each other.  Maybe try uninstalling whichever one is not a dependency of avr-libc.

Also, you're going to need to install uisp to upload your sketches to the board.


Mar 31, 2007, 03:35 pm Last Edit: Mar 31, 2007, 06:10 pm by arky Reason: 1
thanks mellis.   i installed the avr compiler packages from RPM's i hunted down on the web, because i wasn't finding them nicely available in the suse repos like they are in ubuntu.

i forgot to mention one really helpful error message:  "Error building library 'Wire'"  ;)

the suse cross-avr package installs the avr gcc in /opt/cross.  for example, the compiler is /opt/cross/bin/avr-gcc.  the includes it's looking for are in /opt/cross/avr/include (stdlib.h, math.h, avr/io.h, etc).  

is there a place in the arduino prefs where i can set up the paths, like a Makefile?  or is this something that gcc should have configured properly already?


It's something that avr-gcc should have configured properly already.  Where is the non-cross version of avr-gcc installed?  Are there header files in that directory too?  Again, if you've got two versions of avr-gcc installed, you might try uninstalling one.  


cool - closer, but not quite working yet.  uninstalling avr-gcc and avr-binutils helped - now it can find the headers.  but now i have a different error when trying to compile the led blink example:

/opt/cross/lib/gcc/avr/4.1.0/../../../../avr/bin/ld: BFD 20051219 (SUSE Linux) internal error, aborting at ../../bfd/reloc.c line 445 in bfd_get_reloc_size

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