Go Down

Topic: Defective Mac IDE Install--Problem Solved (Read 1 time) previous topic - next topic


Jun 28, 2012, 07:17 am Last Edit: Jun 30, 2012, 08:44 pm by stefank1 Reason: 1
I'm new to the IDE and was having lots of problems getting a semi-complex sketch to compile. I finally got smart and tried to compile the "blink" sketch. That failed with the error message that there was no such file or director as "Arduino.h" My somewhat feeble understanding is that the IDE inserts this multipurpose header during the build process. I know that these libraries are in the Mac package & I found them inside java/hardware. So I copied the Arduino.h file up into the sketches directory to see what would happen. At that point the error message changed to indicate that a whole bunch of libraries listed in Arduino.h were non-existent. So to continue my experiment, I copied all the core libraries from the Arduino package up into the sketches folder. The IDE ground away for a while and then gave the error message "avr-gcc: core.a: No such file or directory". I'm smart enough to know that this is part of the compiler. Clearly my installation of Arduino 1.01 is hosed. I tried deleting and reinstalling but no improvement. I even tried the Mac equivalent of casting entrails which is repairing permissions. No dice. I'm totally stymied and would appreciate some pointers to repair my IDE. This is a mac pro with 2x quad core xeon processors and 24gb memory running mac 10.7.4. As far as I know all my system software is up to date and functioning correctly.
Best regards,
Thanks for the question about which board was selected in the IDE. I decided that in spite of my reinstallation of the IDE something was still not right. So I reinstalled the IDE yet again. After reinstallation "blink" would compile perfectly with any of the usual arduino boards selected--so the weird problem with system libraries was solved. However, if "lightuino" was selected as the board, the compilation still threw a small number of errors (at least no "arduino.h" errors). That made me suspicious of the entries in the 'boards.txt' file that defines IDE behavior with the various boards. It seems that the IDE has a simple way to add new information to boards.txt that works pretty much like the way custom libraries are imported. Supposedly if one creates a folder named 'hardware' in the primary sketch folder ('/users/stefank1/documents/arduino') on my system and then places the variant board definitions in a folder named to match the board in that folder(~/arduino/hardware/lightuino/boards.txt), the new board shows up on the IDE menu. That is what I did on my initial installation. The alternative method is to actually edit the primary 'boards.txt' file which hides deep in the Arduino app package on a mac. Well, I compared the Lightuino definition that I had added to my 'hardware' folder to the other board definitions in the primary 'boards.txt' file and everything looked exactly correct. I could see absolutely no reason that the board definition was messing up the compiler. So in desperation I actually copied the Lightuino definitions into the primary 'boards.txt' file inside of the Arduino app container. And (of course) I deleted the definition in my added hardware folder. At that point selection of Lightuino as the target board resulted in a perfect compilation without error. I have absolutely no idea why it works if the definition is in the primary 'boards.txt' file and not in the added hardware folder since you get the Lightuino choice on the menu in either case. And since I no longer got any arduino.h error it would seem that the definitions placed in the hardware folder were correctly transferring the 'lightuino5_16.build.core=arduino' definition. But something does not transfer correctly. At this point I don't know why placing definitions in the ~/hardware/lightuino/boards.txt' does not work correctly. But I don't care because editing the primary 'boards.txt' file (while sort of a pain) does work. I either made some sort of stupid error (likely) of else the '~/hardware/lightuino/boards/txt' method has a bug in it (possible).
Best regards,

Nick Gammon

Where did you put it? My 1.0.1 on the Mac works perfectly. You should not need to copy any files anywhere.

Nick Gammon

And what board have you selected in the IDE?


And can you enable verbose output during compilation (in the Preferences dialog) and post the full output here?


Where did you put it? My 1.0.1 on the Mac works perfectly. You should not need to copy any files anywhere.

Hi Nick,



I only use my Mac occasionally for Arduino dev, when I am working on multi CPU networking, etc.

Can You describe where the installation puts the Arduino files? On the PC, I expect to see folders such as drivers, examples, hardware, java, lib, libraries, reference, and tools. Where are these on a Mac?

James C4S

Inside the Application Bundle.

Right-Click on the Arduino Icon and select "Show Package Contents".

You can also cd directly into the bundle from the terminal by using "cd Arduino.app".
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Nick Gammon

Here, in my case:

Code: [Select]

As James C4S says, you can look inside that, it's really a folder.

Open a Terminal window, and do "ls -R" the location of the app (you can drag it from the Finder window to copy the name in), eg.

Code: [Select]
ls -R /Applications/Arduino_1.0.1.app







... and so on ...


Perfect. I needed to add the PString library and now I can.

Seems like the Mac, for being so intuituve, is not so intuitive.

Nick Gammon

You should not modify your core installation however (the Arduino.app).

You install libraries by copying them to the libraries folder in your personal sketch folder. In my case:

Code: [Select]


You should not modify your core installation however (the Arduino.app).
You install libraries by copying them to the libraries folder in your personal sketch folder.

That could make it difficult to maintain two versions of the Ardiono environment.

Nick Gammon

You can have multiple personal sketch folders (Preferences -> Sketchbook Location).

Then you can have different libraries in each one.

Go Up