Bug 737769 - Sketch build failures - progmem issues
Summary: Sketch build failures - progmem issues
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: avr-gcc
Version: 15
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thibault North
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
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


Links
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):
avr-gcc-4.6.1-2.fc15.x86_64
avr-gcc-c++-4.6.1-2.fc15.x86_64
avr-binutils-2.21-2.fc15.x86_64
arduino-0022-4.fc15.noarch
avrdude-5.10-3.fc15.x86_64

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:
http://arduino.cc/forum/index.php?topic=66710.0
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
Hi,
Did you try the fix given in the comments there ?
https://bugzilla.redhat.com/show_bug.cgi?id=737950

Thanks,

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:

avr-libc-1.7.0-1.fc14.noarch
avr-binutils-2.21-2.fc15.x86_64
avr-gcc-4.6.1-2.fc16.x86_64
avr-gcc-c++-4.6.1-2.fc16.x86_64
arduino-0022-5.fc16.noarch
avrdude-5.11-1.fc16.x86_64

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.
Thanks,
Thibault

Comment 6 Aidan Delaney 2011-09-21 19:34:48 UTC
The upstream bug report is
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44643
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.
https://admin.fedoraproject.org/updates/avr-libc-1.7.1-1.fc15,avr-gcc-4.6.1-3.fc15

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:
https://admin.fedoraproject.org/updates/FEDORA-2011-14454
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.