Error when building on windows

1,449 views
Skip to first unread message

Ofek Shilon

unread,
Nov 15, 2017, 3:19:48 AM11/15/17
to Chromium-dev
Hi.  I try to generate a solution for VS, and am getting this:
----------------------------------
$ gn gen --ide=vs out\Default
Traceback (most recent call last):
  File "C:/Chromium/src/build/vs_toolchain.py", line 493, in <module>
    sys.exit(main())
  File "C:/Chromium/src/build/vs_toolchain.py", line 489, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "C:/Chromium/src/build/vs_toolchain.py", line 316, in CopyDlls
    _CopyDebugger(target_dir, target_cpu)
  File "C:/Chromium/src/build/vs_toolchain.py", line 347, in _CopyDebugger
    ' 10 SDK.' % (debug_file, full_path))
Exception: dbghelp.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll"
You must install the "Debugging Tools for Windows" feature from the Windows 10 SDK.
ERROR at //build/toolchain/win/BUILD.gn:43:3: Script returned non-zero exit code.
  exec_script("../../vs_toolchain.py",
  ^----------
Current dir: C:/Chromium/src/outDefault/
Command: C:/Chromium/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe -- C:/Chromium/src/build/vs_toolchain.py copy_dlls C:/Chromium/src/outDefault Debug x64
Returned 1.
See //BUILD.gn:69:1: which caused the file to be included.
---------------------------------------------------------------

I have VS2017 fully installed with the latest Win10SDK - in fact, winsdk standalone installer refuses to run since it detects that all components are installed. 
It seems the scripts search for the Win10 sdk at a non-vs2017-compatible location. Am I missing something? Perhaps this location can be controlled?  (via an environment variable or otherwise?)

Thanks
-Ofek

bruce...@chromium.org

unread,
Nov 15, 2017, 8:41:30 PM11/15/17
to Chromium-dev
It looks like the SDK installer is less friendly than it used to be. It used to be that if you installed the latest VS you could then run the SDK installer to change what portions of the SDK are installed. I'm not sure when that broke.

The fix is to go to the Windows "Apps and Features" or "Add or remove programs" settings app and find the SDK that VS installed. You can then select it, click Modify, click Change, then click Next, and then select the "Debugging Tools for Windows" feature.

There is another wrinkle which is that, due to bugs in the 10.0.16299.15 SDK it is not possible to build Chromium with it. So, depending on when you installed VS 2017 you might have to download the previous Windows 10 SDK from here:


The instructions are supposed to cover all of this here:

https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#Visual-Studio

However it is difficult to keep up with the status of the SDK bugs. In particular, the instructions don't mention that the 10.0.16299 SDK doesn't work - I think I was hoping that it would get fixed quickly enough. It is fine to have the 10.0.16299 SDK installed, but you have to also have the previous SDK (10.0.15063 - Creators Update) installed.
Reply all
Reply to author
Forward
0 new messages