RESOLVED Compile error after update

I am using the 1.8.9 version of arduino. I was compiling the Marlin firmware for my 3D printer and everything worked great. During this time, I got a notice that 2 updates were available, so I chose to install them, BIG MISTAKE. Right after that, I could no longer build the Marlin firmware!

Unfortunately, I did not note what those two updates were so I can't figure out what to back out.
Here is the error I am getting when I try to build the Marlin firmware after those updates:

exec: "C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++": file does not exist
Error compiling for board Arduino/Genuino Mega or Mega 2560.

Thoughts?

Be aware this is somewhat advanced and will remove any boards you have installed via Boards Manager:

  • In the Arduino IDE, click the link on the line following File > Preferences > More preferences can be edited directly in the file. This will open the C:\Users\Mike\AppData\Local\Arduino15 (or similar name depending on OS) folder.
  • Delete all files and folders under the Arduino15/packages/arduino folder. Please be very careful when deleting things from your computer. When in doubt, back up!
  • Restart the Arduino IDE

Verify that you can now compile Marlin before reinstalling any packages via Boards Manager

This results in a long list of errors:

I cut all folder & files from
C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\

I have copied them back into the folder and am back to the original problem.

Thoughts?

You forgot to post the errors.

Sorry
sketch\ultralcd.cpp: In function 'menu_action_setting_edit_callback_int3.constprop':

sketch\ultralcd.cpp:4851:3: internal compiler error: Segmentation fault

DEFINE_MENU_EDIT_TYPE(int16_t, int3, itostr3, 1);

^

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

Multiple libraries were found for "LiquidCrystal.h"
Used: C:\Users\Mike\Documents\Arduino\libraries\LiquidCrystal
Not used: C:\Users\Mike\Documents\Arduino\libraries\NewliquidCrystal
Not used: C:\Program Files (x86)\Arduino\libraries\LiquidCrystal
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

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

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.

Yes, installing version "1.6.21" fixed it.

Thanks Pert

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