Arduino IDE 1.6.10 not compiling anything

Hello to all !

Just got the IDE updated to 1.6.10 and now all my and even the example sketches cannot be compiled with error:

cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.

exit status 1
Error compiling for board Arduino/Genuino Uno.

Anyone else had this and solved ? Please share the solution :slight_smile:

Please do:

  • File > Preferences > Show verbose output during > compilation(check) > OK
  • Sketch > Verify/Compile
  • When compiling fails there will be an orange button "Copy error messages" at the right side of the orange bar. Click that button.
  • Paste the error messages in a message here using code tags(</> button on the toolbar).

it's not the same board but it's look like the same error

Arduino: 1.6.10 (Windows 10), Board: "Sanguino, ATmega644 or ATmega644A (16 MHz)"


"C:\Users\uyoyo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega644 -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_SANGUINO -DARDUINO_ARCH_AVR   "-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\uyoyo\AppData\Local\Arduino15\packages\Sanguino\hardware\avr\1.0.0\variants\sanguino" "C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino\WInterrupts.c" -o "C:\Users\uyoyo\AppData\Local\Temp\build3c98a2f4849cf614a22c0ae94136fdec.tmp\core\WInterrupts.c.o"
cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.

exit status 1
Error compiling for board Sanguino.

Delete the folder C:\Users\uyoyo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc
Restart the Arduino IDE
The problem should now be fixed

This issue is that the latest Arduino AVR core uses a new version of avr-gcc and is incompatible with the previous version. There is a bug with the Arduino IDE that causes installation of Sanguino to install the old compiler version which causes that error. By deleting the old avr-gcc version it forces the Arduino IDE to use the new version that's included with the IDE installation instead.

Solution worked, thank you.

Thank You. This solution worked for me as well

Your problem is completely unrelated - please do not hijack threads, especially not ancient ones.

Unfortunately, I've yet to see someone post a fix for the _environ error on macos.

please help me,the program is not compiling.I downloaded the rc controller program from the internet.

Arduino: 1.5.8 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketch_jan26b.ino:2:0:
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h:22:26: error: 'FILE' has not been declared
int serial_putc( char c, FILE * )
^
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h: In function 'int serial_putc(char, int*)':
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h:24:3: error: 'Serial' was not declared in this scope
Serial.write( c );
^
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h: In function 'void printf_begin()':
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h:31:29: error: 'fdevopen' was not declared in this scope
fdevopen( &serial_putc, 0 );
^
Error compiling.

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

Gokulkasi:
please help me,the program is not compiling.I downloaded the rc controller program from the internet.

Arduino: 1.5.8 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketch_jan26b.ino:2:0:
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h:22:26: error: 'FILE' has not been declared
int serial_putc( char c, FILE * )
^
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h: In function 'int serial_putc(char, int*)':
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h:24:3: error: 'Serial' was not declared in this scope
Serial.write( c );
^
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h: In function 'void printf_begin()':
C:\Users\GOKUL\Documents\Arduino\libraries\RF24-master/printf.h:31:29: error: 'fdevopen' was not declared in this scope
fdevopen( &serial_putc, 0 );
^
Error compiling.

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

That has nothing to do with this topic. Please do not hijack threads.

Also, using Arduino IDE 1.5.8? Really? that is a super outdated beta version. The first thing I would try is updating to the current Arduino IDE 1.8.5.

These lines saved my evening - 1000+1 tanks !

pert:
Delete the folder C:\Users\uyoyo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc
Restart the Arduino IDE
The problem should now be fixed

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per