Cannot run avr-g++?

Hello,
I just installed IDE 1.6.10 on a new PC running Windows 7 64 bit. Tried to verify empty (template) sketch and got:

Cannot run program "{runtime.tools.avr-gcc.path}\bin\avr-g++" (in directory "."): CreateProcess error=2, The system cannot find the file specified

Quick googling suggested to try doing the same from another account. So I created new account with the same administrative privileges and template (and the sketch I'm currently developing) were verified and uploaded fine.

Despite the successful circumvention of the problem I'm curious why this happened and how to avoid these surprises in the future? This might be interesting for other newbies.

Regards,
Yuri

Try with 1.6.5

A bunch of people have had IDE 1.6.x problems, including IDE crashes and bizarre compile errors, when they had a previous 1.5.x/1.6.x installation. At least some of those problems seem to be caused by out-of-date executables that the IDE saves outside the IDE installation directory. Perhaps that is what is causing your particular problem. In such cases it appears that the fix is to delete or rename the old "Arduino15" directory and re-install 1.6.x.

On Mac OS X:
/Users/(username)/Library/Arduino15

On Windows delete or rename both:
Arduino IDE 1.6.5r5 and previous: C:\Users(username)\AppData\Roaming\Arduino15
Arduino IDE 1.6.6 and later: C:\Users(username)\AppData\Local\Arduino15

On Linux:
/home/(username)/.arduino15 (a.k.a. ~/.arduino15)

Thanks for the responses.
I did try to uninstall 1.6.10 and install 1.6.5. No good. Same behavior
@johnwasser: which executables are stored outside of installation directories? avr-g++ is definitely within.

Thanks again,
Yuri

YuriRzhanov:
avr-g++ is definitely within.

Not necessarily. It is included with the Arduino IDE but may also be installed under the arduino15 folder if you install a board via Boards Manager that specifies a different version from the included one. This would happen if you installed Arduino AVR Boards 1.6.12 with Arduino IDE 1.6.5 but could also happen if you installed a 3rd party platform in Arduino IDE 1.6.10. If something went wrong with that installation it could cause your issue. That's why you should be sure to fully uninstall by deleting the arduino15 folder as johnwasser suggested before you reinstall Arduino IDE.

pert:
Not necessarily.

Sure. However, I'm certain because the global search shows existence of the only instance in hardware/tools/avr/bin. I did not use Boards Manager. At first I've installed 1.6.10 and when it failed to find avr-g++, I completely uninstalled it, and installed 1.6.5 which I had before on another computer.

The only suspicion I have is that I installed 1.6.5 in C:/Program Files/Arduino-1.6.5. Could it be that location of the executable does not allow it to run in directory "."? On the other hand, why it is not a problem for another account?

YuriRzhanov:
the global search shows existence of the only instance in hardware/tools/avr/bin.

My guess is that "hardware/tools/avr/bin" is not the same as ".{runtime.tools.avr-gcc.path}\bin". I further suspect that 'runtime.tools.avr-gcc.path' was a variable that was supposed to be defined somewhere and used somewhere else. I suspect that one of those two places is in Arduino15 and that a mismatch is causing the failure.
Just re-name Arduino15 and re-install the IDE. If that doesn't help you can always name it back.

Should "{runtime.tools.avr-gcc.path}" not be set at the installation time? I don't have Arduino15 folder at all, and I couldn't find and other "bin" where avr-g++ might be hiding... Still very much confused...

Here's an explanation of how that property is set Redirecting to Google Groups

Paul Stoffregen ha scritto il 18/09/2015 alle 15:25:
I can't seem to get {runtime.ide.path} to work at all in the new
builder. I do need some way to construct a {compiler.path} that is the
location where I install my customized toolchain.....

There are two ways

First one (preferred) is to create a folder structure such as
"tools > name of tool > version of tool > every other file"

This is what boards manager does. For example

tools/bossac/1.6-arduino

This will create runtime.tools.bossac.path and runtime.tools.bossac-1.6.path

Second one is to put a builtin_tools_versions.txt file where your tools
are installed. That's what the IDE you download does, because it bundles
the AVR toolchain
You can find that file in IDE/hardware/tools/avr/

What Federico Fissore didn't mention(possibly because the behavior has changed since the time of that thread) is there is also a connection to the JSON files used for Boards Manager(the property is only generated for tools listed in the json file entry for an installed platform). In this case it's probably the package_index.json file which contains the entry for the Arduino AVR Boards platform. That file should be located in the Arduino15 folder you say doesn't exist(unless you are using the Arduino IDE in portable mode by creating a folder named portable inside the Arduino IDE installation folder in which case it would be located in that folder). You can find the location of your Arduino15 folder at File > Preferences > More preferences can be edited directly in the file. Have a look in that folder to make sure that indeed it does exist and that it contains a file named package_index.json.