Bug 737769 - Sketch build failures - progmem issues
Summary: Sketch build failures - progmem issues
Alias: None
Product: Fedora
Classification: Fedora
Component: avr-gcc
Version: 15
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Thibault North
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-09-13 03:54 UTC by Rich Mattes
Modified: 2011-10-24 22:56 UTC (History)
5 users (show)

Fixed In Version: avr-libc-1.7.1-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-10-24 22:56:14 UTC

Attachments (Terms of Use)
Build output for blink example sketch (5.03 KB, text/plain)
2011-09-13 03:55 UTC, Rich Mattes
no flags Details

System ID Priority Status Summary Last Updated
GNU Compiler Collection 49764 None None None Never

Description Rich Mattes 2011-09-13 03:54:01 UTC
Description of problem:
Arduino sketches fail to build with latest Fedora 15 updates.  Building the "Blink" example sketch results in several errors like the following:

/usr/share/arduino/hardware/arduino/cores/arduino/Tone.cpp:93:66: error: variable 'tone_pin_to_timer_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Full output for blink build is attached.

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

How reproducible:
Try building an example sketch

Steps to Reproduce:
1. Start Arduino, open the Examples->Basic->Blink
2. Press the "Verify" button
3. Red text!!
Actual results:
Build failure

Expected results:
Successful build

Additional info:
Looks like arch had a similar issue:
I have not yet tried the attached patch

Comment 1 Rich Mattes 2011-09-13 03:55:46 UTC
Created attachment 522847 [details]
Build output for blink example sketch

Comment 2 Peter Oliver 2011-09-14 19:54:56 UTC
The forum linked above indicates that this is GCC bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764, now fixed upstream.

Comment 3 Thibault North 2011-09-15 00:13:13 UTC
Did you try the fix given in the comments there ?


Comment 4 Rich Mattes 2011-09-20 04:01:09 UTC
Sorry it took so long to get around to testing this.  I assume the fix you're referring to is the avr-gcc-4.6.1-3 scratch build that you posted links to in bug 737950. I upgraded my machine to the f16 pre-release over the weekend, but I still have the same issue with Arduino using the following package versions:


I rebuilt the avr-gcc srpm from bug 737950 for f16 on my machine using mock, and upgraded avr-gcc and avr-gcc-c++ with the resultant packages.  After that, the Arduino sketches I tried all built successfully - no progmem issues.  

To be sure, I pulled out an Arduino Mega with the ATMega1280 chip, and built & uploaded the blink example sketch.  The sketch uploaded successfully and the Mega's on-board LED blinked as expected.  It looks like 4.6.1-3 has cleared up this bug.

Comment 5 Thibault North 2011-09-20 14:34:40 UTC
Alright, thanks for your report.
I will commit that soon. I am having a few problems with the docs, but as soon as it is fixed it will be pushed.

Comment 6 Aidan Delaney 2011-09-21 19:34:48 UTC
The upstream bug report is
The issue is fixed in trunk, but not yet in a release AFAIK.

Comment 7 Thibault North 2011-09-21 19:51:41 UTC
Did you try the scratch builds of bug https://bugzilla.redhat.com/show_bug.cgi?id=737950 ? They should fix the issue.

Comment 8 Fedora Update System 2011-10-15 21:35:36 UTC
avr-libc-1.7.1-1.fc15,avr-gcc-4.6.1-3.fc15 has been submitted as an update for Fedora 15.

Comment 9 Fedora Update System 2011-10-16 22:26:23 UTC
Package avr-libc-1.7.1-1.fc15, avr-gcc-4.6.1-3.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing avr-libc-1.7.1-1.fc15 avr-gcc-4.6.1-3.fc15'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2011-10-24 22:56:14 UTC
avr-libc-1.7.1-1.fc15, avr-gcc-4.6.1-3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

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