title: Error installing Chromium on Windows: assert vc_lib_um_path
body: <p>I'm trying to install Chromium on my Windows machine. I'm closely following the <a href="https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md" rel="nofollow noreferrer">instructions</a> linked to from the Chromium project site. I tried running the command <code>gn gen out/Default</code>, but got the following error message (with some paths anonymized):</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py", line 292, in &lt;module&gt;
      main()
    File "C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py", line 284, in main
      assert vc_lib_um_path
  AssertionError
  ERROR at //build/toolchain/win/BUILD.gn:408:30: Script returned non-zero exit code.
    win_64bit_toolchain_data = exec_script("setup_toolchain.py",
                               ^----------
  Current dir: C:/path/to/chromium/src/out/Default/
  Command: C:/path/to/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py "C:\Program Files (x86)/Microsoft Visual Studio/2017/Enterprise" "C:\Program Files (x86)\Windows Kits\10" "C:\WINDOWS\Sysnative;C:\WINDOWS/SysWOW64" win x64 environment.x64
  Returned 1 and printed out:
  
  vc_bin_dir = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX64\\x64"
  include_flags_I = "\"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\ATLMFC\\include\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\include\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\um\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\winrt\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\cppwinrt\""
  include_flags_imsvc = "\"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\ATLMFC\\include\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\include\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\um\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\winrt\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\cppwinrt\""
  vc_lib_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\lib\\x64"
  vc_lib_atlmfc_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\ATLMFC\\lib\\x64"
  
  See //build/toolchain/win/BUILD.gn:458:1: whence it was called.
  win_64bit_toolchains("x64") {
  ^----------------------------
  See //BUILD.gn:61:1: which caused the file to be included.
  group("gn_all") {
  ^----------------
  Traceback (most recent call last):
    File "C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py", line 292, in &lt;module&gt;
      main()
    File "C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py", line 284, in main
      assert vc_lib_um_path
  AssertionError
  </code></pre>
  
  <p>Looking at the source for setup_toolchain.py (where the error was), I think the problem is on these lines:</p>
  
  <pre><code>for path in env['LIB'].split(';'):
    if os.path.exists(os.path.join(path, 'User32.Lib')):
      vc_lib_um_path = os.path.realpath(path)
      break
  </code></pre>
  
  <p>After adding some print statements, it appears that the loop is checking if the following paths exist:</p>
  
  <pre><code>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64\User32.Lib
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\lib\x64\User32.Lib
  C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64\User32.Lib
  C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64\User32.Lib
  User32.Lib
  </code></pre>
  
  <p>None of these paths do exist. I don't really have a good enough understanding of Windows, Visual Studio, or C to know what User32.Lib means. Is it something that Visual Studio should have added somewhere? Or when I installed the Windows 10 SDK, should a file have been generated somewhere? Is there something I can do to solve this problem?</p>
  
  <p>I'm struggling to figure out what could go wrong and cause this problem, and any help would be greatly appreciated.</p>