I cant compile anything!

Hi,
I have a problem with compiling anything in arduino ide... When i start compile a blank project with setup() and draw(), then i get this error... every time ... I try it reinstall to another version or use Visual Micro, but i still get this error ... And i dont know why ...

Before this error (about two weeks), it's working normally, but now its not working anymore :frowning:
Sorry for my bad english :slight_smile:

The error

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: BFD (GNU Binutils) 2.24.51.20140729 assertion fail ../../gdb/bfd/elflink.c:8920

collect2.exe: error: ld returned 1 exit status

exit status 1
Nastala chyba při kompilaci u desky Arduino/Genuino Uno.

Edit#1: I reinstalled from 1.6.13 to 1.8.2 ... now i am getting another error :frowning:

`__vector_16' referenced in section `.vectors' of c:/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr5/crtatmega328p.o: defined in discarded section `.text' of wiring.c.o (symbol from plugin)

c:/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

exit status 1
Nastala chyba při kompilaci u desky Arduino/Genuino Uno.

Thanks for help -_-

Looks like the linker is screwing up the optimizations very badly. I don't believe I've seen that one before.

For sanity check - I would:

uninstall the IDE.

Blow away the Arduino15 folder (C:\Users(username)\AppData\Local\Arduino15 ) - note that AppData may be hidden, so you may need to enable viewing hidden folders.

reinstall 1.8.2 of IDE.

That's the reinstall dance - after that you know you have a clean 1.8.2 installation.

I am afraid, I am seeing the same type of error. I have tried to delete ...AppData\Local\Arduino15
AppData\Local\Temp\arduino*
reinstall, upgrade to new version of distribution and also downgrade, run from windows self-installation package arduino-1.8.7-windows.exe as well as from zip, nothing helps. The whole thing used to work on the same computer (windows 7). I am not sure what caused it to stop (could be using some library)?
It looks like there must be some leftover in disk/registers?
Any help would be greatly appreciated

"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs "C:\Users\tmacek\AppData\Local\Temp\arduino_build_394310\core\core.a" "C:\Users\tmacek\AppData\Local\Temp\arduino_build_394310\core\wiring_shift.c.o"
Archiving built core (caching) in: C:\Users\tmacek\AppData\Local\Temp\arduino_cache_158459\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\tmacek\AppData\Local\Temp\arduino_build_394310/BlinkWithoutDelay.ino.elf" "C:\Users\tmacek\AppData\Local\Temp\arduino_build_394310\sketch\BlinkWithoutDelay.ino.cpp.o" "C:\Users\tmacek\AppData\Local\Temp\arduino_build_394310/core\core.a" "-LC:\Users\tmacek\AppData\Local\Temp\arduino_build_394310" -lm
__vector_16' referenced in section .vectors' of c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o: defined in discarded section `.text' of wiring.c.o (symbol from plugin)

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

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