Bug 12919 - Arduino - Impossible to compile any sketch.
Summary: Arduino - Impossible to compile any sketch.
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA4TOO has_procedure advisory MGA4-6...
Keywords: Triaged, validated_update
: 15075 16044 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-02 23:09 CET by Åukasz MaÅlaniec
Modified: 2018-04-18 12:00 CEST (History)
9 users (show)

See Also:
Source RPM: arduino
CVE:
Status comment:


Attachments

Description Åukasz MaÅlaniec 2014-03-02 23:09:16 CET
Description of problem:

Impossible to compile any sketch.

I open sketch, for example Basics->Blink
Compiling...and I have got below error.

Output from terminal window:

WARNING:  RXTX Version mismatch
	Jar version = RXTX-2.2
	native lib Version = RXTX-2.2pre2
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Platform.h:9:0,
                 from /usr/share/arduino/hardware/arduino/cores/arduino/CDC.cpp:19:
/usr/avr/include/util/delay.h: In function 'void _delay_ms(double)':
/usr/avr/include/util/delay.h:149:42: error: 'fabs' was not declared in this scope
   __ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
                                          ^
/usr/avr/include/util/delay.h:149:43: error: 'ceil' was not declared in this scope
   __ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
                                           ^
/usr/avr/include/util/delay.h: In function 'void _delay_us(double)':
/usr/avr/include/util/delay.h:226:42: error: 'fabs' was not declared in this scope
   __ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
                                          ^
/usr/avr/include/util/delay.h:226:43: error: 'ceil' was not declared in this scope
   __ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
                                           ^


Version-Release number of selected component (if applicable):

arduino-1.0-8.mga4.noarch
arduino-core-1.0-8.mga4.noarch
arduino-doc-1.0-8.mga4.noarch
avr-libc-1.7.1-6.mga4
avrdude-6.0.1-4.mga4
cross-avr-gcc-c++-4.8.1-2.mga4
cross-avr-gcc-4.8.1-2.mga4
cross-avr-binutils-2.23.2-2.mga4


How reproducible:


Steps to Reproduce:
1. run arduino
2. load example sketch
3. try to compile


Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2014-03-03 19:01:44 CET

CC: (none) => dmorganec, pierre-malo.denielou
Keywords: (none) => Triaged

Comment 1 R Ghetta 2014-05-10 11:30:23 CEST
Adding 
#include <math.h> 
after #include <inttypes.h> in /usr/avr/include/util/delay.h
fixes it

A workaround is adding #include <math.h> to the script

CC: (none) => birrachiara

Comment 2 papoteur 2014-09-07 15:57:54 CEST
I saw this problem with firmware for Scratch (S4A)
http://vps34736.ovh.net/S4A/S4AFirmware15.ino
Encountered the same problem. The same workaround in delay.h solved the problem.
Is it an upstream problem?
A patch is needed.

CC: (none) => yves.brungard_mageia

Comment 3 Jan Pihlgren 2015-01-18 09:09:23 CET
The same error in Mageia 5 Beta 2.
The same workaround solv the problem
I agree with papoteur, a patch is needed.

CC: (none) => jan

Jani Välimaa 2015-01-18 09:19:11 CET

Source RPM: arduino-1.0-8.mga4.noarch => arduino
Hardware: x86_64 => All
Version: 4 => Cauldron
Whiteboard: (none) => MGA4TOO

Comment 4 Jani Välimaa 2015-01-18 09:20:14 CET
*** Bug 15075 has been marked as a duplicate of this bug. ***
Comment 5 Samuel Verschelde 2015-05-31 22:03:23 CEST
Assigning to maintainer.

Assignee: bugsquad => shlomif
Whiteboard: MGA4TOO => MGA4TOO MGA5TOO
Severity: normal => major

Shlomi Fish 2015-06-05 12:05:01 CEST

Whiteboard: MGA4TOO MGA5TOO => MGA4TOO MGA5TOO OK

Comment 6 Yann Cantin 2015-09-06 19:57:50 CEST
Uploaded patched package for Mageia 5

Compiling should work now, please test.

Advisory:
========================

Compilation for Arduino boards failed due to a missing include
in one of avr-libc header file. This update fixes it.

========================

Updated packages in core/updates_testing:
========================
avr-libc-1.7.1-9.mga5.noarch
avr-libc-docs-1.7.1-9.mga5.noarch

From source RPMs:
avr-libc-1.7.1-9.mga5.src.rpm

Assignee: shlomif => qa-bugs
CC: (none) => yann.cantin

