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? 2. What version of binutils are you using? 3. Can you try running make on avr-libc without -j5, just so that the error messages are a little more clear? Regards Senthil > > 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