Mac OS X Arduino 0017 pathname bug !!!

The new v.0017 of Arduino on the Mac (OS X, Snow Leopard is my environment) seems to require that the pathname to the app has no spaces in it or it errors out when uploading code with the following (in this example, the application is in /Applications/Misc. Apps/arduino):

[quote]usage: dirname path

usage: dirname path

/Applications/Misc. Apps/arduino/ line 5: /../avr-4/bin/gcc: No such file or directory

/Applications/Misc. Apps/arduino/ line 5: exec: /../avr-4/bin/gcc: cannot execute: No such file or directory

/Applications/Misc. Apps/arduino/ returned 126[/quote]

Changing the folder’s name from “Misc. Apps” to “Misc.Apps” (without the space) fixes the problem, but that seems like a pretty lame workaround. This problem did not exist under version 0016, btw.

Anyone have any ideas (other than “well, just don’t use spaces.”)


Anyone have any ideas (other than “well, just don’t use spaces.”)

What’s wrong with that answer? It’s Microsoft’s answer to any problem that occurs because of spaces in names.

I think this has been fixed and will be in the upcoming Arduino 0018 release. You can test the release candidate:

@PaulS: lol! Indeed it is Microsoft's reply for most problems. This is just one of many reasons that I like using a Mac ;), but even it--given its Unix underpinnings--is often prone to the spaces-in-pathnames problems if they're not escaped properly.

@mellis: thanks! I'll d/l it tonight and give it a whirl.

It's good when a piece of software is fixed to deal with this kind of problem. It's annoying to be limited in how you name things, and it's sometimes difficult to diagnose the actual problem. (Good for you, you nailed it here.)

However, when it comes to software development tools, they're all built from components that were designed to be used individually from the command line (DOS Box, Terminal window, bash shell, etc.). The reason they break with spaces in filenames and spaces in directory names is because commands are generally broken into arguments separated by spaces. This is true on the command lines of Unix, DOS, Linux, OS X, VMS, and most other operating systems.

If you're going to be using tools of this variety, sometimes it's best to just accept this arrangement, and avoid directories and filenames with spaces in them. All-GUI programs may not suffer the same limitations. As you work with tools one step closer to the hardware (and Arduino is a lot closer to the hardware, obviously), you should become familiar with the way the tools are implemented.

@halley: I use tools of this variety all the time. Many niche apps, especially UNIX-based ones, are like this, as I mentioned. And thanks, but I'm quite familiar how command-line parameters are handled... or I doubt I would've recognized the bug and its workaround.

OTOH, I would respectfully disagree that "it's best to just accept this arrangement." Were everyone to think this way, there'd be no GUI and we'd still all be trying to remember that Shift-F7 prints. Or even better, we'd be recalling cryptic VMS commands like "@sys$manager:tcpip$config" from my 11/780 days. ;-) Ah, good times...

faceman, fair enough. With only 6 posts here, I can't know how knowledgeable you are about such things, and I also post general advice for folks who aren't so knowledgeable. I agree that things should get fixed where possible, but I still advise new developers to accept that by their very nature, developers' tools will be more raw than banker's applications.

@halley: You're quite right. And, hey, I can't complain too much when I didn't pay a dime for it either!

All the best, my friend.