Bug 746778

Summary: Sketches do not compile
Product: [Fedora] Fedora Reporter: n02384301
Component: arduinoAssignee: Peter Oliver <mavit>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: agajania, mavit
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-17 18:50:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description n02384301 2011-10-17 18:31:36 UTC
Description of problem:

Arduino sketches will not compile using the IDE.

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

arduino.noarch 0022-4.fc15

How reproducible:

This happens 100% of the time.

Steps to Reproduce:
1. Open Blink example
2. Click the "Verify" button or press Ctrl+R
  
Actual results:

In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Tone.cpp:37:0:
/usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:66:53: error: variable 'port_to_mode_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
/usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:67:54: error: variable 'port_to_input_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
/usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:68:55: error: variable 'port_to_output_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
/usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:70:59: error: variable 'digital_pin_to_port_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
/usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:72:63: error: variable 'digital_pin_to_bit_mask_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
/usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:73:60: error: variable 'digital_pin_to_timer_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
/usr/share/arduino/hardware/arduino/cores/arduino/Tone.cpp:108:50: error: variable 'tone_pin_to_timer_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Expected results:

Sketch compiles without error.

Additional info:

These are the actual commands being executed to compile the sketch:

avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /tmp/build7736475685198064516.tmp/Blink.cpp -o/tmp/build7736475685198064516.tmp/Blink.cpp.o 
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/wiring_digital.c -o/tmp/build7736475685198064516.tmp/wiring_digital.c.o 
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/wiring.c -o/tmp/build7736475685198064516.tmp/wiring.c.o 
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/wiring_analog.c -o/tmp/build7736475685198064516.tmp/wiring_analog.c.o 
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.c -o/tmp/build7736475685198064516.tmp/pins_arduino.c.o 
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/wiring_shift.c -o/tmp/build7736475685198064516.tmp/wiring_shift.c.o 
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/wiring_pulse.c -o/tmp/build7736475685198064516.tmp/wiring_pulse.c.o 
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/WInterrupts.c -o/tmp/build7736475685198064516.tmp/WInterrupts.c.o 
avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp -o/tmp/build7736475685198064516.tmp/main.cpp.o 
avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -DARDUINO=22 -I/usr/share/arduino/hardware/arduino/cores/arduino /usr/share/arduino/hardware/arduino/cores/arduino/Tone.cpp -o/tmp/build7736475685198064516.tmp/Tone.cpp.o 

This is where the error appears.

More information on the problem is here:

http://arduino.cc/forum/index.php/topic,66710.15.html

One solution seems to be to downgrade avr-gcc and avr-gcc-c++ packages.

Comment 1 Peter Oliver 2011-10-17 18:50:54 UTC
Sounds like the same issue as in 737950.  Updates are available for testing so give them a try.

*** This bug has been marked as a duplicate of bug 737950 ***