Visual Studio Community Edition

675 views
Skip to first unread message

Rouslan Solomakhin

unread,
Dec 18, 2020, 7:25:41 PM12/18/20
to Chromium-dev
TL;DR: Visual Studio Community Edition requires a separate install of Windows SDK.

If you don't compile Chromium on Windows, you can stop reading now.

Hey folks,

I was recently trying to setup a Chromium development environment with Visual Studio 2019 Community Edition and kept encountering the error below, even though I thought that I installed the Windows SDK from the Visual Studio installer according to the setup instructions. It turns out that is not sufficient. I had to download and install the Windows SDK from https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/ separately to satisfy all of the build requirements. I hope this helps someone out there. Happy Holidays!

Cheers,
Rouslan

The error in question:

C:\src\chrome\src>gn gen out/Default
Traceback (most recent call last):
  File "C:/src/chrome/src/build/vs_toolchain.py", line 577, in <module>
    sys.exit(main())
  File "C:/src/chrome/src/build/vs_toolchain.py", line 573, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "C:/src/chrome/src/build/vs_toolchain.py", line 388, in CopyDlls
    _CopyDebugger(target_dir, target_cpu)
  File "C:/src/chrome/src/build/vs_toolchain.py", line 424, in _CopyDebugger
    (debug_file, full_path))
Exception: api-ms-win-downlevel-kernel32-l2-1-0.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\api-ms-win-downlevel-kernel32-l2-1-0.dll"
You must installWindows 10 SDK version 10.0.19041.0 including the "Debugging Tools for Windows" feature.
ERROR at //build/toolchain/win/BUILD.gn:49:3: Script returned non-zero exit code.
  exec_script("../../vs_toolchain.py",
  ^----------
Current dir: C:/src/chrome/src/out/Default/
Command: C:/src/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe C:/src/chrome/src/build/vs_toolchain.py copy_dlls C:/src/chrome/src/out/Default Debug x64
Returned 1.
See //BUILD.gn:67:1: which caused the file to be included.
group("gn_all") {
^----------------
Traceback (most recent call last):
  File "C:/src/chrome/src/build/toolchain/win/setup_toolchain.py", line 304, in <module>
    main()
  File "C:/src/chrome/src/build/toolchain/win/setup_toolchain.py", line 257, in main
    vc_lib_um_path = FindFileInEnvList(env, 'LIB', ';', 'user32.lib')
  File "C:/src/chrome/src/build/toolchain/win/setup_toolchain.py", line 211, in FindFileInEnvList
    file_name, env_name, '\n'.join(parts))
AssertionError: user32.lib is not found in LIB:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64
C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64

Check if it is installed.

Bruce Dawson

unread,
Dec 18, 2020, 8:58:05 PM12/18/20
to Chromium-dev, rouslan.s...@gmail.com
Visual Studio installs some parts of the SDK, but it doesn't install the debugging tools which are needed for running some of the tests. You don't need a separate SDK install, but you do need to modify your existing install. It's easy to miss, but this is the part of the instructions that covers that.

The SDK Debugging Tools must also be installed. If the Windows 10 SDK was installed via the Visual Studio installer, then they can be installed by going to: Control Panel → Programs → Programs and Features → Select the “Windows Software Development Kit” → Change → Change → Check “Debugging Tools For Windows” → Change. Or, you can download the standalone SDK installer and use it to install the Debugging Tools.

Let me know if there is anything we can do to make this clearer. The error message could probably direct developers more directly to that paragraph, perhaps.

Reply all
Reply to author
Forward
0 new messages