Error compiling after updating Boards and Libraries

Hi,

I'm new to Arduino. I started a few weeks ago and wrote some simple projects that I was able to compile and upload to my Arduino Uno. Today I started up the Arduino software and was notified that there were some updates available. One for the boards and one for the libraries. I updated both. Since then I can't compile anything. Even projects that I was able to compile and upload a few hours ago are now unable to compile. I tried installing previous version of the Arduino software and deleted the libraries folders in Documents and in the /User/libraries/Arduino15 folder. Didn't fix it.
Can anyone help me with this? I'm running Arduino 1.6.11 on Mac OS X 10.7.5.

I get the following error (I had to leave out a lot of the error output because of the 9000 character post limit, so here is the beginning and the ending of the error output):

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

/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -built-in-libraries

....

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so: error loading plugin: dlopen(/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../libexec/gcc/avr/4.9.2/liblto_plugin.so, 2): Symbol not found: _environ
Referenced from: /Applications/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.

You should be able to fix this by:

  • Tools > Board > Boards Manager > Arduino AVR Boards(click on it) > select 1.6.11 from the "select version" drop down menu > Install
  • Wait for the installation to complete and then click the "Close" button

As to the actual cause of the issue I don't know. The LTO stuff that's causing the issue was added in Arduino AVR Boards 1.6.12, this is why you need to go back to Arduino AVR Boards 1.6.11 to fix it.

Thanks. Tried it and it worked. :slight_smile: