Error compiling for board

Hello folks,

New to arduino, total noob :slight_smile:

I am setting up for the first time and I download the software, my arduino is currently pluged into my laptop.

I tried to execute this code but I get this error when I upload it, any tips to what im doing wrong?

Thanks alot

/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WInterrupts.c.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: hooks.c.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring.c.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_analog.c.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_digital.c.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_pulse.c.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: wiring_shift.c.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: CDC.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial0.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial1.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial2.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: HardwareSerial3.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: IPAddress.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: PluggableUSB.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Print.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Stream.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: Tone.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: USBCore.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WMath.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: WString.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: abi.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: main.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: core/new.cpp.o: plugin needed to handle lto object
/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: /Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so: error loading plugin: dlopen(/Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so, 2): Symbol not found: _environ
  Referenced from: /Users/X80807013378080/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so
  Expected in: /usr/lib/libSystem.B.dylib

collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.

Managed to fix it by downgrading the arduino software to 1.5

A bunch of people have had IDE problems, including IDE crashes and bizarre compile errors, when they install a new version of the IDE. At least some of those problems seem to be caused by incompatible executables and preference files that the IDE saves outside the IDE installation directory. Perhaps that is what is causing your particular problem. In such cases it appears that the fix is to delete or rename the old "Arduino15" directory and re-install the new IDE.

On Mac OS X:
/Users/(username)/Library/Arduino15 (a.k.a. ~/Library/Arduino15)
(Note: The 'Library' folder is greyed out in Finder. The folder can't be opened with a double-click. To browse the contents of 'Library', ctrl-click on it and select "Open in New Tab" from the pop-up menu.)

On Windows delete or rename both:
Arduino IDE 1.6.5r5 and previous: C:\Users(username)\AppData\Roaming\Arduino15
Arduino IDE 1.6.6 and later: C:\Users(username)\AppData\Local\Arduino15

On Linux:
/home/(username)/.arduino15 (a.k.a. ~/.arduino15)
(Note: file/folder names starting with '.' are not normally shown in directory listings. Use 'ls -a' to get a directory listing that includes the hidden files.)

not able to use my arduino uno
it just arrived today after pluging in the green led is on besides 'on'
and no other leds are on
after uploading it is showing this :-

Arduino: 1.8.0 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 928 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x7a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x7a
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

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

Try the following.

  1. Make sure you have selected the right board. To check click on Tools >Board.Make sure Arduino Uno is selected.

2)If that does not work, then check if you are connect to right port by going to Tools>Port. Try to switch to the other Ports and then try uploading again.

Hope that helps!