getting started - compiling

I'm trying to compile for the first time using a MAC... simply using the BLINK sample program.

I get following message when I push UPLOAD.
(It is long and seemingly repetitive so cut some the middle out)
Anybody know what's going on?

Arduino: 1.6.11 (Mac OS X), Board: "Arduino/Genuino Uno"

/Users/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ar: dlopen(/Users/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/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.

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

I don't know how to fix this correctly but here's the workaround:

  • Tools > Board > Boards Manager > Arduino AVR Boards(click on it) > select "1.6.11" from the "select version" drop down menu" > Install
  • After the installation completes click "Close"

Someone else reported the issue and that fixed it for them.

This is related to a new plugin added in Arduino AVR Boards 1.6.12, that's why installing 1.6.11 will fix it. You will need to avoid upgrading to any Arduino AVR Boards version above 1.6.11 until a real solution for the issue is found.