Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » AVR-GCC
  • » [avr-gcc-list] Error building gcc 4.5.2 for AVR [RSS Feed]

#1 Jan. 26, 2011 13:08:03

Omar C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Error building gcc 4.5.2 for AVR


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.shI have some troubles when building, see below, maybe you can
help me; thanks:

...
make: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libcpp'
make: Entering directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libdecnumber'
make: Nothing to be done for `install'.
make: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libdecnumber'
make: Entering directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty'
make: Entering directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty/testsuite'
make: Nothing to be done for `all'.
make: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty/testsuite'
/bin/bash
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../mkinstalldirs
/local/scratch/osc22/tools/avr/lib/`gcc -g -O2
-print-multi-os-directory`
/usr/bin/install -c -m 644 ./libiberty.a
/local/scratch/osc22/tools/avr/lib/`gcc -g -O2
-print-multi-os-directory`/./libiberty.an
( cd /local/scratch/osc22/tools/avr/lib/`gcc -g -O2
-print-multi-os-directory` ; chmod 644 ./libiberty.an ;ranlib
./libiberty.an )
mv -f /local/scratch/osc22/tools/avr/lib/`gcc -g -O2
-print-multi-os-directory`/./libiberty.an
/local/scratch/osc22/tools/avr/lib/`gcc -g -O2
-print-multi-os-directory`/./libiberty.a
if test -n ""; then \
case "" in \
/*) thd=;; \
*) thd=/local/scratch/osc22/tools/avr/include/;; \
esac; \
/bin/bash
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../mkinstalldirs
${thd}; \
for h in
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/ansidecl.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/demangle.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/dyn-string.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/fibheap.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/floatformat.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/hashtab.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/libiberty.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/objalloc.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/partition.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/safe-ctype.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/sort.h
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/libiberty/../include/splay-tree.h;
do \
/usr/bin/install -c -m 644 $h ${thd}; \
done; \
fi
make: Entering directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty/testsuite'
make: Nothing to be done for `install'.
make: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty/testsuite'
make: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty'
/bin/bash: line 3: cd: avr/libgcc: No such file or directory
make: *** Error 1
make: Leaving directory `/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2'
make: *** Error 2


It seems the build cannot find the folder avr/libgcc, but why?


When running, the libgcc error above kicks in:
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
/local/scratch/osc22/tools/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld:
cannot find crtusb1286.o: No such file or directory
/local/scratch/osc22/tools/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld:
cannot find -lgcc
/local/scratch/osc22/tools/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld:
skipping incompatible
/local/scratch/osc22/tools/avr/lib/gcc/avr/4.5.2/../../../../avr/lib/libc.a
when searching for -lc
/local/scratch/osc22/tools/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld:
cannot find -lc
/local/scratch/osc22/tools/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld:
cannot find -lgcc


Info about the avr-gcc:
avr-gcc -v
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/local/scratch/osc22/tools/avr/libexec/gcc/avr/4.5.2/lto-wrapper
Target: avr
Configured with:
/local/scratch/osc22/temp/build-avr/gcc-4.5.2/configure --target=avr
--prefix=/local/scratch/osc22/tools/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
--disable-shared --disable-multilib --disable-threads
Thread model: single
gcc version 4.5.2 (GCC)



Thanks,
 Omar

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Jan. 26, 2011 14:11:14

Weddington, E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Error building gcc 4.5.2 for AVR


> -----Original Message-----
> From: avr-gcc-list-bounces+eric.weddington=atmel.***@*ongnu.org
> On
> Behalf Of Omar Choudary
> Sent: Tuesday, January 25, 2011 10:27 AM
> To: avr-gcc-l***@*ongnu.org
> Subject: Error building gcc 4.5.2 for AVR
>
> Hello,

Hi,

Please subscribe to this mailing list so your posts do not have to be approved.


> 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.shHave you compared your script to existing build scripts that are known to work?
If you go to the AVR Freaks website (www.avrfreaks.net), in the AVR GCC Forum,
there is a sticky post regarding a build script for linux. There are also
instructions in the avr-libc user manual for how to build the tools.

This section stands out to me in your build script:

make ${MAKEFLAGS} all-gcc >> ${BUILDDIR}/make.log 2>&1
make install >> ${BUILDDIR}/make.log 2>&1

#Now try to install libgcc
make ${MAKEFLAGS} all-target-libgcc >> ${BUILDDIR}/make.log 2>&1
make install-target-libgcc >> ${BUILDDIR}/make.log 2>&1

All of these build targets should not be necessary. All you should need is
'make all install'. I don't understand why you are trying to build and install
libgcc separately.

Also you said this:

> When running, the libgcc error above kicks in:
> 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
> /local/scratch/osc22/tools/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld:
> cannot find crtusb1286.o: No such file or directory

This is the startup code for a particular device. My guess is that it probably
cannot find it because avr-libc did not build correctly, because avr-gcc did
not build correctly.

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#3 Jan. 26, 2011 17:13:06

Omar C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Error building gcc 4.5.2 for AVR


Hi Eric, thanks for the help.

Indeed, my make-all-gcc seemed to be the problem. Somehow I missed
that from Bingo's scripts while I was adapting the gnu-arm-cross build
scripts (which was the start point, together with Bingo's scripts).

However, using the exact commands, i.e. "make all install clean" gives
all sorts of errors.
I've noticed that I need to issue 2 commands separately to work:
make all
make install

The final script is available here and now works:http://www.cl.cam.ac.uk/~osc22/files/avr_gcc/install_avr_tools.shThanks.
Omar

On Wed, Jan 26, 2011 at 1:43 PM, Weddington, Eric
<eric.wedding***@*tmel.com> wrote:
>
>
>> -----Original Message-----
>> From: avr-gcc-list-bounces+eric.weddington=atmel.***@*ongnu.org
>> On
>> Behalf Of Omar Choudary
>> Sent: Tuesday, January 25, 2011 10:27 AM
>> To: avr-gcc-l***@*ongnu.org
>> Subject: Error building gcc 4.5.2 for AVR
>>
>> Hello,
>
> Hi,
>
> Please subscribe to this mailing list so your posts do not have to be
> approved.
>
>
>> 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>
> Have you compared your script to existing build scripts that are known to
> work? If you go to the AVR Freaks website (www.avrfreaks.net), in the AVR GCC
> Forum, there is a sticky post regarding a build script for linux. There are
> also instructions in the avr-libc user manual for how to build the tools.
>
> This section stands out to me in your build script:
>
>  make ${MAKEFLAGS} all-gcc >> ${BUILDDIR}/make.log 2>&1
>  make install >> ${BUILDDIR}/make.log 2>&1
>
>  #Now try to install libgcc
>  make ${MAKEFLAGS} all-target-libgcc >> ${BUILDDIR}/make.log 2>&1
>  make install-target-libgcc >> ${BUILDDIR}/make.log 2>&1
>
> All of these build targets should not be necessary. All you should need is
> 'make all install'. I don't understand why you are trying to build and
> install libgcc separately.
>
> Also you said this:
>
>> When running, the libgcc error above kicks in:
>> 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
>> /local/scratch/osc22/tools/avr/lib/gcc/avr/4.5.2/../../../../avr/bin/ld:
>> cannot find crtusb1286.o: No such file or directory
>
> This is the startup code for a particular device. My guess is that it
> probably cannot find it because avr-libc did not build correctly, because
> avr-gcc did not build correctly.
>

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#4 Jan. 26, 2011 17:17:29

Weddington, E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Error building gcc 4.5.2 for AVR


> -----Original Message-----
> From: Omar Choudary
> Sent: Wednesday, January 26, 2011 10:12 AM
> To: Weddington, Eric
> Cc: avr-gcc-l***@*ongnu.org
> Subject: Re: Error building gcc 4.5.2 for AVR
>
> The final script is available here and now works:
>http://www.cl.cam.ac.uk/~osc22/files/avr_gcc/install_avr_tools.sh>

Glad that it now works for you! :-)

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

  • Root
  • » AVR-GCC
  • » [avr-gcc-list] Error building gcc 4.5.2 for AVR [RSS Feed]

Board footer

Moderator control

Enjoy the 16th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support