Created attachment 417168 [details] build_link_error.log Environment: VS 2019 + Windows Server 2016 Issue description: We tried to build WebKit using VS2019 on Windows Server 2016. WebKit failed to build due to ("LowLevelInterpreter.cpp(90,7): error C2653" and "WebCore.lib(FontCoreText.obj) : error LNK2019") on windows with MSVC. It can be reproduced on master branch latest commit https://github.com/WebKit/WebKit/commit/d29ac5b5e92fd0674f262a72f739a91f016a0a1e. Could you please help take a look at this? Thanks in advance! Repro steps: 1. git clone https://github.com/WebKit/webkit F:\gitP\WebKit\webkit 2. open a VS 2019 x86 command prompt as admin and browse to F:\gitP\WebKit\webkit 3. download latest WebKitAuxiliaryLibrary.zip from https://developer.apple.com/opensource/internet/WebKitAuxiliaryLibrary.zip and unzip to F:\gitP\WebKit\webkit\WebKitLibraries\win 4. download latest WebKitSupportLibrary.zip from https://developer.apple.com/opensource/internet/webkit_sptlib_agree.html and unzip to F:\gitP\WebKit\webkit\WebKitLibraries\win 5. mkdir build_x86 && pushd build_x86 6. cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release -DRUBY_LIBRARY=C:\tools\ruby26\lib -DPORT="AppleWin" .. 7. msbuild /p:Platform=Win32 /p:Configuration=Release WebKit.sln /t:Rebuild Actual result: F:\gitP\WebKit\webkit\build_x86>cl @cl.rsp F:\gitP\WebKit\webkit\Source\JavaScriptCore\llint\LowLevelInterpreter.cpp(90,7): error C2653: 'WebConfig': is not a class or namespace name F:\gitP\WebKit\webkit\Source\JavaScriptCore\llint\LowLevelInterpreter.cpp(90,1): error C2873: 'g_config': symbol cannot be used in a using-declaration F:\gitP\WebKit\webkit\build_x86\Source\WebKitLegacy>link @link.rsp Creating library F:/gitP/WebKit/webkit/build_x86/lib32/WebKit.lib and object F:/gitP/WebKit/webkit/build_x86/lib32/WebKit.exp WebCore.lib(FontCoreText.obj) : error LNK2019: unresolved external symbol _CTFontTransformGlyphs referenced in function "public: void __thiscall WebCore::Font::applyTransforms(class WebCore::GlyphBuffer &,unsigned int,unsigned int,bool,bool,class WTF::AtomString const &,class WTF::StringView,enum WebCore::TextDirection)const " (?applyTransforms@Font@WebCore@@QBEXAAVGlyphBuffer@2@II_N1ABVAtomString@WTF@@VStringView@5@W4TextDirection@2@@Z) WebCore.lib(FontCoreText.obj) : error LNK2019: unresolved external symbol _CTFontGetGlyphsForCharacterRange referenced in function "public: bool __thiscall WebCore::Font::isProbablyOnlyUsedToRenderIcons(void)const " (?isProbablyOnlyUsedToRenderIcons@Font@WebCore@@QBE_NXZ) WebCore.lib(GlyphPageCoreText.obj) : error LNK2019: unresolved external symbol _CTFontGetVerticalGlyphsForCharacters referenced in function "public: bool __thiscall WebCore::GlyphPage::fill(char16_t *,unsigned int)" (?fill@GlyphPage@WebCore@@QAE_NPA_SI@Z) WebCore.lib(FontCustomPlatformData.obj) : error LNK2019: unresolved external symbol _CTFontManagerCreateFontDescriptorFromData referenced in function "class std::unique_ptr<struct WebCore::FontCustomPlatformData,struct std::default_delete<struct WebCore::FontCustomPlatformData> > __cdecl WebCore::createFontCustomPlatformData(class WebCore::SharedBuffer &,class WTF::String const &)" (?createFontCustomPlatformData@WebCore@@YA?AV?$unique_ptr@UFontCustomPlatformData@WebCore@@U?$default_delete@UFontCustomPlatformData@WebCore@@@std@@@std@@AAVSharedBuffer@1@ABVString@WTF@@@Z) WebCore.lib(FontPlatformDataCoreText.obj) : error LNK2019: unresolved external symbol _CTFontDescriptorIsSystemUIFont referenced in function "public: __thiscall WebCore::FontPlatformData::FontPlatformData(struct __CTFont const *,float,bool,bool,enum WebCore::FontOrientation,enum WebCore::FontWidthVariant,enum WebCore::TextRenderingMode,struct WebCore::FontPlatformData::CreationData *)" (??0FontPlatformData@WebCore@@QAE@PBU__CTFont@@M_N1W4FontOrientation@1@W4FontWidthVariant@1@W4TextRenderingMode@1@PAUCreationData@01@@Z) F:\gitP\WebKit\webkit\build_x86\bin32\WebKit.dll : fatal error LNK1120: 5 unresolved externals
The second issue seems to be tracked by ↓. Bug 216771 – [Win] 32bit AppleWin link error: unresolved external symbol _CTFontTransformGlyphs
"using WebConfig::g_config;" was added by r267371 (Bug 216685).
<rdar://problem/73188377>
Thanks for your reminder, please close Bug 216771, we decided not to build 32-bit AppleWin, because if there is no official library, it is not convenient for us to maintain. For compilation errors, I also saw it when building the WinCairo port. And one thing I want to confirm with you, does Webkit support C++20 and conformance mode? I also hit lots of compilation errors when build WinCairo port and AppleWin port with /std:c++latest and /permissive- option. Do you have plan to support them? Thanks, Quella
(In reply to QuellaZhang from comment #4) > Thanks for your reminder, please close Bug 216771, we decided not to build > 32-bit AppleWin, because if there is no official library, it is not > convenient for us to maintain. Good. There is no active AppleWin maintainer. However, don't close the bug. Apple hasn't officially deprecated AppleWin 32bit yet. The bug ticket is still valid. > For compilation errors, I also saw it when building the WinCairo port. Right. WinCairo port supports only 64bit. > And one thing I want to confirm with you, does Webkit support C++20 and > conformance mode? I also hit lots of compilation errors when build WinCairo > port and AppleWin port with /std:c++latest and /permissive- option. Do you > have plan to support them? See Bug 195548.
Can someone who can build Win32 please attach the LLintAssembly.h that is generated for the build?
(In reply to Mark Lam from comment #6) > Can someone who can build Win32 please attach the LLintAssembly.h that is > generated for the build? Nevermind. I think I know what the issue is. Just need a simple #if. Patch coming.
Created attachment 417844 [details] proposed patch.
Please give the attached patch a try. Thanks.
It can compile the part. Unfortunately, another compilation issue arises. Will create another bug ticket. Thank you.
Comment on attachment 417844 [details] proposed patch. Thanks for the review.
Committed r271586: <https://trac.webkit.org/changeset/271586> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417844 [details].
Ah, thank you, I got it.