exit status 1 - Error compiling for board Arduino/Genuino Mega or Mega 2560

Hey all. I'm no good a programming, let me get that clear up front. I'm a hardware guy, not software.

I'm building a Snappy V3 3D printer, and the firmware for such is prepackaged and supposedly ready to go. However, when I attempt to flash it to my RAMPS 1.4 it gives me the following error:


C:\Users\Parker\Documents\Arduino\libraries\U8glib\src\clib\u8g_rect.c: In function 'u8g_draw_vline.constprop':

C:\Users\Parker\Documents\Arduino\libraries\U8glib\src\clib\u8g_rect.c:75:1: internal compiler error: Segmentation fault

}

^

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\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.15.0_x86__mdqgnx93n4wtt/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 Mega or Mega 2560.

Does anyone know what this means or how I can fix it? Using Arduino 1.8.7 on Win10, board is a Mega 2560 clone with a Robotale RAMPS 1.4A attached.

Link to the firmware that the project dev supplies, it's too big to attach to the post - snappy-reprap/firmware at v3.0 · revarbat/snappy-reprap · GitHub

Thanks!

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 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.

You! Bless you. Thank you so much, it's working perfectly now.

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