Cannot Compile Most Games

Hello,

(I hope I am using this forum correctly. I’m a bit of an idiot, but I have a good heart.)

For the past few months I have unsuccessfully tried every technique I can find to get my Arduboy to compile games such as, Sirène, Mystic Balloon, ‘Ard Drivin’, and a bunch of other Team A.R.G. Games.

• I have installed and re-installed every version of Arduino IDE available.
• I am on Mac OSX 10.7.5
• My Java is up-to-date according to their website.
• I have installed all of the following Arduboy libraries:

ArdBitmap
ArdVoice
Arduboy
Arduboy-TinyFont
Arduboy2
ArduboyPlaytune
ArduboyTones

I know I am doing something wrong. Please advise. Below is a segment of the error message I receive when trying to compile most games (full message is too long to post):

Arduino: 1.8.2 (Mac OS X), Board: “Arduboy”

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/…/lib/gcc/avr/4.9.2/…/…/…/…/avr/bin/ar: 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

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/…/lib/gcc/avr/4.9.2/…/…/…/…/avr/bin/ar: 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

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/…/lib/gcc/avr/4.9.2/…/…/…/…/avr/bin/ar: core/WInterrupts.c.o: plugin needed to handle lto object
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/…/lib/gcc/avr/4.9.2/…/…/…/…/avr/bin/ar: 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

From: https://forum.arduino.cc/index.php?topic=419631.0

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

1 Like

So now if you update Arduino AVR Boards back to the latest 1.6.18 do the errors you were previously getting return?

Yes. Same errors returned.

And with a bit early version? like the one ended with .17?

Yep. Same errors returned with .17

It seems that this is a fairly common problem and it appears that OSX 10.7.5 is a factor.

http://forum.arduino.cc/index.php?topic=436854.msg3010151#msg3010151

By switching to Arduino AVR Boards 1.6.11 you are disabling link time optimization (LTO).

Unfortunately, without the code size reduction that LTO performs, very large sketches like Sirène end up being too large to fit in the available program space. You may be able to compile and load other smaller sketches using AVR Boards 1.6.11

1 Like

Thank you! Hopefully I’ll be able to update my operating software soon.

This is probably a stupid question, but is there any way to load already-compiled-games onto Arduboy with a Mac?

You could probably use avrdude from a terminal command line to upload a compiled .hex file, and you can retrieve .hex files by unzipping .arduboy files.

If you think you might be comfortable trying this, I can provide more details (but I use Linux, not Mac, so they won’t be precise).

I use Terminal for Mac. Would that work for using avrdude?

Yes, Terminal for Mac is what you would use.

1 Like

Then I am willing to give it a shot! Anything to play Mystic Balloon or Sirène! Thank you!

1 Like

A problem I see is that you will need to reset the Arduboy into the bootloader before the avrdude command can be used do an upload. You could use the Arduboy’s reset button to do this but timing can be tricky.

A better way would be to do the reset via USB, like the IDE does. Technically, this is done by opening then closing the port at 1200 baud. With Linux, I can do this simply by issuing the command:
stty 1200 < /dev/ttyACM0
(where /dev/ttyACM0 is the port the Arduboy appears on. It will be different for a Mac.)

An internet search indicates that the stty command may also be available on a Mac, so for a first step could you try just entering stty in a Terminal window? Let me know what it comes back with (either port speed and other information, or an error).

2 Likes

Thank you! I’ll give that a try tomorrow and get back to you. I’m off to work now! :slight_smile:

Work has gotten really busy. I’ll update you in the next few days. Thanks, again!