New issue
Advanced search Search tips

Issue 915036 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 17
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 495204
issue 915046



Sign in to add a comment

The Windows 10.0.17763.0 SDK breaks chrome/win cross builds

Project Member Reported by brucedaw...@chromium.org, Dec 13

Issue description

Switching to a toolchain package that includes the 10.0.17763.0 SDK broke `gn gen` in chrome/win cross builds, see e.g. https://ci.chromium.org/buildbot/chromium.clang/linux-win_cross-rel/4988. The failure is:

This happened when crrev.com/c/1342814 briefly landed.

The error messages are:

clang_use_chrome_plugins = false
dcheck_always_on = true
is_clang = true
is_component_build = true
is_debug = false
llvm_force_head_revision = true
symbol_level = 1
target_os = "win"
""" to /b/c/b/linux_win_cross_rel/src/out/Release/args.gn.

/b/c/b/linux_win_cross_rel/src/buildtools/linux64/gn gen //out/Release --check --runtime-deps-list-file=/b/c/b/linux_win_cross_rel/src/out/Release/runtime_deps
  -> returned 1
ERROR at //build/toolchain/win/BUILD.gn:50:3: Script returned non-zero exit code.
  exec_script("../../vs_toolchain.py",
  ^----------
Current dir: /b/c/b/linux_win_cross_rel/src/out/Release/
Command: python /b/c/b/linux_win_cross_rel/src/build/vs_toolchain.py copy_dlls /b/c/b/linux_win_cross_rel/src/out/Release Release x64
Returned 1 and printed out:

Copying /b/c/b/linux_win_cross_rel/src/third_party/depot_tools/win_toolchain/vs_files/e04af53255fe13c130e9cfde7d9ac861b9fb674a/sys64/msvcp140.dll to /b/c/b/linux_win_cross_rel/src/out/Release/msvcp140.dll...
Copying /b/c/b/linux_win_cross_rel/src/third_party/depot_tools/win_toolchain/vs_files/e04af53255fe13c130e9cfde7d9ac861b9fb674a/sys64/vccorlib140.dll to /b/c/b/linux_win_cross_rel/src/out/Release/vccorlib140.dll...
Copying /b/c/b/linux_win_cross_rel/src/third_party/depot_tools/win_toolchain/vs_files/e04af53255fe13c130e9cfde7d9ac861b9fb674a/sys64/vcruntime140.dll to /b/c/b/linux_win_cross_rel/src/out/Release/vcruntime140.dll...

stderr:

Traceback (most recent call last):
  File "/b/c/b/linux_win_cross_rel/src/build/vs_toolchain.py", line 541, in <module>
    sys.exit(main())
  File "/b/c/b/linux_win_cross_rel/src/build/vs_toolchain.py", line 537, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "/b/c/b/linux_win_cross_rel/src/build/vs_toolchain.py", line 358, in CopyDlls
    _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False)
  File "/b/c/b/linux_win_cross_rel/src/build/vs_toolchain.py", line 333, in _CopyRuntime
    suffix)
  File "/b/c/b/linux_win_cross_rel/src/build/vs_toolchain.py", line 227, in _CopyUCRTRuntime
    assert len(ucrt_files) > 0
AssertionError

 
At a high level this bug is known and familiar - so familiar that I hit it on Windows and already fixed it. The problem is that the location of the UCRT redist directory has changed. It used to be:

%toolchain%\win_sdk\Redist\ucrt\DLLs

and with 10.0.17763.0 it changed to:

win_sdk\Redist\10.0.17763.0\ucrt\DLLs

I modified three scripts to handle this. In particular, build\vs_toolchain.py already has logic to look in both of these places, added in crrev.com/c/1347043. The line number of the assert indicates that the change is in place, but somehow the search logic failed on Linux. Investigating...

Blocking: 495204
Blocking: 915046
I think I know what went wrong. The glob code that is supposed to find the new redist DLL used r'\10.*' but that only works on Linux. It needs to use '/10.*'. But, I have no way to test this. Can you try this CL to see if it fixes the error (or tell me how I can run a chrome/win cross build on a try machine):

https://chromium-review.googlesource.com/c/chromium/src/+/1377510

The change includes both the hash change and the \ -> / change, but the \ -> / change will be landed first (https://chromium-review.googlesource.com/1377503) - but testing it on its own is meaningless since the glob isn't needed on build machines until the new toolchain lands.

I was able to build base_unittests.exe on my Linux box with https://chromium-review.googlesource.com/c/chromium/src/+/1377510/ patched in. (I re-ran `gclient runhooks`.)
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0778ef57fb5d7b77897bb321e0fe1451ae742d62

commit 0778ef57fb5d7b77897bb321e0fe1451ae742d62
Author: Bruce Dawson <brucedawson@chromium.org>
Date: Mon Dec 17 21:12:49 2018

Fix redist glob to work on Linux

Recent Windows 10 SDKs store the UCRT redist files in a different
directory so a change was landed to scan for the right directory to
handle old and new. However the glob call used a backslash and therefore
fails on Linux. This fixes that by using os.path.join.

Bug:  915036 
Change-Id: I7f71b0e9300ac33964a05881525a5eba52203859
Reviewed-on: https://chromium-review.googlesource.com/c/1377503
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617227}
[modify] https://crrev.com/0778ef57fb5d7b77897bb321e0fe1451ae742d62/build/vs_toolchain.py
[modify] https://crrev.com/0778ef57fb5d7b77897bb321e0fe1451ae742d62/build/win/copy_cdb_to_output.py

Status: Fixed (was: Started)

Sign in to add a comment