Windows 8 SDK issues (help wanted)

2,127 views
Skip to first unread message

Carlos Pizano

unread,
Jun 13, 2012, 8:03:36 PM6/13/12
to chromi...@chromium.org
In the near future we need to switch to the newer windows SDK. Normally this is a non-event, but this time is different. The Windows 8 SDK  [1] does not support old and no-so-old operating systems. Quoting from msdn:

"Supported Operating Systems:
The installation of the Windows SDK is supported on the following operating systems:
Windows 8 Release Preview
Windows Server 2012
Windows 7
Windows Server 2008 R2"

I imagine most of you don't compile chrome on XP so I don't have much regret deprecating XP as a development platform, but some of you might use Vista or Windows Server. If you develop on this platform I highly recommend you (try to) install the Windows 8 and try compiling chrome and report your findings. Ideally you start from a "chrome compiles / runs" state, install the SDK switch [2] Visual Studio to use it and do a clean (clobber) build.

As for what platforms chrome will run once compiled with this new SDK our position has not changed. We have every intention to support XP and Vista.


Samuel

unread,
Jun 13, 2012, 9:29:21 PM6/13/12
to chromi...@chromium.org
MSDN mentioned Windows 8 SDK integerated DirectX SDK. http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx
Shall developper skip the 2010 DirectX SDK installation?  (I am not very sure since looks some .h file isn't shown in windows 8 SDK)
Any insight ot guide?
(BTW, I found the directly install of 2010 DirectX SDK in Windows 8 hit error for missing of .Net 3.5, while .Net 3.5 is mysterious and difficult to instal in win 8)

Carlos Pizano

unread,
Jun 13, 2012, 10:27:10 PM6/13/12
to chromi...@chromium.org
Samuel,


On Wednesday, June 13, 2012 6:29:21 PM UTC-7, Samuel wrote:
MSDN mentioned Windows 8 SDK integerated DirectX SDK. http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx

Yes, the DirectX SDK is another issue we need to cope with.
 

Shall developper skip the 2010 DirectX SDK installation?  (I am not very sure since looks some .h file isn't shown in windows 8 SDK)
Any insight ot guide?

When we switch to the Win8 SDK we would use DirectX from it. I am following with the core GPU people to see what breaks. One issue related to XInput has been identified so far.

Samuel

unread,
Jun 17, 2012, 8:37:50 AM6/17/12
to chromi...@chromium.org

Here is a summary of my finding on utilizing Windows 8 SDK to build chromium windows binary, using VS2010.

 In general, to build with new SDK, issues mainly come from compile time and link time. While for Chromium case, DirectX related issue looks need a standalone category to discuss it.

 So, I tried to divide the major issues into 3 categories:

1) DirectX related issue (bypassed, need systematical way)

2) Compile time issue (4 issues identified)

3) Link time issue (1 issue identified)

 

For 1) DirectX related issues

There are 5 sub-projects depends on DirectX include and lib file, which are chrome,content_browser,content_common,gl,chrome_main_dll. Since d3dx9.h and d3dx9tex.h are missing from Windows 8 SDK, to enable the those 5 sub-projects building pass w/o Microsoft DirectX SDK (June 2010) need systematical way to decouple. XInput usage inside content_browser is located at same category.

So, I tried to add DirectX June 2010 SDK “include” and “lib” path to above 5 sub-projects, which can help to quickly identify the rest compile and link time issue. It is not mean a full solution of decoupling old DX SDK.

 

The rest part is mainly focus on 2) and 3), and the most solutions are not elegant enough, just an initial proven of issue and make build done.

 

Before start, MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\v100\Microsoft.Cpp.Win32.v100.props need to be edited, to make sure new SDK’s path is correctly understood. Here are steps:

i: replace v7.0A(or v7.1 if you already replaced) by v8.0. MSbuild can understand v8.0 since corresponding registry is generated when user install new SDK.

ii: add “$(WindowsSdkDir)\bin\x86” to ExecutablePath

Iii: include files are placed into 2 paths: $(WindowsSdkDir)\Include\shared;$(WindowsSdkDir)\Include\um; add them to IncludePath

iv: add $(WindowsSdkDir)\lib\win8\um\x86; to LibraryPath

 

For 2) compile time error

2.1 : macro “FACILITY_VISUALCPP” is defined in both Microsoft Visual Studio 10.0\VC\include\DelayIMP.h and new windows 8 SDK, so a macro redefinition error is hit.

2.2: in src\base\win\win_util.cc, bracketed content inside #if !defined(_WIN32_WINNT_WIN8) is not effect. Looks -D_WIN32_WINNT_WIN8 is already passed in, and make macro PKEY_AppUserModel_DualMode and PKEY_AppUserModel_DualMode_UK missing

2.3: _THREAD_INFORMATION_CLASS is undocumented at firstly beginning, so Chrome has an internal definition. In windows 8 SDK, _THREAD_INFORMATION_CLASS is exposed, while limited prototype. So a re-definition error is hit. Remark Windows 8 SDK one temporarily bypassed this issue and make build continue. (remark chrome one won’t work, since prototype inside windows 8 SDK is far away from complete)

