View previous topic :: View next topic |
Author |
Message |
baley n00b
Joined: 05 Sep 2006 Posts: 42 Location: Udine
|
Posted: Tue Jun 29, 2010 12:06 pm Post subject: Arduino and ldscripts [SOLVED] |
|
|
Hello people,
I have a problem with arduino-0017 that is in portage.
I followed more or less this howto, but when i try to compile inside arduino i get this error:
Code: |
/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr5.x: No such file or directory
|
Probably there is a problem with the ldscripts link. Installing arduino with portage where should I put this link?
Thanks a lot.
Last edited by baley on Thu Jul 01, 2010 9:47 am; edited 1 time in total |
|
Back to top |
|
|
newtrack4 n00b
Joined: 04 Feb 2006 Posts: 7 Location: Illinois, USA
|
Posted: Tue Jun 29, 2010 10:11 pm Post subject: |
|
|
I would guess that you're right about the problem location:
Quote: |
Create a symlink so that Arduino will find ldscripts (if this symlink is not present you will get errors about missing .hex files when you try to upload your code to the board):
ln -sv /usr/lib/binutils/avr/2.20.1/ldscripts/ ~/arduino-0018/ldscripts
The value "2.20.1" may differ on your box as the AVR toolchain is upgraded in portage.
|
Can you list your /usr/lib/binutils/avr/2.20.1/ldscripts/ directory or whichever avr directory you are using? If not you need to find it.
Also, did you actually place your arduino directory off of your home directory? I just happened to put mine in my home directory at the location
~/projects/arduino/arduino-0018/
therefore I used the following link:
ln -sv /usr/lib/binutils/avr/2.20.1/ldscripts/ ~bob/projects/arduino/arduino-0018/ldscripts
Notice, I used ~bob, my user directory, instead of ~
Since I made the link when I was running as root, ~ ends up being /root which is not my home directory, and would not go to the correct location. This should be noted in the howto I think! |
|
Back to top |
|
|
baley n00b
Joined: 05 Sep 2006 Posts: 42 Location: Udine
|
Posted: Wed Jun 30, 2010 7:43 am Post subject: |
|
|
I didn't follow exactly the linked howto because I tried to use portage. But also doing in the same way the howto suggests I get the same error. To get the link (in the case in which I didn't use portage) I did the following command:
Code: |
ln -sv /usr/lib64/binutils/avr/2.20.1/ldscripts ~/arduino/arduino-0018/ldscripts
|
as normal user. Doing a ls I obtain the right answer:
Code: |
$ ls ~/arduino/arduino-0018/ldscripts
avr1.x avr2.xr avr3.xbn avr31.xu avr4.xn avr51.x avr6.xr
avr1.xbn avr2.xu avr3.xn avr35.x avr4.xr avr51.xbn avr6.xu
avr1.xn avr25.x avr3.xr avr35.xbn avr4.xu avr51.xn
avr1.xr avr25.xbn avr3.xu avr35.xn avr5.x avr51.xr
avr1.xu avr25.xn avr31.x avr35.xr avr5.xbn avr51.xu
avr2.x avr25.xr avr31.xbn avr35.xu avr5.xn avr6.x
avr2.xbn avr25.xu avr31.xn avr4.x avr5.xr avr6.xbn
avr2.xn avr3.x avr31.xr avr4.xbn avr5.xu avr6.xn
|
but i still get the same error... |
|
Back to top |
|
|
zatalian Apprentice
Joined: 27 Aug 2002 Posts: 179 Location: Gent, Belgium
|
Posted: Wed Jun 30, 2010 4:07 pm Post subject: |
|
|
this is some bug of avr-gcc in combination with a atmega168 or atmega328...
I have no idea what bug the arduino website is talking about in higher versions, but i'm happily using avr-gcc v 4.4.1 in combination with my arduino duemilanove |
|
Back to top |
|
|
newtrack4 n00b
Joined: 04 Feb 2006 Posts: 7 Location: Illinois, USA
|
Posted: Wed Jun 30, 2010 6:07 pm Post subject: |
|
|
This bug is in bugzilla, this is a workaround for gentoo bug 147155:
Code: |
ln -s /usr/lib/binutils/avr/2.20.1/ldscripts /usr/avr/lib/ldscripts
|
I think this will work whether you used portage for the Arduino install or not. Let us know if this works for you.
Updating avr or other packages may remove this link and/or change the avr version number so make a note of this workaround. |
|
Back to top |
|
|
baley n00b
Joined: 05 Sep 2006 Posts: 42 Location: Udine
|
Posted: Thu Jul 01, 2010 9:46 am Post subject: |
|
|
great! Creating this link the compilation is completed without errors!
(it works using both portage and manual installations)
thanks! |
|
Back to top |
|
|
|