compilation failed

whenever I am trying to compile the code I am getting following error.Whereas when I am compile the same code on other PC its getting compiled succesfully.


Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\SMARK Work\Documents\Arduino\libraries\Arduino_FreeRTOS-master\src\variantHooks.cpp: In function 'initVariant':

C:\Users\SMARK Work\Documents\Arduino\libraries\Arduino_FreeRTOS-master\src\variantHooks.cpp:84:6: internal compiler error: Segmentation fault

void initVariant(void)

^

libbacktrace could not find executable to open

Please submit a full bug report,

with preprocessed source if appropriate.

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

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

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../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.

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

Hello there!

I would suggest uninstalling the IDE on this computer and reinstalling from a fresh .exe file.

Thanks for replying to question

Initially I had (Arduino 1.8.1) version after facing this error I uninstalled that version and later installed
(Arduino 1.8.5) but still failed to compile with the same error.

Interesting. Since the IDE itself seemingly working properly, there may be a problem with the library file becoming corrupt in some way.

Go to the directory C:\Users\SMARK Work\Documents\Arduino\libraries and delete the Arduino_FreeRTOS-master folder. Then go to the working PC and copy the folder from there and move it to the spot you deleted on the non-working PC

Thank you so much,
It worked...!
you were right the file got corrupt.