Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Arduino and ldscripts [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
baley
n00b
n00b


Joined: 05 Sep 2006
Posts: 42
Location: Udine

PostPosted: Tue Jun 29, 2010 12:06 pm    Post subject: Arduino and ldscripts [SOLVED] Reply with quote

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
View user's profile Send private message
newtrack4
n00b
n00b


Joined: 04 Feb 2006
Posts: 7
Location: Illinois, USA

PostPosted: Tue Jun 29, 2010 10:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
baley
n00b
n00b


Joined: 05 Sep 2006
Posts: 42
Location: Udine

PostPosted: Wed Jun 30, 2010 7:43 am    Post subject: Reply with quote

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
View user's profile Send private message
zatalian
Apprentice
Apprentice


Joined: 27 Aug 2002
Posts: 179
Location: Gent, Belgium

PostPosted: Wed Jun 30, 2010 4:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
newtrack4
n00b
n00b


Joined: 04 Feb 2006
Posts: 7
Location: Illinois, USA

PostPosted: Wed Jun 30, 2010 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
baley
n00b
n00b


Joined: 05 Sep 2006
Posts: 42
Location: Udine

PostPosted: Thu Jul 01, 2010 9:46 am    Post subject: Reply with quote

great! Creating this link the compilation is completed without errors!
(it works using both portage and manual installations)

thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum