Bug 219032 - [AppleWin 32bit] Build webkit using VS2017 x86 failed
Summary: [AppleWin 32bit] Build webkit using VS2017 x86 failed
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Local Build
Hardware: PC Windows 10
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-17 06:49 PST by jasonshan
Modified: 2020-11-24 17:42 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jasonshan 2020-11-17 06:49:00 PST
I'm trying to build webkit with VS2017, when set the platform to x86, I got this error message:

Invalid configuration. Error at: D:/Webkit/cygwin/home/administrator/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:305

Does the leatest version support 32-bit building or it is for 64-bit(x64) only?
Comment 1 Fujii Hironori 2020-11-17 23:44:15 PST
AppleWin port or WinCairo port?

32bit AppleWin has this issue.
Bug 216771 – [Win] 32bit AppleWin link error: unresolved external symbol _CTFontTransformGlyphs

32bit WinCairo has this issue.
Bug 210192 – [Wincairo, 32bit] adapt script update-wincairo-libs for 32-bit

You should use Visual Studio 2019. VS2017 has issues.

https://bugs.webkit.org/buglist.cgi?bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&list_id=6612161&query_format=advanced&short_desc=visual%20studio%202017&short_desc_type=allwordssubstr
Comment 2 Fujii Hironori 2020-11-17 23:46:52 PST
VS2017 has this issue.

Bug 189987 – [Win] error C2139: 'WebKit::UpdateInfo': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_assignable'
Comment 3 jasonshan 2020-11-18 04:46:42 PST
AppleWin port. I've read the issues you linked, but didn't solve my problem.

I found the error comes from this file: $(WEBKIT_OUTPUTDIR)\DerivedSources\JavaScriptCore\LLIntDesiredOffsets.h, which is generated by Project: JavaScriptCore\LLIntOffsetsExtractor using command as below:
D:\Webkit\cygwin\bin\ruby.exe D:/Webkit/cygwin/home/administrator/webkit/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb -ID:/Webkit/cygwin/home/administrator/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/ D:/Webkit/cygwin/home/administrator/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm D:/Webkit/cygwin/home/administrator/webkit/WebKitBuild/Release/Win32/LLIntSettingsExtractor.exe D:/Webkit/cygwin/home/administrator/webkit/WebKitBuild/Release/DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h "X86_WIN, C_LOOP_WIN"

and the contents of LLIntDesiredOffsets.h
// OffsetExtractor input hash: 828b554162b8786893aaf1c6d2f9b09c13520e38 ef8f58ff01391559db80dc799bf58d6a4f147ecb 21104db74e849a45cb3d052c15051aa4ce0b6876
#if !OFFLINE_ASM_X86 && OFFLINE_ASM_X86_WIN && !OFFLINE_ASM_X86_64 && !OFFLINE_ASM_X86_64_WIN && !OFFLINE_ASM_ARMv7 && !OFFLINE_ASM_ARM64 && !OFFLINE_ASM_ARM64E && !OFFLINE_ASM_MIPS && !OFFLINE_ASM_C_LOOP && !OFFLINE_ASM_C_LOOP_WIN && !OFFLINE_ASM_ARMv7k && !OFFLINE_ASM_ARMv7s && !OFFLINE_ASM_JSVALUE64 && !OFFLINE_ASM_BIGINT32 && !OFFLINE_ASM_GIGACAGE_ENABLED && !OFFLINE_ASM_ASSERT_ENABLED && !OFFLINE_ASM_TRACING && !OFFLINE_ASM_ADDRESS64 && !OFFLINE_ASM_WEBASSEMBLY && !OFFLINE_ASM_HAVE_FAST_TLS
#error "Invalid configuration. Error at: D:/Webkit/cygwin/home/administrator/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:305"
#endif

I have reviewed the LowLevelInterpreter.asm
if JSVALUE64          //Line 269
.........
else                  //Line 293
    const PC = t4 # When changing this, make sure LLIntPC is up to date in LLIntPCRanges.h
    if C_LOOP or C_LOOP_WIN
        const PB = csr0
        const metadataTable = csr3
    elsif ARMv7
        const metadataTable = csr0
        const PB = csr1
    elsif MIPS
        const metadataTable = csr0
        const PB = csr1
    else
        error        //Line 305
    end
end
since the platform is x86, JSVALUE64 is not defined, in else part, C_LOOP is not defined either, so this generates that error!
Comment 4 jasonshan 2020-11-20 00:59:09 PST
I found the reason of this error, my os is win10 x64, so when i run build-webkit command without any parameters under cgywin, it generates a VS2017 project with only one default platform x64, I add a new platform x86 in VS2017, that's why it takes out that error.
After review build-webkit script and webkitdirs.pm, I use this command to generate my VS2017 project:
perl build-webkit --generate-project-only --32-bit
This time, the C_LOOP is defined! I'm building this project now, although it's not finish yet, but I think it will not have that error anymore.
Maybe it's better to add some tips on webpage to introduce how to get a Win32 project under 64bit Windows (the parameter --32-bit is not mentioned).
Thanks everyone.