Building avr-gcc from source in Linux

Hi

I am from Hong Kong. I have just built avr-gcc from scartch. It is very painful.

Which linux distro are you using?

I use Ferdora.

Actually, the hardest part is gcc cannot locate the libmpfr.so.1 shared object. The problem is solved when I set LD_LIBRARY_PATH=pathname of libmpfr.so.1 in the.bashrc file.

for example,
export PATH
export JAVA_HOME=/usr/local/jdk1.6.0_10/bin
export AVR_HOME=/usr/local/avr/bin
export MPFR_HOME=/usr/local/mpfr-2.4.2-obj/lib

LD_LIBRARY_PATH=/usr/local/mpfr-2.4.2-obj/lib
export LD_LIBRARY_PATH

PATH=$LD_LIBRARY_PATH:$MPFR_HOME:$PATH:$HOME/bin:$JAVA_HOME:$AVR_HOME

Also, the following sites are useful for building avr-gcc from scratch.

How To: Set up an AVR-GCC build environment from scratch.
http://www.mbeckler.org/microcontrollers/avrgcc_build/

AVR-GCC Programming Guide [electrons.psychogenic.com]
http://electrons.psychogenic.com/modules/arms/art/3/AVRGCCProgrammingGuide.php

Building AVR GCC
http://ftp.if.itb.ac.id/pub1/IF4038/paket_lain/Building_AVR_GCC.htm