Bug 238987 - [AppleWin] WebKit Windows port failed to build due to error C1083 and fatal error LNK1181 on windows with MSVC
Summary: [AppleWin] WebKit Windows port failed to build due to error C1083 and fatal e...
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:
Depends on:
Blocks:
 
Reported: 2022-04-08 01:33 PDT by April
Modified: 2022-04-11 20:37 PDT (History)
1 user (show)

See Also:


Attachments
error.log (113.92 KB, text/plain)
2022-04-08 01:33 PDT, April
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description April 2022-04-08 01:33:39 PDT
Created attachment 457028 [details]
error.log

Issue description:
We tried to build WebKit using VS2019 on Windows Server 2016. WebKit AppleWin port failed to build due to ("PlatformImageCG.cpp(29,10): error C1083" and "CoreFoundation.lib : error LNK1181") on windows with MSVC. It can be reproduced on master branch latest commit https://github.com/WebKit/WebKit/commit/623fee9. Could you please help take a look at this? Thanks in advance!

Repro steps:
1. git clone https://github.com/WebKit/webkit F:\WebKit
2. open a VS 2019 x64 command prompt as admin and browse to F:\WebKit
3. download latest WebKitAuxiliaryLibrary.zip from 
   https://github.com/WebKitForWindows/WebKitRequirements/releases/download/v2022.03.05/WebKitRequirementsWin64.zip and unzip to F:\tools\WebKit
4. download latest WebKitAuxiliaryLibrary.zip from https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip and unzip to 
   F:\tools\WebKit
5. download latest WebKitSupportLibrary.zip from https://developer.apple.com/opensource/internet/webkit_sptlib_agree.html and unzip to 
   F:\tools\WebKit
6. git -C "F:\webkit" reset --hard 623fee9
7. set path=F:\tools\WebKit\tools;%path%
8. xcopy F:\tools\WebKit\WebKitRequirementsWin64 F:\WebKit\WebKitLibraries\win /k/r/e/i/s/c/h/f/y
9. xcopy F:\tools\WebKit\WebKitAuxiliaryLibrary\win F:\WebKit\WebKitLibraries\win /k/r/e/i/s/c/h/f/y
10. xcopy F:\tools\WebKit\WebKitSupportLibrary\win F:\WebKit\WebKitLibraries\win /k/r/e/i/s/c/h/f/y
11. set _CL_=/Zc:lambda
12. mkdir build_amd64_AppleWin
13. cd F:\WebKit\build_amd64_AppleWin
14. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release -DRUBY_LIBRARY=C:\tools\ruby26\lib - 
    DPORT="AppleWin" .. 2>&1
15. msbuild /p:Platform=x64 /p:Configuration=Release WebKit.sln /t:Rebuild 2>&1

Actual result:
LINK : fatal error LNK1181: cannot open input file 'CoreFoundation.lib' [F:\Webkit\build_amd64_AppleWin\Source\WTF\wtf\WTF.vcxproj]
Done Building Project "F:\Webkit\build_amd64_AppleWin\Source\WTF\wtf\WTF.vcxproj" (Rebuild target(s)) -- FAILED.
Done Building Project "F:\Webkit\build_amd64_AppleWin\Source\WTF\wtf\WTF.vcxproj.metaproj" (Rebuild target(s)) -- FAILED.
F:\Webkit\Tools\ImageDiff\cg\PlatformImageCG.cpp(29,10): fatal error C1083: Cannot open include file: 'CoreGraphics/CGBitmapContext.h': No such file or directory (d:\a01\_work\2\s\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:1972) [F:\Webkit\build_amd64_AppleWin\Tools\ImageDiff\ImageDiffLib.vcxproj]
Done Building Project "F:\Webkit\build_amd64_AppleWin\Tools\ImageDiff\ImageDiffLib.vcxproj" (Rebuild target(s)) -- FAILED.
Done Building Project "F:\Webkit\build_amd64_AppleWin\Tools\ImageDiff\ImageDiffLib.vcxproj.metaproj" (Rebuild target(s)) -- FAILED.
Done Building Project "F:\Webkit\build_amd64_AppleWin\Tools\ImageDiff\ImageDiff.vcxproj.metaproj" (Rebuild target(s)) -- FAILED.
Comment 1 Fujii Hironori 2022-04-08 13:05:55 PDT
Thank you very much for reporting a bug.
I'm assuming you want to build AppleWin port, not WinCairo port.

(In reply to April from comment #0)
> It
> can be reproduced on master branch latest commit
> https://github.com/WebKit/WebKit/commit/623fee9. 

249366@main was successfully built on Buildbot.
https://build.webkit.org/#/builders/67/builds/10983


Could you please help take
> 3. download latest WebKitAuxiliaryLibrary.zip from 
>   
> https://github.com/WebKitForWindows/WebKitRequirements/releases/download/
> v2022.03.05/WebKitRequirementsWin64.zip and unzip to F:\tools\WebKit
> 4. download latest WebKitAuxiliaryLibrary.zip from
> https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip
> and unzip to 
>    F:\tools\WebKit
> 5. download latest WebKitSupportLibrary.zip from

WebKitRequirementsWin64.zip is only for WinCairo port. Don't use it for AppleWin build.
Comment 2 Fujii Hironori 2022-04-08 13:10:12 PDT
(In reply to Fujii Hironori from comment #1)

Wrong URL.
249419@main is this.
https://build.webkit.org/#/builders/67/builds/11016
Comment 3 Fujii Hironori 2022-04-08 13:17:14 PDT
QuellaZhang described the AppleWin build instructions in Bug 226070.
Comment 4 Fujii Hironori 2022-04-11 20:37:06 PDT
Closed. Please reopen if you still have a problem.