This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Error building gcc 4.5.2 for AVR
- From: Omar Choudary <choudary dot omar at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 25 Jan 2011 14:30:59 +0000
- Subject: Error building gcc 4.5.2 for AVR
- References: <AANLkTikGSyXsg-KbQdK4awYOhjVyTTnn+sA8YgBTwuJX@mail.gmail.com> <AANLkTinfEKRqPOYWfjQafw1grCVA6ewxJ4q-RASD-pxC@mail.gmail.com>
Hello,
I am trying to build GCC 4.5.2 for the AVR target. See my script:
http://www.cl.cam.ac.uk/~osc22/files/install_avr_tools.sh
I have some troubles when building, see below, maybe you can
help me; thanks:
...
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-4.5.2/buildavr/libiberty/testsuite'
/bin/bash ../../libiberty/../mkinstalldirs /usr/local/avr/lib/`gcc -g
-O2 -print-multi-os-directory`
/usr/bin/install -c -m 644 ./libiberty.a /usr/local/avr/lib/`gcc -g
-O2 -print-multi-os-directory`/./libiberty.an
( cd /usr/local/avr/lib/`gcc -g -O2 -print-multi-os-directory` ; chmod
644 ./libiberty.an ;ranlib ./libiberty.an )
mv -f /usr/local/avr/lib/`gcc -g -O2
-print-multi-os-directory`/./libiberty.an /usr/local/avr/lib/`gcc -g
-O2 -print-multi-os-directory`/./libiberty.a
if test -n ""; then \
? ? ? ? ? case "" in \
? ? ? ? ? ? /*)? ? thd=;; \
? ? ? ? ? ? *)? ? ?thd=/usr/local/avr/include/;; \
? ? ? ? ? esac; \
? ? ? ? ? /bin/bash ../../libiberty/../mkinstalldirs ${thd}; \
? ? ? ? ? for h in ../../libiberty/../include/ansidecl.h
../../libiberty/../include/demangle.h
../../libiberty/../include/dyn-string.h
../../libiberty/../include/fibheap.h
../../libiberty/../include/floatformat.h
../../libiberty/../include/hashtab.h
../../libiberty/../include/libiberty.h
../../libiberty/../include/objalloc.h
../../libiberty/../include/partition.h
../../libiberty/../include/safe-ctype.h
../../libiberty/../include/sort.h
../../libiberty/../include/splay-tree.h; do \
? ? ? ? ? ? /usr/bin/install -c -m 644 $h ${thd}; \
? ? ? ? ? done; \
? ? ? ? fi
make[3]: Entering directory
`/local/scratch/osc22/temp/build-avr/gcc-4.5.2/buildavr/libiberty/testsuite'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-4.5.2/buildavr/libiberty/testsuite'
make[2]: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-4.5.2/buildavr/libiberty'
/bin/bash: line 3: cd: avr/libgcc: No such file or directory
make[1]: *** [install-target-libgcc] Error 1
make[1]: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-4.5.2/buildavr'
make: *** [install] Error 2
It seems the build cannot find the folder avr/libgcc, but why?
When running, the libgcc error above shows:
avr-gcc? -mmcu=at90usb1287 -Wl,-Map=SCD.map SCD.o EMV.o halSCD.o
scdIO.o utils.o terminal.o? halSCD.S SCD.S? ? -o SCD.elf
/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld: cannot find -lgcc
/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
Info about the avr-gcc:
avr-gcc -v
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/local/avr/libexec/gcc/avr/4.5.2/lto-wrapper
Target: avr
Configured with: ../configure --target=avr --prefix=/usr/local/avr -v
--program-prefix=avr- --with-gcc --with-gnu-ld --with-gnu-as
--with-dwarf2 --disable-libssp --enable-languages=c,c++
--disable-werror --disable-nls
Thread model: single
gcc version 4.5.2 (GCC)
And verbose output of running the command:
avr-gcc -v -mmcu=at90usb1287 -Wl,-Map=SCD.map SCD.o EMV.o halSCD.o
scdIO.o utils.o terminal.o? halSCD.S SCD.S? ? -o SCD.elf
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/local/avr/libexec/gcc/avr/4.5.2/lto-wrapper
Target: avr
Configured with: ../configure --target=avr --prefix=/usr/local/avr -v
--program-prefix=avr- --with-gcc --with-gnu-ld --with-gnu-as
--with-dwarf2 --disable-libssp --enable-languages=c,c++
--disable-werror --disable-nls
Thread model: single
gcc version 4.5.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mmcu=at90usb1287' '-o' 'SCD.elf'
?/usr/local/avr/libexec/gcc/avr/4.5.2/cc1 -E -lang-asm -quiet -v
-imultilib avr51 halSCD.S -mmcu=at90usb1287 -fno-directives-only -o
/tmp/ccPZdrIF.s
ignoring nonexistent directory
"/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
?/usr/local/avr/lib/gcc/avr/4.5.2/include
?/usr/local/avr/lib/gcc/avr/4.5.2/include-fixed
?/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-mmcu=at90usb1287' '-o' 'SCD.elf'
?/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/as -v
-mmcu=at90usb1287 -o /tmp/ccAv4Kbo.o /tmp/ccPZdrIF.s
GNU assembler version 2.21 (avr) using BFD version (GNU Binutils) 2.21
COLLECT_GCC_OPTIONS='-v' '-mmcu=at90usb1287' '-o' 'SCD.elf'
?/usr/local/avr/libexec/gcc/avr/4.5.2/cc1 -E -lang-asm -quiet -v
-imultilib avr51 SCD.S -mmcu=at90usb1287 -fno-directives-only -o
/tmp/ccPZdrIF.s
ignoring nonexistent directory
"/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
?/usr/local/avr/lib/gcc/avr/4.5.2/include
?/usr/local/avr/lib/gcc/avr/4.5.2/include-fixed
?/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-mmcu=at90usb1287' '-o' 'SCD.elf'
?/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/as -v
-mmcu=at90usb1287 -o /tmp/ccswYC86.o /tmp/ccPZdrIF.s
GNU assembler version 2.21 (avr) using BFD version (GNU Binutils) 2.21
COMPILER_PATH=/usr/local/avr/libexec/gcc/avr/4.5.2/:/usr/local/avr/libexec/gcc/avr/4.5.2/:/usr/local/avr/libexec/gcc/avr/:/usr/local/avr/lib/gcc/avr/4.5.2/:/usr/local/avr/lib/gcc/avr/:/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/
LIBRARY_PATH=/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/lib/avr51/:/usr/local/avr/lib/gcc/avr/4.5.2/:/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/lib/
COLLECT_GCC_OPTIONS='-v' '-mmcu=at90usb1287' '-o' 'SCD.elf'
?/usr/local/avr/libexec/gcc/avr/4.5.2/collect2 -m avr51 -Tdata
0x800100 -o SCD.elf
/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/lib/avr51/crtusb1286.o
-L/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/lib/avr51
-L/usr/local/avr/lib/gcc/avr/4.5.2
-L/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/lib -Map=SCD.map
SCD.o EMV.o halSCD.o scdIO.o utils.o terminal.o /tmp/ccAv4Kbo.o
/tmp/ccswYC86.o -lgcc -lc -lgcc
/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld: cannot find -lgcc
/usr/local/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
Thanks,
?Omar