Compile error on several Arduino IDE issues

Hello All,

I am having a strange issue when compiling now. Never had such problems before ( for some years now ) and can't make the connection to any event that I remember to justify the malfunction.

I use Windows 7 64bit in a I7 computer. I installed the 1.8.13 IDE with the installer and also with the zip. Tried to compile the simplest ino ( default ino in the first time ) and get the following error:


Arduino: 1.8.7 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\arduino-1.8.7\arduino-builder -dump-prefs -logger=machine -hardware C:\arduino-1.8.7\hardware -hardware C:\Users\CALVIN\AppData\Local\Arduino15\packages -tools C:\arduino-1.8.7\tools-builder -tools C:\arduino-1.8.7\hardware\tools\avr -tools C:\Users\CALVIN\AppData\Local\Arduino15\packages -built-in-libraries C:\arduino-1.8.7\libraries -libraries C:\Users\CALVIN\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10807 -build-path C:\Users\CALVIN\AppData\Local\Temp\arduino_build_547448 -warnings=none -build-cache C:\Users\CALVIN\AppData\Local\Temp\arduino_cache_924122 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\CALVIN\AppData\Local\Temp\untitled1201961831.tmp\sketch_mar27a\sketch_mar27a.ino C:\arduino-1.8.7\arduino-builder -compile -logger=machine -hardware C:\arduino-1.8.7\hardware -hardware C:\Users\CALVIN\AppData\Local\Arduino15\packages -tools C:\arduino-1.8.7\tools-builder -tools C:\arduino-1.8.7\hardware\tools\avr -tools C:\Users\CALVIN\AppData\Local\Arduino15\packages -built-in-libraries C:\arduino-1.8.7\libraries -libraries C:\Users\CALVIN\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10807 -build-path C:\Users\CALVIN\AppData\Local\Temp\arduino_build_547448 -warnings=none -build-cache C:\Users\CALVIN\AppData\Local\Temp\arduino_cache_924122 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\CALVIN\AppData\Local\Temp\untitled1201961831.tmp\sketch_mar27a\sketch_mar27a.ino Using board 'mega' from platform in folder: C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3 Using core 'arduino' from platform in folder: C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3 Detecting libraries used... "C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino" "-IC:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\variants\mega" "C:\Users\CALVIN\AppData\Local\Temp\arduino_build_547448\sketch\sketch_mar27a.ino.cpp" -o nul Error while detecting libraries included by C:\Users\CALVIN\AppData\Local\Temp\arduino_build_547448\sketch\sketch_mar27a.ino.cpp Generating function prototypes... "C:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino" "-IC:\Users\CALVIN\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\variants\mega" "C:\Users\CALVIN\AppData\Local\Temp\arduino_build_547448\sketch\sketch_mar27a.ino.cpp" -o "C:\Users\CALVIN\AppData\Local\Temp\arduino_build_547448\preproc\ctags_target_for_gcc_minus_e.cpp" avr-g++: error: device-specs/specs-atmega2560: No such file or directory

exit status 1 Error compiling for board Arduino Mega or Mega 2560.


I tried with older version of the IDE ( 1.8.10 and 1.8.7 ) and the same result. I tried in my doughter laptop and it worked in the first time. She has the Windows 10 but . . . I tried to delete Arduino15 folder and switch off the Antivirus but the result is the same.

I am out of solutions. It seams that the IDE looks for something that

I would apreciate some help

Thanks

