Google Depot Tools "gclient runhooks" are not running, "SYSTEMROOT" must be valid

I'm trying to work with Chrome and one of the key commands gclient runhooks

fails with an error.

Exception: Environment variable "SYSTEMROOT" required to be set to valid path
Error: Command C:\Users\noahh_000\Noah\Programing\Chrome\Tools\DepotTools\depot_
tools\python276_bin\python.exe src/build/gyp_chromium returned non-zero exit sta
tus 1 in C:\Users\noahh_000\Noah\Programing\Chrome\Chromuim
Hook ''C:\Users\noahh_000\Noah\Programing\Chrome\Tools\DepotTools\depot_tools\py
thon276_bin\python.exe' src/build/gyp_chromium' took 36.86 secs

      

It looks like a bug

Exception: Environment variable "SYSTEMROOT" required to be set to valid path

      

I think this means that the environment variable is SYSTEMROOT

not defined, however when I look at the System Enviroment variables I can see that it is SYSTEMROOT

indeed set

System Environment Vars

I also tried changing it to

  • C: / WINDOWS
  • C: / windows
  • C: \ WINDOWS
  • C: \ Windows
  • C: \ WINDOWS
  • C: \ Windows

but none worked.
When I list the environment variables (c set

) SYSTEMROOT

is defined but notSYSTEMROOT



System information

OS : Windows 8
Architecture x64



Edit: I found where the script is throwing the exception and I made it output the path it thinks it was getting and outputs

The system cannot find the path specified

      



Edit2: It looks like the file that depot_tools\win_toolchain\vs2013_files\win8sdk\bin\SetEnv.cmd

has the error. The python script runs the file in a sub-process and tries to get the result, but the file cannot be found somewhere in that sub-process, so

    The system cannot find the path specified

      

SetEnv.cmd

+3


source to share


1 answer


I am encountering this error after installing VS2015, so I guess the problem comes from system environments. Check and set the GYP_MSVS_VERSION value in 2013 as recommended.

set GYP_MSVS_VERSION=2013

      



You must set GYP_MSVS_VERSION before running gclient routines.

The problem solved for me this way. Hope this helps.

0


source







All Articles