Bug 905634

Summary: Build Service Cross-Toolchain(AVR): Arduino 1.0.6 fails to cross-compile
Product: [openSUSE] openSUSE Distribution Reporter: Forgotten User gp-dpinp5x <forgotten_gp-dpinp5x>
Component: OtherAssignee: Klaus Kämpf <kkaempf>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P1 - Urgent CC: forgotten_HJwNQbrLwk, forgotten_js_DutmDZD, forgotten_kRObQ08xPS, forgotten_ppAsHhNel_, forgotten_vlwz3TLzxw, kdupke, matz, rguenther, whdu
Version: 13.2   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 13.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User gp-dpinp5x 2014-11-15 12:58:46 UTC
Running openSUSE 13.2, but using arduino-1.0.6-1.1.x86_64 from Build Service Cross-Toolchain(AVR) for 13.1, since there is no 13.2 repo available..

I get the following error when I try to "verify/compile". (You can reproduce this without connecting to a target board.)


/usr/share/arduino-1.0.6/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/bin/ld: skipping incompatible /usr/share/arduino-1.0.6/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/lib/avr51/libm.a when searching for -lm

/usr/share/arduino-1.0.6/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/bin/ld: skipping incompatible /usr/share/arduino-1.0.6/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/lib/libm.a when searching for -lm

/usr/share/arduino-1.0.6/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/bin/ld: cannot find -lm


For some reason, cross-avr-gcc and cross-avr-gdb are supplied by Build Service, which is 13.1, but cross-avr-binutils is now supplied in the main 13.2 OSS repo.

Why is this? What use is AVR binutils on its own? I suspected that I had a version mismatch between 13.1 and 13.2. I downgraded cross-avr-binutils to 13.1 Main Repo OSS, but it didn't fix the problem.

Now I've noticed that Arduino includes a second copy of gcc and binutils, possibly a different version from the separate packages. Yet it still lists those packages as dependencies even though I don't think it uses them.

I'd appreciate any and all suggestions for me to try to fix this on my end. Hopefully this will speed your efforts in moving the Build Service Arduino to 13.2.
Comment 1 Forgotten User HJwNQbrLwk 2014-11-22 11:18:55 UTC
Running openSuse 12.3 and have exactly the same problem.

I installed the Arduino-packages about a month ago (mid-october) and it worked.
But when I try to use them now I get the same problem. Several updates has been applied to my system in between.
Comment 2 Forgotten User HJwNQbrLwk 2014-11-22 11:49:47 UTC
Also managed to reproduce on 13.1
Comment 3 Forgotten User kRObQ08xPS 2014-11-23 17:22:38 UTC
I'm on Tumbleweed and hit the bug too.
if you move the tools directory out from the arduino things work.
Like this:
mv /usr/share/arduino-1.0.6/hardware/tools /usr/share/arduino-1.0.6/hardware/tools.old
Then arduino uses the system wide installed tools
Comment 4 Richard Biener 2014-11-24 08:56:41 UTC
It sounds like a problem with the adruino packages and their setup (their
directory layout looks very odd to me from what is pasted here).
Comment 5 Forgotten User js_DutmDZD 2014-11-27 01:02:11 UTC
runnING OpenSuse 13.1 and after updating everything I can no longer use arduino due to this bug. What's worse, old version is gone so I can't even downgrade to prev version which puts me dead in the water until some solution is found.
Comment 6 Forgotten User kRObQ08xPS 2014-11-27 11:09:08 UTC
(In reply to Peter Sjoberg from comment #5)
> runnING OpenSuse 13.1 and after updating everything I can no longer use
> arduino due to this bug. What's worse, old version is gone so I can't even
> downgrade to prev version which puts me dead in the water until some
> solution is found.

If you are in a hurry just remove the arduino tools as I have suggested above. We all wait for a cleaner solution but you can do it in the meantime.
Also I think the cross-avr-tools is newer and better than what is distributed with Arduino-1.0.6
Comment 7 Forgotten User js_DutmDZD 2014-11-29 06:08:36 UTC
(In reply to Todor Gyumyushev from comment #6)
> (In reply to Peter Sjoberg from comment #5)
> > runnING OpenSuse 13.1 and after updating everything I can no longer use
> > arduino due to this bug. What's worse, old version is gone so I can't even
> > downgrade to prev version which puts me dead in the water until some
> > solution is found.
> 
> If you are in a hurry just remove the arduino tools as I have suggested
> above. We all wait for a cleaner solution but you can do it in the meantime.
> Also I think the cross-avr-tools is newer and better than what is
> distributed with Arduino-1.0.6

Did bite the bullet and installed 1.5.8 directly from arduino.cc and after moving my project directory that worked for what I had to do that evening at least.
Comment 8 Forgotten User vlwz3TLzxw 2014-12-26 16:28:38 UTC
Solved.
As root:
cd /usr/share/arduino-1.0.6/hardware/tools/avr/bin
mv ./avr-gcc ./avr-gcc-backup
ln -s /usr/bin/avr-gcc ./
Comment 9 Weihua Du 2015-01-04 02:16:13 UTC
Klaus, would you please take a look ? thanks!
Comment 10 Klaus Kämpf 2015-01-09 13:10:15 UTC
Yeah, sorry, arduino-1.0.6 brings its own gcc-avr instead of using the packaged one. I'll repackage arduino-1.0.6 to fix this.
Comment 11 Klaus Kämpf 2015-01-09 15:05:46 UTC
https://build.opensuse.org/package/show/CrossToolchain:avr/arduino just got updated, please reinstall 'arduino' (and arduino-examples, arduino-reference) from there.