Pages: [1]   Go Down
Author Topic: Mac OS X Arduino 0017 pathname bug !!!  (Read 898 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc: line 5: /../avr-4/bin/gcc: No such file or directory

/Applications/Misc. Apps/arduino/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc: line 5: exec: /../avr-4/bin/gcc: cannot execute: No such file or directory

/Applications/Misc. Apps/arduino/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc returned 126
[/pre]

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.")

--Faceman
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49077
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think this has been fixed and will be in the upcoming Arduino 0018 release.  You can test the release candidate: http://arduino.googlecode.com/files/arduino-0018-rc1.dmg
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@PaulS: lol! Indeed it is Microsoft's reply for most problems. This is just one of many reasons that I like using a Mac smiley-wink, 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.
Logged

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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...

Logged

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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.
Logged

Pages: [1]   Go Up
Jump to: