Go Down

Topic: Compiler Error when using FastLed (Read 429 times) previous topic - next topic


I am testing hardware in a new project and all was going well until I made some edits in the source (that are unrelated to FastLed).  The error message is shown at the end of this post.  I can get a successful compile again by un-commenting the single line shown below!  Any suggestions, or any other useful information I can post ?

Code: [Select]
  digitalWrite(CONV_4, HIGH);
//  delay(timeDelay);
  digitalWrite(CONV_4, LOW);

Arduino: 1.8.9 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

In file included from C:\Users\Robert\Documents\Arduino\Jerome_Smelter\Jerome_Smelter.ino:3:0:

C:\Users\Robert\Documents\Arduino\libraries\FastLED-3.2.0/FastLED.h:17:21: note: #pragma message: FastLED version 3.002.000

 #    pragma message "FastLED version 3.002.000"


C:\Users\Robert\Documents\Arduino\libraries\FastLED-3.2.0/controller.h: In member function 'clearLeds':

C:\Users\Robert\Documents\Arduino\libraries\FastLED-3.2.0/controller.h:76:82: internal compiler error: Segmentation fault

  virtual void clearLeds(int nLeds) { showColor(CRGB::Black, nLeds, CRGB::Black); }


Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

lto-wrapper.exe: fatal error: C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Nano.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


This bug is specific to the 5.4.0-atmel3.6.1-arduino2 version of avr-gcc used by Arduino AVR Boards 1.6.22 and newer. It has been reported here:

Here's the traditional workaround:
  • Tools > Board > Boards Manager
  • Wait for downloads to finish.
  • When you move the mouse pointer over "Arduino AVR Boards", you will see a "Select version" dropdown menu appear. Select "1.6.21".
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close".

Due to a bug, this workaround doesn't work with Arduino IDE 1.8.6, but it will work with any other version of the Arduino IDE.

If you have File > Preferences > Check for updates on startup checked, the Arduino IDE may occasionally notify you that a new version of Arduino AVR Boards is available, you'll need to refrain from updating back to the new Arduino AVR Boards version, otherwise you'll be back to seeing the segmentation fault error again.


Many thanks for your reply.  That solved my problem.

I had seen previous replies that noted the same issue, but I incorrectly assumed that since they were some time ago, and I had an up to date version, that this could not be the same issue.

Thanks again.


You're welcome. I'm glad to hear it's working now.

Sadly, there has not been a new release of Arduino AVR Boards since the time this bug was discovered. There is a beta tester version of the next release if you're into that sort of thing:

  • (In the Arduino IDE) File > Preferences
  • In the "Additional Boards Manager URLs" field, enter: http://downloads.arduino.cc/packages/package_avr_7.3.0_index.json If you already have an additional Boards Manager URL in that field, you can separate multiple URLs with commas or click the button on the right side of the field to open a dialog that allows you to add each on its own line.
  • Click "OK"
  • Tools > Board > Boards Manager
  • Wait for the downloads to finish
  • Click on "Arduino AVR Boards by Arduino"
  • Click the "Update" button.
  • Wait for the update to finish.
  • Click "Close".

Go Up