2012/8/3 Senthil Kumar Selvaraj <senthil_kumar.selva...@atmel.com> > On Thu, Aug 02, 2012 at 04:06:19PM +0300, Kaan Akşit wrote: > > Dear Senthil, > > > > Unfortunately, I still have the same error in avr-libc compilation :( > Here > > is the result of a sample compilation after following your tutorial: > > The output below seems ok, so I'm not sure why libc is failing. > > 1. I'm hoping you did a clean build (configure and make from scratch) of > avr-libc? >
I am building avr-libc inside a sandbox. > 2. What version of binutils are you using? > 2.22.52.0.4 > 3. Can you try running make on avr-libc without -j5, just so that the > error messages are a little more clear? > > mv -f .deps/vsprintf_p.Tpo .deps/vsprintf_p.Po mv -f .deps/getc.Tpo .deps/getc.Po avr-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../common -I../../../include -I../../../include -I../../../common -I../../../include -I../../../include -x assembler-with-cpp -Wa,-gstabs -mmcu=avr2 -D__COMPILING_AVR_LIBC__ -MT addsf3.o -MD -MP -MF .deps/addsf3.Tpo -c -o addsf3.o ../../../libm/fplib/addsf3.S avr-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../common -I../../../include -I../../../include -I../../../common -I../../../include -I../../../include -x assembler-with-cpp -Wa,-gstabs -mmcu=avr2 -D__COMPILING_AVR_LIBC__ -MT addsf3x.o -MD -MP -MF .deps/addsf3x.Tpo -c -o addsf3x.o ../../../libm/fplib/addsf3x.S mv -f .deps/ungetc.Tpo .deps/ungetc.Po avr-gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../common -I../../../include -I../../../include -I../../../common -I../../../include -I../../../include -x assembler-with-cpp -Wa,-gstabs -mmcu=avr2 -D__COMPILING_AVR_LIBC__ -MT asin.o -MD -MP -MF .deps/asin.Tpo -c -o asin.o ../../../libm/fplib/asin.S ../../../libm/fplib/acos.S: Assembler messages: ../../../libm/fplib/acos.S:62: Error: ../../../libc/stdio/ultoa_invert.S: garbage at end of lineAssembler messages: ../../../libc/stdio/ultoa_invert.S:97: Error: garbage at end of line ../../../libc/stdio/ultoa_invert.S:98: Error: garbage at end of line make[5]: *** [acos.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[5]: *** [ultoa_invert.o] Error 1 mv -f .deps/addsf3x.Tpo .deps/addsf3x.Po mv -f .deps/addsf3.Tpo .deps/addsf3.Po ../../../libm/fplib/asin.S: Assembler messages: ../../../libm/fplib/asin.S:53: Error: garbage at end of line ../../../libm/fplib/asin.S:69: Error: garbage at end of line make[5]: *** [asin.o] Error 1 make[5]: Leaving directory `/var/pisi/avr-libc-1.8.0-5/work/avr-libc-1.8.0/avr/lib/avr2' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/var/pisi/avr-libc-1.8.0-5/work/avr-libc-1.8.0/avr/lib/avr2' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/pisi/avr-libc-1.8.0-5/work/avr-libc-1.8.0/avr/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/pisi/avr-libc-1.8.0-5/work/avr-libc-1.8.0/avr' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/pisi/avr-libc-1.8.0-5/work/avr-libc-1.8.0' make: *** [all] Error 2 DEBUG: "make -j5 -j5" dönüş değeri 2 Regards > Senthil > Thank you very much for aiding me in compilation. Kaan > > > > kaan@SAHILEVLERI ~ $ avr-gcc -mmcu=atmega8 -v -c test.c > > Using built-in specs. > > COLLECT_GCC=avr-gcc > > Target: avr > > Configured with: ../gcc-4.7.1/configure --target=avr > > --mandir=/usr/share/man --datadir=/usr/share -enable-languages=c,c++ > > --disable-nls --disable-libssp --with-dwarf2 --with-system-zlib > > --enable-vrsion-specific-runtime-libs --with-pkgversion='Pardus Linux' > > --with-bugurl=http://bugs.pardus.org.r > > Thread model: single > > gcc version 4.7.1 (Pardus Linux) > > COLLECT_GCC_OPTIONS='-mmcu=atmega8' '-v' '-c' > > /usr/local/libexec/gcc/avr/4.7.1/cc1 -quiet -v -imultilib avr4 test.c > > -quiet -dumpbase test.c -mmu=atmega8 -auxbase test -version -o > > /tmp/ccEgUGtP.s > > GNU C (Pardus Linux) version 4.7.1 (avr) > > compiled by GNU C version 4.5.3, GMP version 5.0.1, MPFR version > > 2.4.2, MPC version 0.8.2 > > GGC heuristics: --param ggc-min-expand=100 --param > ggc-min-heapsize=131072 > > ignoring nonexistent directory > > "/usr/local/lib/gcc/avr/4.7.1/../../../../avr/sys-include" > > ignoring nonexistent directory > > "/usr/local/lib/gcc/avr/4.7.1/../../../../avr/include" > > #include "..." search starts here: > > #include <...> search starts here: > > /usr/local/lib/gcc/avr/4.7.1/include > > /usr/local/lib/gcc/avr/4.7.1/include-fixed > > End of search list. > > GNU C (Pardus Linux) version 4.7.1 (avr) > > compiled by GNU C version 4.5.3, GMP version 5.0.1, MPFR version > > 2.4.2, MPC version 0.8.2 > > GGC heuristics: --param ggc-min-expand=100 --param > ggc-min-heapsize=131072 > > Compiler executable checksum: 722643b1134bcec91c9603abb6d176ac > > COLLECT_GCC_OPTIONS='-mmcu=atmega8' '-v' '-c' > > /usr/local/lib/gcc/avr/4.7.1/../../../../avr/bin/as -mmcu=atmega8 > > -mno-skip-bug -o test.o /tmp/ccgUGtP.s > > > COMPILER_PATH=/usr/local/libexec/gcc/avr/4.7.1/:/usr/local/libexec/gcc/avr/4.7.1/:/usr/local/libexc/gcc/avr/:/usr/local/lib/gcc/avr/4.7.1/:/usr/local/lib/gcc/avr/:/usr/local/lib/gcc/avr/4.7.1/.././../../avr/bin/ > > > LIBRARY_PATH=/usr/local/lib/gcc/avr/4.7.1/avr4/:/usr/local/lib/gcc/avr/4.7.1/:/usr/local/lib/gcc/ar/4.7.1/../../../../avr/lib/ > > COLLECT_GCC_OPTIONS='-mmcu=atmega8' '-v' '-c' > > > > Is there anything I might be missing something? > > > > Kaan > > > > 2012/8/1 Senthil Kumar Selvaraj <senthil_kumar.selva...@atmel.com> > > > > > On Wed, Aug 01, 2012 at 03:19:58PM +0300, Kaan Akşit wrote: > > > > I am really confused because if I do not set any prefix during > > > > configuration; both avr-gcc and avr-binutils will use /usr/local > which > > > > means default is not the supported way. > > > > > > > > So to give an example if I use prefix /usr/local for avr-binutils, > > > should I > > > > be using something outside of /usr/local ? For example > /usr/share/avr. > > > > Then I need to export both /usr/local and /usr/share/avr as PATH? > Did I > > > get > > > > i right? > > > > > > You are confusing the object/build directory with the install/prefix > > > directory. The object/build directory is the one from which you run the > > > configure script. It is different from the prefix directory, which > > > specifies where the built binaries go when you run "make install". > > > > > > For GCC, the build directory must not be a subdirectory of the source > > > directory. > > > > > > Let's take it step by step. Let's say you extracted the binutils source > > > to ~/src/binutils > > > > > > [~] cd ~ > > > [~] mkdir install > > > [~] mkdir build-binutils && cd build-binutils > > > [build-binutils] pwd > > > ~/build-binutils > > > [build-binutils] ../src/binutils/configure --target=avr > > > --prefix=/home/user/install > > > --disable-nls > > > [build-binutils] make && make install > > > > > > This builds and installs binutils binaries into ~/install/bin (or > whatever > > > dir you give as the prefix) > > > > > > Now add the install folder to the path > > > [~] export PATH=~/install/bin:$PATH > > > > > > Assuming gcc is in ~/src/gcc > > > > > > [~] mkdir build-gcc && cd build-gcc > > > [build-gcc] pwd > > > ~/build-gcc > > > [build-gcc] ../src/gcc/configure --target=avr --enable-languages=c > > > --prefix=/home/user/install > > > [build-gcc] make && make install > > > > > > This should build gcc and install avr-gcc and related binaries into > > > ~/install/bin > > > > > > Assuming avr-libc is in ~/src/avr-libc > > > > > > [~] cd ~/src/avr-libc > > > [~/src/avr-libc] ./configure --prefix=/home/user/install --host=avr > > > --build=<your build machine arch> > > > [~/src/avr-libc] make and make install > > > > > > should do the job. > > > > > > Essentially, for binutils and particularly gcc, the build folder from > > > which you run the configure script must not be a subdir of source. Make > > > sure you specify the same prefix for all three configure invocations. > > > > > > Hope this helps. > > > > > > Regards > > > Senthil > > > > > > > > > > > > > > Kaan > > > > > > > > 2012/8/1 Senthil Kumar Selvaraj <senthil_kumar.selva...@atmel.com> > > > > > > > > > On Wed, Aug 01, 2012 at 12:35:47PM +0300, Kaan Akşit wrote: > > > > > > I am using below code to configure avr-gcc, I don't understand > what > > > is > > > > > > wrong with it: > > > > > > > > > > > > ../configure --target=avr --mandir=/usr/share/man > > > --datadir=/usr/share > > > > > > --prefix=/usr/share/avr --enable-languages="c,c++" --disable-nls > > > > > > --disable-libssp --with-dwarf2 --with-system-zlib > > > > > > --enable-version-specific-runtime-libs --with-pkgversion="Pardus > > > Linux" > > > > > > --with-bugurl=http://bugs.pardus.org.tr > > > > > > > > > > > > Kaan > > > > > > > > > > Running configure from within a subdirectory of the gcc source > > > directory > > > > > (as inferred from ../configure) is > > > > > not supported. See http://gcc.gnu.org/install/configure.html. You > need > > > > > to create a directory outside the toplevel source directory for > GCC and > > > > > run configure from there. > > > > > > > > > > Regards > > > > > Senthil > > > > > > > > > > > > > > > > > 2012/8/1 Georg-Johann Lay <a...@gjlay.de> > > > > > > > > > > > > > Kaan Akşit schrieb: > > > > > > > > > > > > > > > > > > > > > $ avr-gcc -mmcu=atmega8 -v -c demo.c > > > > > > >> Using built-in specs. > > > > > > >> COLLECT_GCC=avr-gcc > > > > > > >> Target: avr > > > > > > >> Configured with: ../configure --target=avr > --mandir=/usr/share/man > > > > > > >> > > > > > > > > > > > > > > You still configure in the source tree which is not supported. > > > > > > > > > > > > > > Johann > > > > > > > > > > > > > > > >
_______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list