dev.ed.am
Arduino Makefile
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
bug_report_small.png
icon_project.png Arduino Makefile / Closed Bug report #4 Issues on OS X (preferences.conf, install location, avrdude.conf)
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
icon_info.png This issue has been closed with status "Fixed" and resolution "RESOLVED".
Issue basics
  • Type of issue
    Bug report
  • Targetted for
    0.5 release
  • Status
    Fixed
  • Progress
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Resolution
    RESOLVED
  • Reproducability
    Always
  • Severity
    Not determined
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
Sorry for not separating the issues to different bug reports; I don't know if you'd be willing to push OS X support...

So:
# The preferences.txt file is found as ~/Library/Arduino/preferences.txt on OS X. So the current (rev.72) arduino.mk doesn't find it (so doesn't set SKETCHBOOKDIR and so the user libraries aren't found - that's how I came across this issue).
# The ARDUINODIR variable needs to point to <Location_of_Arduino.app>/Contents/Resources/Java (so not to the install location of Arduino.app) - but this is fixable in individual Makefiles, so not much problem at all. The usual locations for Arduino.app are either /Applications/Arduino.app or ~/Applications/Arduino.app (with the first one being used much more heavily) - so you could add these two into the default list.
# "make upload" does a good (correct) guess for the serial port, but avrdude complains:
avrdude: can't open config file "/usr/local/etc/avrdude.conf": No such file or directory
avrdude: error reading system wide configuration file "/usr/local/etc/avrdude.conf"
I couldn't understand why the Arduino.app-supplied one isn't chosen - the arduino.mk logic seemed to be correct, and I don't really know how to "debug" Makefiles.

Otherwise, the compilation itself went fine (except finding the libraries in the sketchbook directory, as mentioned above). Thanks for this, it's a great idea and good implementation!
Steps to reproduce this issue
-> On OS X <- (tried on Lion, but I can't see how these issues could depend on the version of OS X)

For 1), just "make" with any sketch referencing "local" libraries - the compilation will error out with something like "lcd_meter.ino:10:28: warning: phi_interfaces.h: No such file or directory" (where phi_interfaces.h is found in $SKETCHBOOKDIR/libraries/phi_interfaces/phi_interfaces.h).

For 2), setting ARDUINODIR to <Location_of_Arduino.app> will cause "make" say "*** ARDUINODIR is not set correctly; arduino software not found. Stop.", while setting it to <Location_of_Arduino.app>/Contents/Resources/Java will make "make" run fine.

For 3) "make upload" on any sketch which compiles (ie some which use only standard libraries).
Comments ()
#11
 edam (edam)
Feb 23, 2013
Great! Thanks!

The issue was updated with the following change(s):
  • This issue has been closed
  • The status has been updated, from Being worked on to Closed.
  • This issue's progression has been updated to 100 percent completed.
  • The resolution has been updated, from Not determined to RESOLVED.
#10
 xyzzy (xyzzy)
icon_reply.pngFeb 23, 2013, in reply to comment #9
edam wrote:
OK, I've committed a fix for ARDUINODIR and PREFERENCESFILE default
locations.

I can't reproduce the avrdude.conf issue, though. On the Mac I have access
to test the makefile, I get this:

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude
-C
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf
-DV -p atmega168 -P /dev/null -c arduino -b 19200 -U flash:w:led-test.hex:i
So that looks like it's using the correct config file to me. Is it
possible that this is a problem with your set up?


Well, I tried again (with the latest arduino.mk) and it seems to work! I don't know what the problem was... as you say, most likely something about my setup. The other issues are also fixed. Thanks a lot!
#9
 edam (edam)
icon_reply.pngFeb 20, 2013, in reply to comment #8
xyzzy wrote:
Sorry for the late reply... I failed to notice that you commented :/
No probs. :o)

OK, I've committed a fix for ARDUINODIR and PREFERENCESFILE default locations.

I can't reproduce the avrdude.conf issue, though. On the Mac I have access to test the makefile, I get this:
  /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -DV -p atmega168 -P /dev/null -c arduino -b 19200 -U flash:w:led-test.hex:i
So that looks like it's using the correct config file to me. Is it possible that this is a problem with your set up?
#8
 xyzzy (xyzzy)
icon_reply.pngFeb 19, 2013, in reply to comment #6
edam wrote:
I wondered if I could ask you a quick question, as I know next to nothing
about Macs. I'm a bit concerned about the SKETCHBOOKDIR... Makefiles
(well, make, actually) don't handle spaces in paths well, at all! Is there
a "default" or commonly used location for the Arduino sketchbook directory
on a Mac? And does it have any spaces in it?


Sorry for the late reply... I failed to notice that you commented :/

The default location is $HOME/Arduino, and HOME=/Users/<username>. The <username> is forbidden to have spaces in it (it's just like a linux login name). In this respect OS X behaves like a proper unix/linux, except it uses /Users instead of the traditional /home. So, all in all, no spaces.
#6
 edam (edam)
icon_reply.pngFeb 06, 2013, in reply to comment #2
Hi, thanks for the detailed bug report!

xyzzy wrote:
so doesn't set SKETCHBOOKDIR and so the user libraries aren't found
I wondered if I could ask you a quick question, as I know next to nothing about Macs. I'm a bit concerned about the SKETCHBOOKDIR... Makefiles (well, make, actually) don't handle spaces in paths well, at all! Is there a "default" or commonly used location for the Arduino sketchbook directory on a Mac? And does it have any spaces in it?
#2
 xyzzy (xyzzy)
Jan 27, 2013
I've created an account, so you can contact me if you wish/need.
#1
 Guest user (guest)
Jan 26, 2013
AAah, sorry for the formatting - I guess I overlooked the "wiki-formatting" remark and the result is not what I intended. I can't edit the original report anymore...
History