Bug 195937 - WebKit failed to build due to error C2220 and warning C4245 on windows with MSVC
Summary: WebKit failed to build due to error C2220 and warning C4245 on windows with MSVC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Windows 10
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-19 01:19 PDT by QuellaZhang
Modified: 2020-07-31 13:04 PDT (History)
5 users (show)

See Also:


Attachments
log_x86_build (1.44 MB, text/plain)
2019-03-19 01:19 PDT, QuellaZhang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description QuellaZhang 2019-03-19 01:19:29 PDT
Created attachment 365135 [details]
log_x86_build

Environment:
VS 2017 + Windows Server 2016

Issue description:
We tried to build WebKit using VS2017 on Windows Server 2016. WebKit failed to build with error error C2220:static constexpr uint32_t s_refCountMask = ~0x1 and warning C4245:'initializing': conversion from 'int' to 'const uint32_t' on windows with MSVC.It should be source issue.Could you please help take a look at this? Thanks in advance!


Repro steps:
1. git clone https://github.com/WebKit/webkit d:\WebKit\src
2. open a VS 2017 x86 command prompt as admin and browse to D:\Webkit
3. extra WebKitSupportLibrary\win to D:\WebKit\src\WebKitLibraries\win
4. extra WebKitAuxiliaryLibrary\win to D:\WebKit\src\WebKitLibraries\win
5. set path=C:\gnuwin32\bin;%path%
6. cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DCMAKE_BUILD_TYPE=Release -DRUBY_LIBRARY=C:\Ruby25-x64\lib -DPORT="AppleWin" ..\src
7. msbuild /p:Configuration=Release;Platform=Win32 WebKit.sln /t:Rebuild

Actual result:
D:\WebKit\src\Source\WebCore\dom\Node.h(622,52): error C2220:  warning treated as error - no 'object' file generated
D:\WebKit\src\Source\WebCore\dom\Node.h(622,52): error C2220:  static constexpr uint32_t s_refCountMask = ~0x1;
D:\WebKit\src\Source\WebCore\dom\Node.h(622,52): error C2220:  ^ (compiling source file D:\WebKit\src\Source\WebCore\html\track\InbandGenericTextTrack.cpp)
warning C4245:'initializing': conversion from 'int' to 'const uint32_t', signed/unsigned mismatch
warning C4245:static constexpr uint32_t s_refCountMask = ~0x1;
warning C4245:^ (compiling source file D:\WebKit\src\Source\WebCore\html\track\InbandGenericTextTrack.cpp)
Comment 1 Fujii Hironori 2019-03-19 19:32:17 PDT
I guess this issue was fixed in https://trac.webkit.org/changeset/243122
Comment 2 Don Olmstead 2019-03-21 09:05:14 PDT
QuellaZhang can you verify this is fixed? WinCairo has started moving to VS2019 since it has the fixed our builds. If so we can close this.
Comment 3 Radar WebKit Bug Importer 2020-07-31 13:04:17 PDT
<rdar://problem/66394908>