How can I instruct ninja to not use older version of Windows 10SDK?

869 views
Skip to first unread message

Dib Ghosh

unread,
Aug 12, 2016, 8:02:26 PM8/12/16
to Chromium-dev
Hi,

This is a follow up post of my earlier thread (reply messages kept getting deleted in that thread) with latest Chromium source code build failures here - https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/uNU0LlWsdwM/cdFbYkJICQAJ

@Bruce: Thanks a bunch for your suggestion to run "vcvarsall.bat". Turns out that Windows 10 SDK v10.0.10586.0 was not installed correctly. Now I do see /um, /shared, /winrt etc showing up under C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0. Also I have DEPOT_TOOLS_WIN_TOOLCHAIN=0 set.

I have an older version of Windows 10 SDK (v10.0.10240.0) in my system along with v10.0.10586.0. That's causing a bunch of redefinition errors thrown while executing ninja -C out\Default chrome (partial stack trace given below). I have manually removed 10.0.10240.0 directory from C:\Program Files (x86)\Windows Kits\10\Include\ but ninja still references v10.0.10240.0 headers probably from some temporary file system cache in Chromium.

    [1/23772] CXX obj/base/base/win_util.obj
    FAILED: obj/base/base/win_util.obj
    c:\program files (x86)\windows kits\10\include\10.0.10586.0\ucrt\corecrt.h(128): error C2953: '_CrtEnableIf<true,_Ty>': class template has already been defined
    c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt.h(125): note: see declaration of '_CrtEnableIf<true,_Ty>'
    c:\program files (x86)\windows kits\10\include\10.0.10586.0\ucrt\corecrt.h(455): error C2011: '__crt_locale_data_public': 'struct' type redefinition
    c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt.h(455): note: see declaration of '__crt_locale_data_public'
    c:\program files (x86)\windows kits\10\include\10.0.10586.0\ucrt\corecrt.h(462): error C2011: '__crt_locale_pointers': 'struct' type redefinition
    c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt.h(462): note: see declaration of '__crt_locale_pointers'
    c:\program files (x86)\windows kits\10\include\10.0.10586.0\ucrt\corecrt.h(470): error C2011: '_Mbstatet': 'struct' type redefinition
    c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt.h(470): note: see declaration of '_Mbstatet'
    c:\program files (x86)\windows kits\10\include\10.0.10586.0\ucrt\corecrt_wctype.h(79): error C2059: syntax error: '('
    ....

How can I exclude this older version from being included in ninja build path?

"%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" amd64_x86
set include

Results:

    INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;
    C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt;
    C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;
    C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared;
    C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um;
    C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winrt;

There is NO reference to 10.0.10240.0 as you can see. Apologies if I am missing anything obvious.

Thanks,
-- dib

Scott Graham

unread,
Aug 12, 2016, 8:10:14 PM8/12/16
to dgh...@adobe.com, Chromium-dev
I had this problem when I tried DEPOT_TOOLS_WIN_TOOLCHAIN=0 recently due to .pch. Perhaps try rmdir /s/q out and re-gn to make sure there's no stale pchs around?

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

Dib Ghosh

unread,
Aug 13, 2016, 3:01:25 PM8/13/16
to Chromium-dev, dgh...@adobe.com
Yay that worked! Finally I have my Chromium binary. Thanks a bunch Scott.
Reply all
Reply to author
Forward
0 new messages