| Summary: | WebKit-GTK 2.36.0 fails to build with Webassembly/JIT disabled | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | dave | ||||||||
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | ||||||||||
| Priority: | P2 | ||||||||||
| Version: | WebKit Local Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
dave
2022-04-09 11:56:08 PDT
Created attachment 457175 [details]
Add a missing system include needed for debug build
Created attachment 457176 [details]
Fix building with accessibility disabled
Created attachment 457177 [details]
broken patch; obsolete
Patches enclosed; copyright disclaimed; do whatever you want with them. More information--here's the full error output from BFD when linking JavaScriptCore: [ 26%] Linking CXX shared library ../../lib/libjavascriptcoregtk-4.1.so /usr/bin/ld: CMakeFiles/JavaScriptCore.dir/dfg/DFGCapabilities.cpp.o: in function `JSC::DFG::capabilityLevel(JSC::CodeBlock*)': /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::HeapCell::vm() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::inherits(JSC::VM&, JSC::ClassInfo const*) const' /usr/bin/ld: CMakeFiles/JavaScriptCore.dir/jit/JITDisassembler.cpp.o: in function `JSC::JITDisassembler::JITDisassembler(JSC::CodeBlock*)': /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::HeapCell::vm() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::inherits(JSC::VM&, JSC::ClassInfo const*) const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::HeapCell::vm() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::inherits(JSC::VM&, JSC::ClassInfo const*) const' /usr/bin/ld: CMakeFiles/JavaScriptCore.dir/jit/JITDisassembler.cpp.o: in function `JSC::JITDisassembler::dumpHeader(WTF::PrintStream&, JSC::LinkBuffer&)': /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::HeapCell::vm() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::inherits(JSC::VM&, JSC::ClassInfo const*) const' /usr/bin/ld: CMakeFiles/JavaScriptCore.dir/jit/JITPlan.cpp.o: in function `JSC::JITPlan::compileInThread(JSC::JITWorklistThread*)': /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::inherits(JSC::VM&, JSC::ClassInfo const*) const' /usr/bin/ld: CMakeFiles/JavaScriptCore.dir/llint/LLIntEntrypoint.cpp.o: in function `JSC::LLInt::setFunctionEntrypoint(JSC::CodeBlock*)': /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::inherits(JSC::VM&, JSC::ClassInfo const*) const' /usr/bin/ld: CMakeFiles/JavaScriptCore.dir/llint/LLIntEntrypoint.cpp.o: in function `JSC::LLInt::setEntrypoint(JSC::CodeBlock*)': /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::inherits(JSC::VM&, JSC::ClassInfo const*) const' /usr/bin/ld: CMakeFiles/JavaScriptCore.dir/runtime/FileBasedFuzzerAgentBase.cpp.o: in function `JSC::FileBasedFuzzerAgentBase::getPrediction(JSC::CodeBlock*, JSC::CodeOrigin const&, unsigned long)': /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::structure() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::HeapCell::vm() const' /usr/bin/ld: /sources/stage4/webkitgtk-2.36.0/build/Source/JavaScriptCore/../../../Source/JavaScriptCore/runtime/WriteBarrier.h:59: undefined reference to `JSC::JSCell::inherits(JSC::VM&, JSC::ClassInfo const*) const' collect2: error: ld returned 1 exit status make[2]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:19673: lib/libjavascriptcoregtk-4.1.so.0.1.4] Error 1 make[1]: *** [CMakeFiles/Makefile2:873: Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all] Error 2 make: *** [Makefile:156: all] Error 2 OK--after much head banging against the wall, I got this figured out. First off, all those link errors were due to my faulty/incomplete patch, which was an attempt to fix various compile errors when disabling WebAssembly. I didn't know in the beginning that just setting WEBKIT_ENABLE_WEBASSEMBLY=OFF isn't enough to properly disable it. After patching /Source/cmake/WebKitFeatures.cmake as described above to set the 5-6 different flags the same as the 32-bit build, and removing the faulty patch, that successfully builds WebKit with JIT disabled. But it turns out I didn't even have to do that at all. How's this for a kick in the nuts: Turns out my two browsers were both linking to webkit2gtk-4.0, not -4.1. This change of course came about when libsoup3 was introduced. So this whole time I've been linking to and using the old webkit 2.32.x, even when I thought I'd long since upgraded to 2.34.x, and then to 2.36.x; and also explaining why the Debug build wouldn't give a usable backtrace. With JIT fully enabled and just the "Debug build fix" and "accessibility disabled" patches applied, WebKit 2.36.0 builds and works just fine on the web site where 2.32.0 was crashing. So whatever the JIT bug was in 2.32.x, it's already been patched out. Meanwhile I've been unknowingly stuck on an old WebKit version, and presumably would have continued to be stuck there for a few more upgrade cycles until finally discovering the API change...and probably wondering the whole time why the hell none of these supposed fixes and upgrades in each version were taking effect. SMH... |