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
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.
Hi, Did you try the fix given in the comments there ? https://bugzilla.redhat.com/show_bug.cgi?id=737950 Thanks,
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.
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
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.
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. https://admin.fedoraproject.org/updates/avr-libc-1.7.1-1.fc15,avr-gcc-4.6.1-3.fc15
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).
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.