Comment 7 David Walser 2015-09-07 01:19:21 CEST
If it's fixed in Cauldron, make sure to change the version tag to 5 (and remove MGA5TOO from the whiteboard).  Also, there is MGA4TOO in the whiteboard but you didn't make an update for Mageia 4.  If it's assigned to QA and MGA4TOO is in the whiteboard, there should be an update for Mageia 4 as well.  If you're marking this as WONTFIX for Mageia 4, remove MGA4TOO from the whiteboard.

Assigning back to Yann until that's straightened out.

CC: (none) => qa-bugs
Assignee: qa-bugs => yann.cantin

Comment 8 Yann Cantin 2015-09-07 20:43:53 CEST
Updated Advisory :

Uploaded patched package for Mageia 4 and 5

Compiling should work now, please test.

Advisory:
========================

Compilation for Arduino boards failed due to a missing include
in one of avr-libc header file. This update fixes it.

========================

Updated packages in core/updates_testing:
========================
avr-libc-1.7.1-6.1.mga4.noarch
avr-libc-docs-1.7.1-6.1.mga4.noarch
avr-libc-1.7.1-9.mga5.noarch
avr-libc-docs-1.7.1-9.mga5.noarch

From source RPMs:
avr-libc-1.7.1-6.1.mga4.src.rpm
avr-libc-1.7.1-9.mga5.src.rpm

Version: Cauldron => 5
Assignee: yann.cantin => qa-bugs
Whiteboard: MGA4TOO MGA5TOO OK => MGA4TOO OK

Comment 9 papoteur 2015-09-13 19:46:46 CEST
Tested:
installing avr-libc-1.7.1-9.mga5 and arduino.
launching arduino
loading a sketch.
Asking for check/compile.
The compiling is OK 
Fine \o/

Papoteur
Comment 10 Len Lawrence 2015-09-15 11:55:08 CEST
Tried this in Mageia 4 in vbox x86_64

Installed arduino and noarch libraries.
Invoked arduino and tried to compile BlinkWithoutDelay.  That failed as expected.

Installed updates and tried again.  Successful that time and also saw the cross-compile warning about not having the actual hardware connected to USB.

CC: (none) => tarazed25

Len Lawrence 2015-09-15 11:58:59 CEST

Whiteboard: MGA4TOO OK => MGA4TOO MGA4-64-OK

Comment 11 Len Lawrence 2015-09-15 12:18:27 CEST
Testing this in Mageia 4 vbox i586
Before updates testing compilation failed on several of the supplied programs.
The warning is actually about the group membership needed for cross-compilation for connected hardware.
Updated the libraries and successfully compiled several sketches in different groups.
Len Lawrence 2015-09-15 12:19:06 CEST

Whiteboard: MGA4TOO MGA4-64-OK => MGA4TOO MGA4-64-OK MGA4-32-OK

Comment 12 Len Lawrence 2015-09-15 12:20:29 CEST
@papoteur: are you doing the i586 test for mga5?  If not I shall run it in a VM.
Comment 13 papoteur 2015-09-15 12:42:59 CEST
(In reply to Len Lawrence from comment #12)
> @papoteur: are you doing the i586 test for mga5?  If not I shall run it in a
> VM.
I have only x64 :/
Comment 14 claire robinson 2015-09-15 13:22:19 CEST
We are still validating on one arch per release so one mga5 test will suffice, thanks.
Comment 15 Len Lawrence 2015-09-15 14:10:31 CEST
OK.  Thanks Claire.    We can put up the OK then for mga5.
Len Lawrence 2015-09-15 14:11:16 CEST

Whiteboard: MGA4TOO MGA4-64-OK MGA4-32-OK => MGA4TOO MGA4-64-OK MGA4-32-OK MGA5-64-OK

Comment 16 claire robinson 2015-09-15 15:35:11 CEST
Validating. Advisory uploaded from comment 8.

Please push to 4 & 5 updates

Thanks

Keywords: (none) => validated_update
Whiteboard: MGA4TOO MGA4-64-OK MGA4-32-OK MGA5-64-OK => MGA4TOO has_procedure advisory MGA4-64-OK MGA4-32-OK MGA5-64-OK
CC: (none) => sysadmin-bugs

Comment 17 Mageia Robot 2015-09-15 16:56:00 CEST
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0122.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 18 Yann Cantin 2015-12-21 13:17:04 CET
*** Bug 16044 has been marked as a duplicate of this bug. ***
Comment 19 Marja Van Waes 2018-04-18 12:00:19 CEST
*** Bug 16044 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.