Go Down

Topic: avr-g++: no such file or directory (Read 4585 times) previous topic - next topic

BLoverius

May 15, 2018, 11:46 am Last Edit: May 15, 2018, 11:50 am by BLoverius
Hello, no one cares but my name is bruno, I am an engineer student in belgium and I have some troubles using my arduino Uno.

whatever I do, even if my program is correct (I tried with the original "blink" program as well) if I verify my program or if I try to upload it on my arduino (I don't know if "upload" is the right word, english is not my mother tongue, sorry! but whatever, you got it) I get this error message.

fork/exec /Users/brunoloverius/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++: no such file or directory

Erreur de compilation pour la carte Arduino/Genuino Uno


(translate this last line by "compilation error for arduino bla-bla-bla")

apparently, my avr-g++ file is missing. and nothing works. (It actually never worked)

I already tried to reinstall the Arduino.app, but doesn't help.

I'm working on mac High sierra 10.13.4 and with the version 1.8.5 of the arduino app

does anybody here know what I can do?




little note: I'm a real noob with computers... you should know that before helping me! :smiley-sweat:

love you all

pert

Hi Bruno. Welcome!

Try doing this:
  • Tools > Board > Boards Manager
  • Wait for downloads to finish
  • Click on "Arduino AVR Boards"
  • From the dropdown menu select "1.6.20"
  • Click "Install"
  • Wait for installation to finish
  • Click "Close"
  • Try compiling again

BLoverius

Hello pert! thank you for this quick answer!

sadly nothing changed... I still have that error message. I just installer version 1.6.21 of "Arduino AVR Boards"

fork/exec /Users/brunoloverius/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-g++: no such file or directory
Erreur de compilation pour la carte Arduino/Genuino Uno
(translate this last line by "compilation error for arduino bla-bla-bla")

pert

OK, let's try some drastic action. Be aware this is somewhat advanced and will remove any boards you have installed via Boards Manager:
  • Click the link on the line following File > Preferences > More preferences can be edited directly in the file. This will open the /Users/brunoloverius/Library/Arduino15 folder.
  • Delete all files and folders under the Arduino15 folder except for preferences.txt. Please be very careful when deleting things from your computer. When in doubt, back up!
  • Restart the Arduino IDE

Verify that you can now use your board before reinstalling any packages via Boards Manager.

BLoverius

Done! And it kinda worked!

I can now verify my program.
but when I try to upload it to my arduino, I have another message... more like lot of other messages!

something about avrdude.





avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/brunoloverius/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem1411
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/var/folders/4j/jnklqfnx3gn8xgvnvp1vs4q40000gn/T/arduino_build_444240/Blink.ino.hex"
avrdude: writing flash (928 bytes):

Writing | ################################################## | 100% 0.17s

avrdude: 928 bytes of flash written
avrdude: verifying flash memory against /var/folders/4j/jnklqfnx3gn8xgvnvp1vs4q40000gn/T/arduino_build_444240/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/4j/jnklqfnx3gn8xgvnvp1vs4q40000gn/T/arduino_build_444240/Blink.ino.hex:
avrdude: input file /var/folders/4j/jnklqfnx3gn8xgvnvp1vs4q40000gn/T/arduino_build_444240/Blink.ino.hex contains 928 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.13s

avrdude: verifying ...
avrdude: 928 bytes of flash verified

avrdude done.  Thank you.


pert

That's fine. It just means the program was successfully uploaded to your Arduino board. avrdude is the tool used to do that.

BLoverius

whell that's great then!

(I told you it was totally new for me!  :) )

Thank you very much pert and have a nice day!

tribonacci

Thank you for this! I've been trying to find this for weeks whilst using codebender instead.  This is the only method that worked for me on mac with g++ missing file error.

thymjan

Helped me either! I also got stuck when I've installed the new version 1.8.7 and updated the Arduino AVR Boards to 1.6.23 on my mac. By reinstalling version 1.6.20 everything is working fine again. Thank you!

Tedradclyffe

Hi, just a quick thank you to Pert for the solution to the fork/user g++ compile problem.
I hav e no idea why I got into the mess but following the "Drastic Action" did the trick.
Ted

pert

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per

MGonzalez506

This worked for me, but just "1.6.20" version, when I try .21 or .22 version it crash.


Hi Bruno. Welcome!

Try doing this:
  • Tools > Board > Boards Manager
  • Wait for downloads to finish
  • Click on "Arduino AVR Boards"
  • From the dropdown menu select "1.6.20"
  • Click "Install"
  • Wait for installation to finish
  • Click "Close"
  • Try compiling again


pert

This worked for me, but just "1.6.20" version, when I try .21 or .22 version it crash.
Are you using Arduino IDE 1.8.5 still?

DuroHeci

Hey,

had the same issue:

Code: [Select]
avr-g++: error: device-specs/specs-atmega328p: No such file or directory


Problem solved after removing all IDEs on my system (Arduino, Python, Visial Studios).

Restarted and reinstalled Arduino, now it works.

Go Up