2.4: Windows 8 SDK renamed IAsyncOperation to IDataObjectAsyncCapability and renamed IID_IAsyncOperation to IID_IDataObjectAsyncCapability. ui/base/dragdrop/os_exchange_data_provider_win.h need corresponding modification

2.5 browser\importer\ie_importer.cc tried to included "pstore.h" to perform IE imported related. While "pstore.h" is removed from windows 8 SDK, so hit error. It might not reasonable to use old pstore to import IE10. I just copied "pstore.h" from SDK 7.1A to make build continue.

 

For 3) link time error.

3.1: “RichEd20.Lib” is removed from Windows 8 SDK, and MSFT ask user to loadlib RichEd20.dll instead of link with lib. To make a quick workaround, I just copied “RichEd20.Lib” from SDK 7.1A to make build continue.

Summary

After solving/bypassing above issue, a chromium binary can be build using windows 8 SDK + VS2010. Precisely speaking, it still used DirectX June 2010 SDK and 2 legacy files from SDK 7.1A. Hope it can be a initial input for further enabling.

 Samuel



On Thursday, June 14, 2012 8:03:36 AM UTC+8, Carlos Pizano wrote:

Alex Pakhunov

unread,
Jun 18, 2012, 2:01:03 AM6/18/12
to samu...@intel.com, chromi...@chromium.org
On Sun, Jun 17, 2012 at 5:37 AM, Samuel <samu...@intel.com> wrote:

Before start, MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets\v100\Microsoft.Cpp.Win32.v100.props need to be edited, to make sure new SDK’s path is correctly understood. Here are steps:


A much cleaner way of controlling MSBuild properties (including adding include and lib directories) is described at the Build instructions for Windows page. See the step where the DirectX directories are added to IncludePath and LibraryPath properties be means of %LOCALAPPDATA%\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props.

--
Alex.

Samuel

unread,
Jun 19, 2012, 3:37:20 AM6/19/12
to chromi...@chromium.org, samu...@intel.com
Hi, Alex:
Thanks for comments on MSBuild! To apply DXSDK_DIR modification to Microsoft.Cpp.Win32.user.props is convenient. I guess it will apply to all the sub-projects of chrome.

Samuel

Hongbo Min

unread,
Jul 19, 2012, 1:54:07 AM7/19/12
to chromi...@chromium.org
I still failed to build chrome with Windows 8 SDK. The errors are raised from compile time:

1>------ Build started: Project: base, Configuration: Debug Win32 ------
1>Build started 7/19/2012 1:51:25 PM.
1>ClCompile:
1>  trace_event_win.cc
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1338): error C2065: 'PropertyArrayCount' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1338): error C3861: '_Out_writes_': identifier not found
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1338): error C2146: syntax error : missing ')' before identifier 'PEVENT_TRACE_PROPERTIES'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1338): warning C4229: anachronism used : modifiers on data are ignored
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1338): error C2491: 'QueryAllTracesW' : definition of dllimport data not allowed
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1341): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1347): error C2065: 'PropertyArrayCount' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1347): error C3861: '_Out_writes_': identifier not found
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1347): error C2146: syntax error : missing ')' before identifier 'PEVENT_TRACE_PROPERTIES'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1347): warning C4229: anachronism used : modifiers on data are ignored
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1347): error C2491: 'QueryAllTracesA' : definition of dllimport data not allowed
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1350): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1469): error C2061: syntax error : identifier '_In_reads_bytes_opt_'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1474): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1474): error C2143: syntax error : missing ')' before ';'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1505): error C2061: syntax error : identifier '_In_reads_bytes_'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1507): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1507): error C2143: syntax error : missing ')' before ';'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1517): error C2061: syntax error : identifier '_Out_writes_bytes_'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1520): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1520): error C2143: syntax error : missing ')' before ';'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1589): error C2061: syntax error : identifier '_In_reads_opt_'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1593): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1593): error C2143: syntax error : missing ')' before ';'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1609): error C2061: syntax error : identifier '_In_reads_opt_'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1613): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1613): error C2143: syntax error : missing ')' before ';'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1620): error C2065: 'PropertyArrayCount' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1620): error C3861: '_Inout_updates_': identifier not found
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1620): error C2146: syntax error : missing ')' before identifier 'PTRACE_GUID_PROPERTIES'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1620): warning C4229: anachronism used : modifiers on data are ignored
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1620): error C2491: 'EnumerateTraceGuids' : definition of dllimport data not allowed
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1623): error C2059: syntax error : ')'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1695): error C2065: 'HandleCount' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1695): error C3861: '_In_reads_': identifier not found
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1695): error C2146: syntax error : missing ')' before identifier 'PTRACEHANDLE'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1695): warning C4229: anachronism used : modifiers on data are ignored
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1695): error C2491: 'ProcessTrace' : definition of dllimport data not allowed
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\evntrace.h(1699): error C2059: syntax error : ')'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.19
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any hints to resolve it? Thanks.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages