gn.py: Could not find gn executable at: F:\code\chromium_git\chromium\src\buildt ools\win\gn.exe

7,343 views
Skip to first unread message

gen

unread,
Oct 12, 2016, 11:26:38 PM10/12/16
to Chromium-dev
1, I am trying to generate sln and build the CEF/Chromium under Windows, but I got the error below. 

gn.py: Could not find gn executable at: F:\code\chromium_git\chromium\src\buildt ools\win\gn.exe


2, I have run the below command correctly.
F:\code\depot_tools>python.bat gsutil.py config

3, I used the below command to debug, but it still failed.
F:\code\chromium_git\chromium\src>F:\\code\\depot_tools\\python276_bin\\python.e
xe F:\\code\\depot_tools\\win_toolchain\\get_toolchain_if_necessary.py --output-
json F:\\code\\chromium_git\\chromium\\src\\build\\win_toolchain.json 95ddda401e
c5678f15eeed01d2bee08fcbc5ee97



Please follow the instructions at https://www.chromium.org/developers/how-tos/bu
ild-instructions-windows

How can I get the gn.exe? 

Brett Wilson

unread,
Oct 12, 2016, 11:42:06 PM10/12/16
to cai...@gmail.com, Chromium-dev
You'll have to ask CEF people. This list is for Chromium development and we don't know how their checkout works.

Brett

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

gen

unread,
Oct 12, 2016, 11:53:33 PM10/12/16
to Chromium-dev, cai...@gmail.com
Thanks Brett.

The CEF uses the chromium checkout flow. 
I also followed the steps in http://dev.chromium.org/developers/how-tos/get-the-code. when i run
gclient runhooks
I got the error same. 
Because the gn.exe doesn't exist under chromium source directory, I can't find a exactly working flow to get the gn.exe.


在 2016年10月13日星期四 UTC+8上午11:42:06,Brett Wilson写道:

yupeng zhang

unread,
Oct 13, 2016, 1:07:50 AM10/13/16
to Chromium-dev
You should run gclient runhooks to download this gn.exe

在 2016年10月13日星期四 UTC+8上午11:26:38,gen写道:

Vaibhav Pithadiya

unread,
Oct 13, 2016, 1:14:51 AM10/13/16
to unive...@gmail.com, Chromium-dev

Do not mail me,
Do not disturb
*****************


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

gen

unread,
Oct 13, 2016, 1:35:46 AM10/13/16
to Chromium-dev
In fact, this error is triggered by 'gclient runhooks'. 
I have checked the script source code. It failed in get_toolchain_if_necessary.py.
Seems that the user should pass the below check. Do you know how to access the ToolchainBucket as a external user?

  if desired_hash not in current_hashes:
    should_use_gs = False
    if (HaveSrcInternalAccess() or
        LooksLikeGoogler() or
        CanAccessToolchainBucket()):
      should_use_gs = True
      if not CanAccessToolchainBucket():
        RequestGsAuthentication()




F:\code\chromium_git\chromium>gclient runhooks

________ running 'F:\code\depot_tools\python276_bin\python.exe src/build/landmin
es.py' in 'F:\code\chromium_git\chromium'



Please follow the instructions at https://www.chromium.org/developers/how-tos/bu
ild-instructions-windows


Traceback (most recent call last):
  File "src/build/landmines.py", line 138, in <module>
    sys.exit(main())
  File "src/build/landmines.py", line 125, in main
    gyp_environment.SetEnvironment()
  File "F:\code\chromium_git\chromium\src\build\gyp_environment.py", line 31, in
 SetEnvironment
    vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
  File "F:\code\chromium_git\chromium\src\build\vs_toolchain.py", line 46, in Se
tEnvironmentAndGetRuntimeDllDirs
    Update()
  File "F:\code\chromium_git\chromium\src\build\vs_toolchain.py", line 367, in U
pdate
    subprocess.check_call(get_toolchain_args)
  File "F:\code\depot_tools\python276_bin\lib\subprocess.py", line 540, in check
_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['F:\\code\\depot_tools\\python276_bin\\
python.exe', 'F:\\code\\depot_tools\\win_toolchain\\get_toolchain_if_necessary.p
y', '--output-json', 'F:\\code\\chromium_git\\chromium\\src\\build\\win_toolchai
n.json', '95ddda401ec5678f15eeed01d2bee08fcbc5ee97']' returned non-zero exit sta
tus 1
Error: Command 'F:\\code\\depot_tools\\python276_bin\\python.exe src/build/landm
ines.py' returned non-zero exit status 1 in F:\code\chromium_git\chromium
Hook ''F:\code\depot_tools\python276_bin\python.exe' src/build/landmines.py' too
k 30.62 secs



在 2016年10月13日星期四 UTC+8下午1:07:50,yupeng zhang写道:

Vaibhav Pithadiya

unread,
Oct 13, 2016, 1:40:36 AM10/13/16
to cai...@gmail.com, Chromium-dev

Stop mailing me.
DO NOT DISTURB


Gen

unread,
Oct 13, 2016, 1:55:38 AM10/13/16
to Chromium-dev, cai...@gmail.com

View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.

Why don't you manually unsubscribe to this group if you aren't using auto-reply?

Scott Graham

unread,
Oct 13, 2016, 11:46:51 AM10/13/16
to cai...@gmail.com, Chromium-dev
You need to actually read the page you linked to for Windows https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md in particular the "Open source contributors".
Reply all
Reply to author
Forward
0 new messages