I reinstalled Ubuntu today, and thought, "hey, why not try to compile AVR-GCC"... I thought it would be fun, but it was a living nightmare.
Either way, I got it to the point where I had binutils, avr-libc and avr-gcc playing nicely. I learned a whole lot about the flexibility of gcc (you sure can do an awful lot of messing around before you even compile anything)
All of the following source packages were used in this installation:
gcc-4.4.3 (which also needed gmp-4.3.2, mpfr-2.4.2, and the m42 package)
I got it all compiled and installed into /usr/local/AVR, got my path all set up (which was rather annoying in Ubuntu), and decided to try and spin my first hex file.
And then the error came:
johnny@johnny-desktop:~/coding/avr1$ make -------- begin -------- avr-gcc (GCC) 4.4.3 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiling C: blink.c avr-gcc -c -mmcu=attiny84 -I. -gdwarf-2 -DF_CPU=20000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./blink.lst -std=gnu99 -MMD -MP -MF .dep/blink.o.d blink.c -o blink.o blink.c: In function 'main': blink.c:38: warning: unused variable 'increaseSpeed' Linking: blink.elf avr-gcc -mmcu=attiny84 -I. -gdwarf-2 -DF_CPU=20000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=blink.o -std=gnu99 -MMD -MP -MF .dep/blink.elf.d blink.o --output blink.elf -Wl,-Map=blink.map,--cref -lm /usr/local/AVR/lib/gcc/avr/4.4.3/../../../../avr/bin/ld: crttn84.o: No such file: No such file or directory make: *** [blink.elf] Error 1
This is the first time I've ever compiled such large programs in linux, and I'm wondering if I did something wrong. To me it seems like some kind of definition file is missing.
AFTER I went through all of this I found the sticky here with a set of scripts, but it uses an older version of gcc. I'm pretty sure the rest of my installation went smoothly, so I'm wondering if anyone has seen this error, knows what it means, and how I might go about fixing it.
If it does turn out to be too much of a hassle, I may just settle for using the script, but I really enjoyed the process of compiling the toolchain myself.