You say you have deleted your Arduino15 folder. What messages do you get afterwards? The messages you posted could not possibly have been generated after you deleted your Arduino15 folder, because that error message is coming from the compiler located in that folder (if the folder was deleted, it would instead be using the copy of the toolchain in the IDE's install location) This leads me to suspect that you have not actually deleted that folder... (which I would expect to fix this problem)

I think extracting the .zip to somewhere unencumbered by "protections", and creating a folder named "portable" inside it should also make it work, as this will prevent it from looking at your Arduino15 folder, which I suspect has a corrupt copy of the arduino7 version of the avr-gcc 7.3.0 toolchain

Hi DrAzzy,

Thanks for your reply. Well I add again the compilation log after completly delete the Arduino15 folder and select the verbose check afterwords:


Arduino: 1.8.13 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\arduino-1.8.13\arduino-builder -dump-prefs -logger=machine -hardware C:\arduino-1.8.13\hardware -tools C:\arduino-1.8.13\tools-builder -tools C:\arduino-1.8.13\hardware\tools\avr -built-in-libraries C:\arduino-1.8.13\libraries -libraries C:\Users\CALVIN\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10813 -build-path C:\Users\CALVIN\AppData\Local\Temp\arduino_build_159826 -warnings=default -build-cache C:\Users\CALVIN\AppData\Local\Temp\arduino_cache_153524 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\arduino-1.8.13\hardware\tools\avr -verbose C:\Users\CALVIN\AppData\Local\Temp\untitled1724242415.tmp\sketch_mar29a\sketch_mar29a.ino

C:\arduino-1.8.13\arduino-builder -compile -logger=machine -hardware C:\arduino-1.8.13\hardware -tools C:\arduino-1.8.13\tools-builder -tools C:\arduino-1.8.13\hardware\tools\avr -built-in-libraries C:\arduino-1.8.13\libraries -libraries C:\Users\CALVIN\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10813 -build-path C:\Users\CALVIN\AppData\Local\Temp\arduino_build_159826 -warnings=default -build-cache C:\Users\CALVIN\AppData\Local\Temp\arduino_cache_153524 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\arduino-1.8.13\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\arduino-1.8.13\hardware\tools\avr -verbose C:\Users\CALVIN\AppData\Local\Temp\untitled1724242415.tmp\sketch_mar29a\sketch_mar29a.ino

Using board 'mega' from platform in folder: C:\arduino-1.8.13\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\arduino-1.8.13\hardware\arduino\avr

Detecting libraries used...

"C:\arduino-1.8.13\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\arduino-1.8.13\hardware\arduino\avr\cores\arduino" "-IC:\arduino-1.8.13\hardware\arduino\avr\variants\mega" "C:\Users\CALVIN\AppData\Local\Temp\arduino_build_159826\sketch\sketch_mar29a.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Error while detecting libraries included by C:\Users\CALVIN\AppData\Local\Temp\arduino_build_159826\sketch\sketch_mar29a.ino.cpp

Generating function prototypes...

"C:\arduino-1.8.13\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\arduino-1.8.13\hardware\arduino\avr\cores\arduino" "-IC:\arduino-1.8.13\hardware\arduino\avr\variants\mega" "C:\Users\CALVIN\AppData\Local\Temp\arduino_build_159826\sketch\sketch_mar29a.ino.cpp" -o "C:\Users\CALVIN\AppData\Local\Temp\arduino_build_159826\preproc\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

avr-g++: error: device-specs/specs-atmega2560: No such file or directory

exit status 1

Error compiling for board Arduino Mega or Mega 2560.


The folder is built again and I get the same error.

I already tried to install the Arduino folder in several places in the drive C:\ and in the drive D:\ but the results are the same. I the past I had the Arduino installed in the crive C or D and it always worked ok.

I didn't quite understood your last advice ; to install the Arduino folder samwere in a folder named 'portable' ?

I am really out of ideas

Hi @plagp

Please try the fix explained in this troubleshooting guide under "avr-g++: error: device-specs/specs-...: No such file or directory": https://per1234.github.io/ino-troubleshooting/compiling.html#avr-g-error-device-specsspecs--no-such-file-or-directory

Hi pert,

Thanks but I never had that system variable. It was one solution that I found out of this forum but is not aplicable.

I also tried to find some entry in the register due to some instalation with an installer but I didn't found anything meaninfull. Eventually I miss something.

Thanks

Hello All,

I just found out what the problem was. In the system environment variables I had defined ‘GCC_ROOT’ for the MinGW compiler and that was the problem. Since I never saw any reference to this variable as problematic tried this and solve it.

1 Like