Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280148 - problem with linking in avr toolchain (cross-avr/*, installed by sys-devel/crossdev-0.9.19)
Summary: problem with linking in avr toolchain (cross-avr/*, installed by sys-devel/cr...
Status: RESOLVED DUPLICATE of bug 147155
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-03 08:46 UTC by Thomas Capricelli
Modified: 2009-08-04 11:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2009-08-03 08:46:46 UTC
When trying to link using avr-gcc(cross-avr/gcc-4.4.1) or avr-ld(cross-avr/binutils-2.19.1-r1), i have this error message:
/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr6.x: No such file or directory

I've tried lot of different ways (using ld, or gcc, with different options..) and I always got this message.

According to several howtos/pages on the web, my use of the toolchain is the 'usual way' and it seems to work for other. Here are some examples leading to this error:
avr-gcc -mmcu=atmega2560 -Wstrict-prototypes  -o project.elf /usr/avr/lib/avr6/crtm2560.o leds.o
avr-gcc -mmcu=atmega2560 -o project.elf leds.o

Oddly though, this one seems to work:
avr-ld -o project.elf leds.o

The missing file is actually installed as '/usr/lib/binutils/avr/2.19.1/ldscripts/avr6.x', i can open it with vim


Reproducible: Always




The layout seems strange to me, but i'm not familiar with gcc:
% ll /usr/bin/avr-ld /usr/libexec/gcc/avr/ld /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.19.1/ld
lrwxrwxrwx 1 root root     23 2009-08-02 05:07 /usr/bin/avr-ld -> /usr/libexec/gcc/avr/ld
lrwxrwxrwx 1 root root     51 2009-08-02 05:07 /usr/libexec/gcc/avr/ld -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.19.1/ld
-rwxr-xr-x 1 root root 460440 2009-08-02 05:07 /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.19.1/ld

(for my host compiler, thiss looks different :)
% ll /usr/bin/ld /usr/bin/x86_64-pc-linux-gnu-ld /usr/x86_64-pc-linux-gnu/bin/ld
lrwxrwxrwx 1 root root 22 2009-05-11 01:18 /usr/bin/ld -> x86_64-pc-linux-gnu-ld
lrwxrwxrwx 1 root root 31 2009-05-11 01:18 /usr/bin/x86_64-pc-linux-gnu-ld -> /usr/x86_64-pc-linux-gnu/bin/ld
lrwxrwxrwx 1 root root 47 2009-05-11 01:18 /usr/x86_64-pc-linux-gnu/bin/ld -> /usr/x86_64-pc-linux-gnu/binutils-bin/2.19.1/ld
Comment 1 Thomas Capricelli 2009-08-04 11:08:22 UTC

*** This bug has been marked as a duplicate of bug 147155 ***