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):
Try building an example sketch
Steps to Reproduce:
1. Start Arduino, open the Examples->Basic->Blink
2. Press the "Verify" button
3. Red text!!
Looks like arch had a similar issue:
I have not yet tried the attached patch
Created attachment 522847 [details]
Build output for blink example sketch
The forum linked above indicates that this is GCC bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764, now fixed upstream.
Did you try the fix given in the comments there ?
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.
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.
The upstream bug report is
The issue is fixed in trunk, but not yet in a release AFAIK.
Did you try the scratch builds of bug https://bugzilla.redhat.com/show_bug.cgi?id=737950 ? They should fix the issue.
avr-libc-1.7.1-1.fc15,avr-gcc-4.6.1-3.fc15 has been submitted as an update for Fedora 15.
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).
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.