Can anyone point me in the right direction to this IRlib2 error?

Hi all… throws this up at compile:

lto1.exe: internal compiler error: in lto_output_varpool_node, at lto-cgraph.c:624
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
Using library IRLib2 in folder: C:\Users\Steve\Documents\Arduino\libraries\IRLib2 (legacy)
Using library IRLibProtocols in folder: C:\Users\Steve\Documents\Arduino\libraries\IRLibProtocols (legacy)
Using library EEPROM at version 2.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM
Using library IRLibRecv in folder: C:\Users\Steve\Documents\Arduino\libraries\IRLibRecv (legacy)
exit status 1
Error compiling for board Arduino Pro or Pro Mini.

Can’t seem to fix it

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: https://github.com/arduino/ArduinoCore-avr/issues/39

A workaround is described in the link above.

Here's a less desirable, but possibly easier alternative 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 alternative 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. The rollback seems to have fixed it

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