I am new to OpenSUSE(from Ubuntu), and I met many problems when trying to compile the avr-libc on my notebook.
After googling a lot, I think what I should do is to compile binutils, gcc-core and avr-libc successively. But problems arose when I tried to compile binutils for avr.
Code:
tar -xjvf binutils-2.23.1.tar.bz2
cd binutils-2.23.1/
mkdir avr
cd avr
../configure --target=avr --prefix=/usr/local/avr/
make
after I using the above commands, I finally got this result:
Code:
gcc -DHAVE_CONFIG_H -I. -I../../binutils -I. -I../../binutils -I../bfd -I../../binutils/../bfd -I../../binutils/../include -DLOCALEDIR="\"/usr/local/avr/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT size.o -MD -MP -MF .deps/size.Tpo -c -o size.o ../../binutils/size.c
mv -f .deps/size.Tpo .deps/size.Po
gcc -DHAVE_CONFIG_H -I. -I../../binutils -I. -I../../binutils -I../bfd -I../../binutils/../bfd -I../../binutils/../include -DLOCALEDIR="\"/usr/local/avr/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bucomm.o -MD -MP -MF .deps/bucomm.Tpo -c -o bucomm.o ../../binutils/bucomm.c
../../binutils/bucomm.c: In function 'set_default_bfd_target':
../../binutils/bucomm.c:159:24: error: 'TARGET' undeclared (first use in this function)
../../binutils/bucomm.c:159:24: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [bucomm.o] Error 1
make[4]: Leaving directory `/mnt/Downloads/Downloads/binutils-2.23.1/avr/binutils'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/Downloads/Downloads/binutils-2.23.1/avr/binutils'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/Downloads/Downloads/binutils-2.23.1/avr/binutils'
make[1]: *** [all-binutils] Error 2
make[1]: Leaving directory `/mnt/Downloads/Downloads/binutils-2.23.1/avr'
make: *** [all] Error 2
How can I solve it? I have been confused for days, so please help.
I am using OpenSUSE12.2, 64bit, and, as you can see, I am compilng binutils of version 2.23.1.
No comments:
Post a Comment