Hello, I'm a newbie to this list, so please forgive me if this is an elementary problem.
I recently built the avr-gcc toolchain on my Gentoo AMD-64 system. I used the following command to build it: crossdev --target avr It seemed to work fine. However to test the installation I downloaded two different projects from the avrfreaks site and tried to build them. I ran into the same issue with both of them: avr-gcc (GCC) 3.4.6 (Gentoo 3.4.6, ssp-3.4.5-1.0, pie-8.7.9) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Linking: main.elf avr-gcc -mmcu=atmega169 -I. -g -DF_CPU=1000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=main.o -std=gnu99 -Wundef -MMD -MP -MF .dep/main.elf.d main.o timer0.o BCD.o usart.o ADC.o RTC.o bfeeprom.o dataflash.o button.o LCD_functions.o LCD_driver.o vcard.o sound.o test.o --output main.elf -Wl,-Map=main.map,--cref -lm /usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr5.x: No such file or directory So apparently avr-ld can't locate the ldscripts/avr5.x file. Checking out the subdirectory tree where avr-gcc tools are stored, I find the following: mercury:~> cd /usr/lib/gcc/avr mercury:/usr/lib/gcc/avr> ls -ltra total 0 drwxr-xr-x 6 root root 408 Jun 4 22:33 3.4.6 drwxr-xr-x 4 root root 112 Jun 4 22:33 .. drwxr-xr-x 3 root root 72 Jun 4 22:33 . mercury:/usr/lib/gcc/avr> find . -type d . ./3.4.6 ./3.4.6/avr3 ./3.4.6/avr4 ./3.4.6/avr5 ./3.4.6/include mercury:/usr/lib/gcc/avr> ls -ltra ./3.4.6 total 196 -rw-r--r-- 1 root root 7676 Jun 4 22:33 vanilla.specs -rw-r--r-- 1 root root 7676 Jun 4 22:33 specs -rw-r--r-- 1 root root 3348 Jun 4 22:33 libgcov.a -rw-r--r-- 1 root root 145838 Jun 4 22:33 libgcc.a -rw-r--r-- 1 root root 7682 Jun 4 22:33 hardenednossp.specs -rw-r--r-- 1 root root 7678 Jun 4 22:33 hardenednopiessp.specs -rw-r--r-- 1 root root 7682 Jun 4 22:33 hardenednopie.specs -rw-r--r-- 1 root root 7686 Jun 4 22:33 hardened.specs drwxr-xr-x 2 root root 336 Jun 4 22:33 include drwxr-xr-x 2 root root 104 Jun 4 22:33 avr5 drwxr-xr-x 2 root root 104 Jun 4 22:33 avr4 drwxr-xr-x 2 root root 104 Jun 4 22:33 avr3 drwxr-xr-x 3 root root 72 Jun 4 22:33 .. drwxr-xr-x 6 root root 408 Jun 4 22:33 . mercury:/usr/lib/gcc/avr> ls -ltra ./3.4.6/avr5 total 144 -rw-r--r-- 1 root root 3348 Jun 4 22:33 libgcov.a -rw-r--r-- 1 root root 142820 Jun 4 22:33 libgcc.a drwxr-xr-x 6 root root 408 Jun 4 22:33 .. drwxr-xr-x 2 root root 104 Jun 4 22:33 . mercury:/usr/lib/gcc/avr> which avr-ld /usr/bin/avr-ld mercury:/usr/lib/gcc/avr> l /usr/bin/avr-ld lrwxrwxrwx 1 root root 23 Jun 4 22:29 /usr/bin/avr-ld -> /usr/libexec/gcc/avr/ld mercury:/usr/lib/gcc/avr> l /usr/libexec/gcc/avr/ total 0 lrwxrwxrwx 1 root root 54 Jun 4 22:29 strip -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/strip lrwxrwxrwx 1 root root 56 Jun 4 22:29 strings -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/strings lrwxrwxrwx 1 root root 53 Jun 4 22:29 size -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/size lrwxrwxrwx 1 root root 56 Jun 4 22:29 readelf -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/readelf lrwxrwxrwx 1 root root 55 Jun 4 22:29 ranlib -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/ranlib lrwxrwxrwx 1 root root 56 Jun 4 22:29 objdump -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/objdump lrwxrwxrwx 1 root root 56 Jun 4 22:29 objcopy -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/objcopy lrwxrwxrwx 1 root root 51 Jun 4 22:29 nm -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/nm lrwxrwxrwx 1 root root 51 Jun 4 22:29 ld -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/ld lrwxrwxrwx 1 root root 56 Jun 4 22:29 c++filt -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/c++filt lrwxrwxrwx 1 root root 51 Jun 4 22:29 as -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/as lrwxrwxrwx 1 root root 51 Jun 4 22:29 ar -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/ar lrwxrwxrwx 1 root root 58 Jun 4 22:29 addr2line -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/addr2line drwxr-xr-x 4 root root 112 Jun 4 22:29 .. drwxr-xr-x 2 root root 96 Jun 4 22:33 3.4.6 drwxr-xr-x 3 root root 392 Jun 4 22:33 . mercury:~> cd /usr/x86_64-pc-linux-gnu/avr/lib/ mercury:/usr/x86_64-pc-linux-gnu/avr/lib> l total 0 lrwxrwxrwx 1 root root 42 Jun 4 22:29 libopcodes.so -> /usr/lib/binutils/avr/2.16.1/libopcodes.so lrwxrwxrwx 1 root root 42 Jun 4 22:29 libopcodes.la -> /usr/lib/binutils/avr/2.16.1/libopcodes.la lrwxrwxrwx 1 root root 41 Jun 4 22:29 libopcodes.a -> /usr/lib/binutils/avr/2.16.1/libopcodes.a lrwxrwxrwx 1 root root 49 Jun 4 22:29 libopcodes-2.16.1.so -> /usr/lib/binutils/avr/2.16.1/libopcodes-2.16.1.so lrwxrwxrwx 1 root root 40 Jun 4 22:29 libiberty.a -> /usr/lib/binutils/avr/2.16.1/libiberty.a lrwxrwxrwx 1 root root 38 Jun 4 22:29 libbfd.so -> /usr/lib/binutils/avr/2.16.1/libbfd.so lrwxrwxrwx 1 root root 38 Jun 4 22:29 libbfd.la -> /usr/lib/binutils/avr/2.16.1/libbfd.la lrwxrwxrwx 1 root root 37 Jun 4 22:29 libbfd.a -> /usr/lib/binutils/avr/2.16.1/libbfd.a lrwxrwxrwx 1 root root 45 Jun 4 22:29 libbfd-2.16.1.so -> /usr/lib/binutils/avr/2.16.1/libbfd-2.16.1.so lrwxrwxrwx 1 root root 38 Jun 4 22:29 ldscripts -> /usr/lib/binutils/avr/2.16.1/ldscripts drwxr-xr-x 2 root root 368 Jun 4 22:29 . drwxr-xr-x 5 root root 128 Jun 4 22:33 .. mercury:/usr/x86_64-pc-linux-gnu/avr/lib> cd ldscripts mercury:/usr/x86_64-pc-linux-gnu/avr/lib/ldscripts> ls -ltra total 161 -rw-r--r-- 1 root root 3538 Jun 4 22:29 avr5.xu -rw-r--r-- 1 root root 3389 Jun 4 22:29 avr5.xr -rw-r--r-- 1 root root 4444 Jun 4 22:29 avr5.xn -rw-r--r-- 1 root root 4462 Jun 4 22:29 avr5.xbn -rw-r--r-- 1 root root 4444 Jun 4 22:29 avr5.x -rw-r--r-- 1 root root 3536 Jun 4 22:29 avr4.xu -rw-r--r-- 1 root root 3387 Jun 4 22:29 avr4.xr -rw-r--r-- 1 root root 4442 Jun 4 22:29 avr4.xn -rw-r--r-- 1 root root 4460 Jun 4 22:29 avr4.xbn -rw-r--r-- 1 root root 4442 Jun 4 22:29 avr4.x -rw-r--r-- 1 root root 3538 Jun 4 22:29 avr3.xu -rw-r--r-- 1 root root 3389 Jun 4 22:29 avr3.xr -rw-r--r-- 1 root root 4444 Jun 4 22:29 avr3.xn -rw-r--r-- 1 root root 4462 Jun 4 22:29 avr3.xbn -rw-r--r-- 1 root root 4444 Jun 4 22:29 avr3.x -rw-r--r-- 1 root root 3536 Jun 4 22:29 avr2.xu -rw-r--r-- 1 root root 3387 Jun 4 22:29 avr2.xr -rw-r--r-- 1 root root 4442 Jun 4 22:29 avr2.xn -rw-r--r-- 1 root root 4460 Jun 4 22:29 avr2.xbn -rw-r--r-- 1 root root 4442 Jun 4 22:29 avr2.x -rw-r--r-- 1 root root 3531 Jun 4 22:29 avr1.xu -rw-r--r-- 1 root root 3382 Jun 4 22:29 avr1.xr -rw-r--r-- 1 root root 4437 Jun 4 22:29 avr1.xn -rw-r--r-- 1 root root 4455 Jun 4 22:29 avr1.xbn -rw-r--r-- 1 root root 4437 Jun 4 22:29 avr1.x drwxr-xr-x 4 root root 392 Jun 4 22:29 .. drwxr-xr-x 2 root root 648 Jun 4 22:29 . So there is a file avr5.x in /usr/lib/binutils/avr/2.16.1/ldscripts/ and the symbolic link ldscripts in /usr/x86_64-pc-linux-gnu/avr/lib/ points to it. Apparently the search root for the ldscripts directory in avr-ld is something other than ../../../lib/binutils/avr/2.16.1/ldscripts/ ? I'm guessing I have a wrong or missing symbolic link somewhere in my toolchain. Can anyone help? Thanks. --ken BTW, here are some other symbolic links relevant to the avr toolchain: mercury:/usr/lib/gcc/avr> cd /usr/x86_64-pc-linux-gnu mercury:/usr/x86_64-pc-linux-gnu> ls -l `find . -type l` | grep avr lrwxrwxrwx 1 root root 7 Jun 4 22:33 ./avr/gcc-bin/3.4.6/avr-gcc-3.4.6 -> avr-gcc lrwxrwxrwx 1 root root 38 Jun 4 22:29 ./avr/lib/ldscripts -> /usr/lib/binutils/avr/2.16.1/ldscripts lrwxrwxrwx 1 root root 45 Jun 4 22:29 ./avr/lib/libbfd-2.16.1.so -> /usr/lib/binutils/avr/2.16.1/libbfd-2.16.1.so lrwxrwxrwx 1 root root 37 Jun 4 22:29 ./avr/lib/libbfd.a -> /usr/lib/binutils/avr/2.16.1/libbfd.a lrwxrwxrwx 1 root root 38 Jun 4 22:29 ./avr/lib/libbfd.la -> /usr/lib/binutils/avr/2.16.1/libbfd.la lrwxrwxrwx 1 root root 38 Jun 4 22:29 ./avr/lib/libbfd.so -> /usr/lib/binutils/avr/2.16.1/libbfd.so lrwxrwxrwx 1 root root 40 Jun 4 22:29 ./avr/lib/libiberty.a -> /usr/lib/binutils/avr/2.16.1/libiberty.a lrwxrwxrwx 1 root root 49 Jun 4 22:29 ./avr/lib/libopcodes-2.16.1.so -> /usr/lib/binutils/avr/2.16.1/libopcodes-2.16.1.so lrwxrwxrwx 1 root root 41 Jun 4 22:29 ./avr/lib/libopcodes.a -> /usr/lib/binutils/avr/2.16.1/libopcodes.a lrwxrwxrwx 1 root root 42 Jun 4 22:29 ./avr/lib/libopcodes.la -> /usr/lib/binutils/avr/2.16.1/libopcodes.la lrwxrwxrwx 1 root root 42 Jun 4 22:29 ./avr/lib/libopcodes.so -> /usr/lib/binutils/avr/2.16.1/libopcodes.so mercury:/usr/x86_64-pc-linux-gnu> cd /usr/libexec/ mercury:/usr/libexec> ls -l `find . -type l` | grep avr lrwxrwxrwx 1 root root 58 Jun 4 22:29 ./gcc/avr/addr2line -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/addr2line lrwxrwxrwx 1 root root 51 Jun 4 22:29 ./gcc/avr/ar -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/ar lrwxrwxrwx 1 root root 51 Jun 4 22:29 ./gcc/avr/as -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/as lrwxrwxrwx 1 root root 56 Jun 4 22:29 ./gcc/avr/c++filt -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/c++filt lrwxrwxrwx 1 root root 51 Jun 4 22:29 ./gcc/avr/ld -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/ld lrwxrwxrwx 1 root root 51 Jun 4 22:29 ./gcc/avr/nm -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/nm lrwxrwxrwx 1 root root 56 Jun 4 22:29 ./gcc/avr/objcopy -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/objcopy lrwxrwxrwx 1 root root 56 Jun 4 22:29 ./gcc/avr/objdump -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/objdump lrwxrwxrwx 1 root root 55 Jun 4 22:29 ./gcc/avr/ranlib -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/ranlib lrwxrwxrwx 1 root root 56 Jun 4 22:29 ./gcc/avr/readelf -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/readelf lrwxrwxrwx 1 root root 53 Jun 4 22:29 ./gcc/avr/size -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/size lrwxrwxrwx 1 root root 56 Jun 4 22:29 ./gcc/avr/strings -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/strings lrwxrwxrwx 1 root root 54 Jun 4 22:29 ./gcc/avr/strip -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.16.1/strip
_______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
