You are not logged in.
Pages: 1
Hi guys,
I'm trying to work with arduino IDE, but I cannot compile even Blink example. I'm always seeing following error:
/usr/share/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/bin/ld: cannot find -lm
Any ideas how I can fix it?
Offline
Where are you seeing this? Through the arduino PKGBUILD from aur?
since 2009
Offline
Yes, arduino. I also tried to install arduino-git and arduino-beta, result is the same.
Offline
This is exactly what I've experienced...
It seems that the compilation of avr-gcc was not done correctly. As avr-gcc comes precompiled as a dependency of arduino, this is (if I'm correct) a packaging error. I've filed a bug-report to see if any maintainer has to say something about this...
Offline
I'm also experiencing the exact same issue
Offline
Bump. Same issue. I just installed it now and I thought I was nuts.
Looks like a bug introduced in the latest avr-gcc update from Oct 17. Trying to downgrade back to 4.8.0, but not finding it on any of the mirrors
Last edited by yuvadm (2013-10-27 18:33:43)
Offline
My bug-report was 'rejected' as it seems to be a bug in the arduino-package
avr-gcc (a customized version at least) is shipped with the IDE, as can be found by the error line:
/usr/share/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/bin/ld
This path evaluates to '/usr/share/arduino/hardware/tools/avr/lib/avr/bin/ld'... I've added a comment to the AUR now, so lets see what's the comment on that...
Offline
Bump. Same issue. I just installed it now and I thought I was nuts.
Looks like a bug introduced in the latest avr-gcc update from Oct 17. Trying to downgrade back to 4.8.0, but not finding it on any of the mirrors
I already tried. Unfortunately unsuccessful
Offline
I already tried. Unfortunately unsuccessful
Yeah I just noticed arduino brings its own avr toolchain.
EDIT: funny, same exact arduino setup (same versions) works on my desktop, but still spitting errors on my laptop. Trying to find any discrepancies between the two.
Last edited by yuvadm (2013-10-27 22:33:32)
Offline
Same issue here
Offline
Solution was found in discussion in package arduino.
In short words:
You need to install package avr-gcc
Replace build-in avr-gcc compiler by same from package installed on previous step:
# cd /usr/share/arduino/hardware/tools/avr/bin
# mv ./avr-gcc ./avr-gcc-backup
# ln -s /usr/bin/avr-gcc ./
It works for me.
Offline
Well, it works for now... I got warned by another developer for the native arduino library support though. I'm not able to test it right now, but thanks so far!
Edit: Sadly, my concerns were grounded. I am unable to compile anything with custom libraries... I'll have to wait with Arduino until an update is coming out...
Last edited by bdalenoord (2013-11-03 13:11:12)
Offline
This works for me too. Thanks!
Solution was found in discussion in package arduino.
In short words:
You need to install package avr-gcc
Replace build-in avr-gcc compiler by same from package installed on previous step:
# cd /usr/share/arduino/hardware/tools/avr/bin # mv ./avr-gcc ./avr-gcc-backup # ln -s /usr/bin/avr-gcc ./
It works for me.
Offline
If you're into absolutely broken and stupid hacks, it looks like the compiler fails only on linking. So I'm calling the arduino avr-gcc until I see an "-lm", then I hand it to the Arch Linux one.
Like so:
#!/usr/bin/perl
$is_lm = 0;
if (grep(/\-lm/, @ARGV)) { $is_lm = 1; }
if ($is_lm == 0) {
print STDERR "switch: ARDUINO\n";
exec('/usr/share/arduino/hardware/tools/avr/bin/orig.avr-gcc', @ARGV);
} else {
print STDERR "switch: ARCH\n";
exec('/usr/bin/avr-gcc', @ARGV);
}
Offline
Worked also for my Asus laptop!
This works for me too. Thanks!
kircul wrote:Solution was found in discussion in package arduino.
In short words:
You need to install package avr-gcc
Replace build-in avr-gcc compiler by same from package installed on previous step:
# cd /usr/share/arduino/hardware/tools/avr/bin # mv ./avr-gcc ./avr-gcc-backup # ln -s /usr/bin/avr-gcc ./
It works for me.
Offline
Solution was found in discussion in package arduino.
In short words:
You need to install package avr-gcc
Replace build-in avr-gcc compiler by same from package installed on previous step:
# cd /usr/share/arduino/hardware/tools/avr/bin # mv ./avr-gcc ./avr-gcc-backup # ln -s /usr/bin/avr-gcc ./
It works for me.
Thanks man. This bug is still present in arduino-beta from AUR.
A person who never made a mistake never tried anything new.
Offline
Thanks man. This bug is still present in arduino-beta from AUR.
Can confirm that the issue is not present in the arduino package from AUR, but exists with the arduino-beta package also from AUR.
Offline
Pages: 1