cyborg5 / IRLib2

Library for receiving, decoding, and sending infrared signals using Arduino
GNU General Public License v3.0
384 stars 138 forks source link

"lto1.exe: internal compiler error" during compile #61

Closed MajicDesigns closed 5 years ago

MajicDesigns commented 5 years ago

Environment: Arduino Uno, IDE version 1.8.7, Arduino AVR boards Manager 1.6.23 (latest)

IDE fault error message: 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 exit status 1 Error compiling for board Arduino/Genuino Uno.

Occurs: Compile of my own code and also 'dump' and 'comboDump' example programs

Description: The problem seems to be related to IRDecode. It started with my code when IRDecode was included. In comboDump.ino and combo.ino the problem disappears when the declaration and references to IRDecode are commented out.

MajicDesigns commented 5 years ago

Additional Info: Trying to just use 'send()', if we include all these header files individually

include

include

//#include //#include //#include //#include //#include //#include //#include //#include

include

Then as soon as one of the P?? files is included the same error happens. Decode is nowhere referenced in this version of my code.

per1234 commented 5 years ago

See: https://github.com/arduino/ArduinoCore-avr/issues/39 A workaround is described at the above link.

The problem is specific to the avr-gcc 5.4.0 version so the alternative workaround is to use Boards Manager to roll back to Arduino AVR Boards 1.6.21.

MajicDesigns commented 5 years ago

Rollback to AVR Boards 1.6.21 fixed the issue. Thanks.