Pages: [1]   Go Down
Author Topic: Arduino 1.0.3. and MacOSX 10.6.8 and WIRING 1.0  (Read 1137 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have downloaded the Software from Arduino 1.0.3 and had problems loading my UNO it says:


/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=103 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard /var/folders/hR/hRuqpaA42RWKV++1YoGogU+++TI/-Tmp-/build2401262196498263502.tmp/Blink.cpp -o /var/folders/hR/hRuqpaA42RWKV++1YoGogU+++TI/-Tmp-/build2401262196498263502.tmp/Blink.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++: line 5: /../avr-4/bin/g++: No such file or directory
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++: line 5: exec: /../avr-4/bin/g++: cannot execute: No such file or directory
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ hat 126 zurückgegeben

when i use the software from WIRING it works with no problem???

can somebody explain this to me?
« Last Edit: February 07, 2013, 02:18:41 pm by Truegrip » Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Move it to another directory or download it again.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did download it again but still, when i want to upload the scetch "Blink" to my arduino uno, following message comes up


/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++: line 5: /../avr-4/bin/g++: No such file or directory
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++: line 5: exec: /../avr-4/bin/g++: cannot execute: No such file or directory
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ hat 126 zurückgegeben

Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Now try running from a directory different from Applications.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry James, i am not very good at this, what do you want me to do in small steps.
thank you in advance
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Apparently the error is due a to a missing file:

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin/g++

This file is included in the arduino-1.0.3-macosx.zip package, so it seems there was an error when Arduino.app was moved to the /Applications folder. Perhaps you had a previous installation under a different user account and not enough rights to overwrite it. Or maybe there are subtle settings that modify file permissions during a copy or move operation.

You can use the Finder to check whether the file is there, or open the terminal and type:

ls -l /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr-4/bin/

If you see a row like this:

-rwxr-xr-x  1 some-account-name staff 408672 13 Dic  2008 g++

then the file is there, the permissions are ok, and I have no idea why it wouldn't work. If some-account-name is your account then you also have the permissions to overwrite it. So I hope you see something different.

By the way, I think that James's advice can be translated - more or less - into: unzip the arduino package in the same directory where you downloaded it, run it from that directory (without moving it to the Applications folder), then if it works move it somewhere else of your choice.

That is:
1. open the Finder and go to your download directory;
2. double click arduino-1.0.3-macosx.zip; this should create a new Arduino icon (or Arduino2 if you have done it previously - but better delete any previous version);
3. double click the Arduino icon just created, acknowledge the warning and see if it works.

If it does work, you can use the Finder to move the icon somewhere else. If you move it within your home directory you shouldn't have any permission problems, and then you may create a link to that folder into your desktop for easy access. You may also try to move it into the Applications folder, again, but before doing that be sure to manually delete the existing Arduino icon in the Applications folder.
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry James, i am not very good at this, what do you want me to do in small steps.
Step 1:  Move the Arduino icon to another folder.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i can not un-zip the App, because it does it itself and it ends in "download", so i move it into Apps  and i did run the code you send to me, this comes back:


-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher  1085208 13 Dez  2008 ar
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher  1445760 13 Dez  2008 as
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher   408672 13 Dez  2008 c++
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher   408672 13 Dez  2008 cpp
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher   408672 13 Dez  2008 g++
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher   404576 13 Dez  2008 gcc
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher    15956 13 Dez  2008 gccbug
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher    79956 13 Dez  2008 gcov
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher  1822508 13 Dez  2008 ld
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher  1064452 13 Dez  2008 nm
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher  1388288 13 Dez  2008 objcopy
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher  1523416 13 Dez  2008 objdump
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher  1085208 13 Dez  2008 ranlib
-rwxr-xr-x  1 helgefelgendreher  helgefelgendreher  1388288 13 Dez  2008 strip
localhost:~ helgefelgendreher$

Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That looks ok to me... which means I have no idea why it wouldn't work.

I think there may be something wrong with the dirname command (invoked by the compilation script). Try open a terminal:

which dirname
    /usr/bin/dirname

ls -l /usr/bin/dirname
    -r-xr-xr-x  1 root  wheel  50688 27 Gen  2010 /usr/bin/dirname

dirname /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/
    /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr


(dirname chops the last part of the path)
If you get something different, maybe an error, then you may have a problem with the PATH. Another command from the terminal:

echo $PATH

and look if the answer contains something like :/usr/bin:
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is what comes up when i enter the code you have given me.

please notice, i am a newbe with all this, so if i do a mistake, please be patient  smiley-red



Last login: Sun Feb 10 14:28:14 on console
localhost:~ helgefelgendreher$ which dirname
/usr/bin/dirname
localhost:~ helgefelgendreher$     /usr/bin/dirname
localhost:~ helgefelgendreher$ which dirname
/usr/bin/dirname
localhost:~ helgefelgendreher$     /usr/bin/dirname
localhost:~ helgefelgendreher$
localhost:~ helgefelgendreher$ ls -l /usr/bin/dirname
-r-xr-xr-x@ 1 root  wheel  0 18 Mai  2009 /usr/bin/dirname
localhost:~ helgefelgendreher$     -r-xr-xr-x  1 root  wheel  50688 27 Gen  2010 /usr/bin/dirname
-bash: -r-xr-xr-x: command not found
localhost:~ helgefelgendreher$
localhost:~ helgefelgendreher$ dirname /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/
localhost:~ helgefelgendreher$     /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr
-bash: /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr: is a directory
localhost:~ helgefelgendreher$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
localhost:~ helgefelgendreher$
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I should have specified my "typographical conventions" smiley. Leaving out the excess stuff,

you typed: which dirname
and the system responded: /usr/bin/dirname
good

you typed: ls -l /usr/bin/dirname
and the system responded: -r-xr-xr-x@ 1 root  wheel  0 18 Mai  2009 /usr/bin/dirname
not good

The first part of the answer, -r-xr-xr-x@, are the file permissions. The @ sign means there are extended attributes, which is unusual for a system command. Also, it seems to have zero length (the 0 after wheel).

First, let's confirm that dirname doesn't work:

dirname /Applications/Arduino.app

The system should respond with /Applications, but I expect it won't.

ls -l@ /usr/bin/dirname

then

xattr /usr/bin/dirname

I don't know, however, what to expect.

Maybe the original file was replaced by a different one and the system is protecting you agains possible fakes. And maybe there are other system files in the same state. Maybe you should perform a full system check, or restore the OS straight away, but here I'm more a linux than a Mac person and don't know what would be best.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so the first i put in this comes up:

Last login: Sun Feb 10 21:21:04 on ttys000
localhost:~ helgefelgendreher$ dirname /Applications/Arduino.app
localhost:~ helgefelgendreher$

2nd:

Last login: Sun Feb 10 21:25:20 on ttys000
localhost:~ helgefelgendreher$ ls -l@ /usr/bin/dirname
-r-xr-xr-x@ 1 root  wheel  0 18 Mai  2009 /usr/bin/dirname
   com.apple.ResourceFork   6776
   com.apple.decmpfs   16
localhost:~ helgefelgendreher$

3rd:

Last login: Sun Feb 10 21:26:32 on ttys000
localhost:~ helgefelgendreher$ xattr /usr/bin/dirname
localhost:~ helgefelgendreher$

I can not say how much i appreciate your help
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have now version 1.5.2 running and with no USB connected and trying to verify ( compile ) the same error-code comes and when i hit "up-load", the same message comes up

Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Someone had a similar problem, see https://discussions.apple.com/thread/2421479?start=0&tstart=0.

He starts talking of uname, but then produces a long list of files in /usr/bin with the @ attribute and zero length, including dirname.
(If you want to get a similar list, for comparison, just type: ls -l@ /usr/bin).

At least we know it's not a virus: Apple used compression on system files (that's revealed by the com.apple.decmpfs attribute in your 2nd output) and the compressed data were stored in a location outside the original file (revealed by the com.apple.ResourceFork attribute), leaving a zero-length original file. The problem is that the location of the compressed data was probably damaged, but I have no idea where it is and how to repair it.

The author of the post solved the issue by reinstalling the OS. Another possibility would be to install the latest software updates. I notice that your file creation date is the same than his, while I have a more recent (and uncompressed) version.

You may google for decmpfs ResourceFork to look for other possible answers.
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A word of advice: personally I would try to update the system, but if you want to restore the OS try using one of Apple's tools - Migration Assistant, Time Machine - not a backup made with a third-party tool (e.g., an archive made with the tar command). Not all third-party tools understand the extended attributes, they might ignore the compressed data and you might end up in the same situation.
Logged

Pages: [1]   Go Up
Jump to: