Go Down

Topic: cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin. exit (Read 2063 times) previous topic - next topic

Caizhenyu

i am a newer arduino ide developer. I meet a problem when i complie the code,any code.Can anyone help me?
```
cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.

exit status 1
```

```
code:

setup()
{}
loop()
{}
```
```
console:
E:\arduino\arduino-builder -dump-prefs -logger=machine -hardware E:\arduino\hardware -tools E:\arduino\tools-builder -tools E:\arduino\hardware\tools\avr -built-in-libraries E:\arduino\libraries -libraries E:\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10612 -build-path C:\Users\myName\AppData\Local\Temp\arduino_build_650628 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=E:\arduino\hardware\tools\avr -verbose C:\Users\myName\Desktop\sketch_oct17a\sketch_oct17a.ino
E:\arduino\arduino-builder -compile -logger=machine -hardware E:\arduino\hardware -tools E:\arduino\tools-builder -tools E:\arduino\hardware\tools\avr -built-in-libraries E:\arduino\libraries -libraries E:\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10612 -build-path C:\Users\myName\AppData\Local\Temp\arduino_build_650628 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=E:\arduino\hardware\tools\avr -verbose C:\Users\myName\Desktop\sketch_oct17a\sketch_oct17a.ino
Using board 'uno' from platform in folder: E:\arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: E:\arduino\hardware\arduino\avr
Detecting libraries used...
"E:\arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IE:\arduino\hardware\arduino\avr\cores\arduino" "-IE:\arduino\hardware\arduino\avr\variants\standard" "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\sketch\sketch_oct17a.ino.cpp" -o "nul"
"E:\arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IE:\arduino\hardware\arduino\avr\cores\arduino" "-IE:\arduino\hardware\arduino\avr\variants\standard" "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\sketch\sketch_oct17a.ino.cpp" -o "nul"
Generating function prototypes...
"E:\arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IE:\arduino\hardware\arduino\avr\cores\arduino" "-IE:\arduino\hardware\arduino\avr\variants\standard" "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\sketch\sketch_oct17a.ino.cpp" -o "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\preproc\ctags_target_for_gcc_minus_e.cpp"
"E:\arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\preproc\ctags_target_for_gcc_minus_e.cpp"
compile...
"E:\arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IE:\arduino\hardware\arduino\avr\cores\arduino" "-IE:\arduino\hardware\arduino\avr\variants\standard" "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\sketch\sketch_oct17a.ino.cpp" -o "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\sketch\sketch_oct17a.ino.cpp.o"
Compiling libraries...
Compiling core...
"E:\arduino\hardware\tools\avr/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IE:\arduino\hardware\arduino\avr\cores\arduino" "-IE:\arduino\hardware\arduino\avr\variants\standard" "E:\arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\core\wiring_pulse.S.o"
"E:\arduino\hardware\tools\avr/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10612 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IE:\arduino\hardware\arduino\avr\cores\arduino" "-IE:\arduino\hardware\arduino\avr\variants\standard" "E:\arduino\hardware\arduino\avr\cores\arduino\WInterrupts.c" -o "C:\Users\myName\AppData\Local\Temp\arduino_build_650628\core\WInterrupts.c.o"
cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.

exit status 1
```

pert

Cross-posted at https://github.com/arduino/arduino-builder/issues/188. Please don't do that. It wastes people's time due to duplicate efforts trying to help you. The arduino-builder repository isn't even the correct repository for that issue report, the Arduino IDE repository would have been the place. Generally you should post an issue first here on the forum to see if we can help you and then if it's determined to be a bug that only the Arduino developers can solve you can create an issue report, often with more information and focus provided by the forum discussion(for example, in this case you would have known which repository to report the issue to). The Arduino developers have many important things to be working on that can really benefit the entire community so it's best if volunteers here on the forum can divert problems from wasting their time dealing with unnecessary or unclear issue reports. If you are going to cross post at least you could have the respect to post links to your other posts.

From your other issue report:
https://github.com/arduino/arduino-builder/issues/186
It appears that something is really screwy with your system. Please provide more information on what you are doing. Is this a standard Arduino IDE installation? If not please explain. What the heck is this:
Quote
for BoardPort Arduino/Genuino Uno complie error.
Does it actually say that in the output? Is that a translation?

pert

From https://github.com/arduino/arduino-builder/issues/186:
Quote
.I use this arduino ide and add my funcation.Now the ide can not compile
What do you mean by "add my funcation"(I assume that was supposed to be "function")? Did you modify the Arduino IDE in some way?

Caizhenyu

i try to develop some new function.So i clone the code from git,and changed some catalog, maybe i lose some floders .

pert

OK, that could be a possible cause of the issue. I don't have experience with building the IDE but it's definitely some useful information to provide with an issue report or forum post.

Just FYI the correct word is folders, not floders. No big deal though, I understood what you meant. I realize that not everyone here is a native English speaker and I'm sure your English is much better than my knowledge of whatever your native language is. The issue is not a missing folder in this case(though it might have been in the ctags issue).

The issue you're having appears to be that the platform.txt you're using is passing the -fno-fat-lto-objects flag to avr-gcc but the version of avr-gcc you're using wasn't compiled with the correct plugin to support that flag. The current stock avr-gcc version that is included with Arduino IDE 1.6.10 and newer/Arduino AVR Boards 1.6.12 and newer does support this flag. So this indicates to me that somehow you ended up using an older avr-gcc version with your IDE build or that you build avr-gcc without that plugin. Where did the avr-gcc you're using come from? You can download the latest Arduino stock Windows build of avr-gcc(4.9.2-atmel3.5.3-arduino2) from:
http://downloads.arduino.cc/tools/avr-gcc-4.9.2-atmel3.5.3-arduino2-i686-mingw32.zip
which does support the -fno-fat-lto-objects flag.

friesandacoke

Can  you help me understand where to put these files you linked to? I am having what seems to be the same error

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

and am going to attempt your fix. TIA.


pert

I am having what seems to be the same error
Please do this:
  • File > Preferences > Show verbose output during: > compilation (check)  > OK
  • Sketch > Verify/Compile
  • After the compilation fails you'll see a button on the right side of the orange bar "Copy error messages". Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the toolbar).

Go Up