bejhan
asked on
gyp: Environment variable "SYSTEMROOT" required to be set to valid path
I am attempting to build Chromium from a tarball on Windows.
I've followed most of the build instructions, excluding checking out the code.
However, when I execute gyp to set up my project, the following error occurs: Environment variable "SYSTEMROOT" required to be set to valid path
I've tried using both cmd.exe and the Developer Command Prompt for Visual Studio.
The problem described in this issue seems to match my symptoms but none of the suggestions solved my problem.
I've found a number of other forum threads about this issue but none of the suggestions in those solved my problem either.
I've followed most of the build instructions, excluding checking out the code.
However, when I execute gyp to set up my project, the following error occurs: Environment variable "SYSTEMROOT" required to be set to valid path
python build\gyp_chromium -Dtarget_arch=x64 --toplevel-dir=src/ -depth .
I've tried using both cmd.exe and the Developer Command Prompt for Visual Studio.
The problem described in this issue seems to match my symptoms but none of the suggestions solved my problem.
I've found a number of other forum threads about this issue but none of the suggestions in those solved my problem either.
ASKER
The environment variable does exist though. Both command prompt and the Python console confirm it's value to be "C:\WINDOWS\".
The issue I referenced in my original post suggests that the problem may not be directly related to SYSTEMROOT.
The issue I referenced in my original post suggests that the problem may not be directly related to SYSTEMROOT.
If you copy instead of storytelling the authentic error messages it helps to better understand your problem.
ASKER
Sorry I should've provided more details in my original post.
My Linux team is using the latest stable CentOS Chromium package (version 45.0.2454.85).
I need the same version for my Windows team but I cannot find this exact version on the Windows Chromium snapshots page.
Therefore, I decided to extract the tarball from the CentOS source package and build it on Windows 7.
I performed the following steps in an attempt to build from the tarball:
I installed depot_tools following the steps on this page.
I installed Visual Studio 2015 Community. The build instructions indicate that Visual Studio 2013 Update 4 must be used but I've seen multiple forum posts indicating people have been able to build with Visual Studio 2015. Therefore, I'm assuming that this means that Visual Studio 2013 Update 4 is the lowest supported version.
I installed the Windows 8.1 SDK to the default install location.
I set environment variables:
DEPOT_TOOLS_WIN_TOOLCHAIN= 0
GYP_MSVS_VERSION=2015
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\8.1
I attempted to set up the project by executing gyp:
This is when I get the SYSTEMROOT error:
I also attempted to check out from the Chromium repository and follow the build instructions exactly because I thought it may be specifically a problem with building from tarball but I encountered the same error.
My Linux team is using the latest stable CentOS Chromium package (version 45.0.2454.85).
I need the same version for my Windows team but I cannot find this exact version on the Windows Chromium snapshots page.
Therefore, I decided to extract the tarball from the CentOS source package and build it on Windows 7.
I performed the following steps in an attempt to build from the tarball:
1.
I installed depot_tools following the steps on this page.
2.
I installed Visual Studio 2015 Community. The build instructions indicate that Visual Studio 2013 Update 4 must be used but I've seen multiple forum posts indicating people have been able to build with Visual Studio 2015. Therefore, I'm assuming that this means that Visual Studio 2013 Update 4 is the lowest supported version.
3.
I installed the Windows 8.1 SDK to the default install location.
4.
I set environment variables:
DEPOT_TOOLS_WIN_TOOLCHAIN=
GYP_MSVS_VERSION=2015
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\8.1
5.
I attempted to set up the project by executing gyp:
python build\gyp_chromium -Dtarget_arch=x64 --toplevel-dir=src/ -depth .
This is when I get the SYSTEMROOT error:
C:\Chromium\chromium-45.0.2454.85\src>python build\gyp_chromium -Dtarget_arch=x6
4 --toplevel-dir=src/ --depth .
Updating projects from gyp files...
Traceback (most recent call last):
File "build\gyp_chromium", line 323, in <module>
gyp_rc = gyp.main(args)
File "C:\Chromium\chromium-45.0.2454.85\src\tools\gyp\pylib\gyp\__init__.py",
line 538, in main
return gyp_main(args)
File "C:\Chromium\chromium-45.0.2454.85\src\tools\gyp\pylib\gyp\__init__.py",
line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Chromium\chromium-45.0.2454.85\src\tools\gyp\pylib\gyp\generator\ninj
a.py", line 2384, in GenerateOutput
pool.map(CallGenerateOutputForConfig, arglists)
File "C:\Chromium\depot_tools\python276_bin\lib\multiprocessing\pool.py", line
250, in map
return self.map_async(func, iterable, chunksize).get()
File "C:\Chromium\depot_tools\python276_bin\lib\multiprocessing\pool.py", line
554, in get
raise self._value
Exception: Environment variable "SYSTEMROOT" required to be set to valid path
I also attempted to check out from the Chromium repository and follow the build instructions exactly because I thought it may be specifically a problem with building from tarball but I encountered the same error.
Python 2.7.6 pops up in errors - are you using exactly Python 2.7.6 ?
ASKER
Yes I am.
A lot of forum posts I've read are indicating the "gclient sync" and "gclient runhooks" must be executed to solve this. I do not have a .gclient file in my tarball but I will try this on checked out code to see if it solves the problem there.
C:\Chromium\chromium-45.0.2454.85\src>python --version
Python 2.7.6
A lot of forum posts I've read are indicating the "gclient sync" and "gclient runhooks" must be executed to solve this. I do not have a .gclient file in my tarball but I will try this on checked out code to see if it solves the problem there.
Chromium for windows is called Chrome... It comes with pepper-flash, but rest is same.
ASKER
Chromium is actually the open-source base of Chrome.
I must use Chromium because it is impossible to support a complex web application when your browser version is constantly changing (i.e. Chrome automatically updates). As well, I need the ability to patch bugs in the browser when customers report them since Google is not usually quick enough.
I must use Chromium because it is impossible to support a complex web application when your browser version is constantly changing (i.e. Chrome automatically updates). As well, I need the ability to patch bugs in the browser when customers report them since Google is not usually quick enough.
ASKER
Running "gclient sync" and "gclient runhooks" on the checked out code causes the SYSTEMROOT error, so this is definitely a problem with my environment (rather than problem with the tarball I am trying to build).
I am going to install Visual Studio 2013 Update 4 to see if the problem is Visual Studio 2015, though I suspect this is more so a problem with the depot_tools configuration.
I am going to install Visual Studio 2013 Update 4 to see if the problem is Visual Studio 2015, though I suspect this is more so a problem with the depot_tools configuration.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Only supportable browser version is "latest"
You should probably look into firefox ESX instead for more or less fixed version.
You should probably look into firefox ESX instead for more or less fixed version.
ASKER
Only supportable browser version is "latest"That is true for most web applications, because you do not have control over the web browser your visitors are using.
However, my web application is used in an industrial setting where we have complete control over the client. Therefore, we standardize on a version of Chromium and only allow upgrade once we have tested a newer version and corrected any found issues.
ASKER
I found my own solution.
It is present there for ages and usually is set to C:\WINDOWS\