Bug 271371

Summary: [RISCV64] /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Validate.cpp:457:43: error: ‘toB3Type’ was not declared in this scope
Product: WebKit Reporter: Andreas Schwab <schwab>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: berto, cgarcia, mcatanzaro, michael, thomas.perrot
Priority: P3 Keywords: Gtk, Regression
Version: Other   
Hardware: PC   
OS: Linux   

Andreas Schwab
Reported 2024-03-21 03:14:30 PDT
FAILED: Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-23a5fd0e-9.cpp.o /usr/bin/ccache /var/lib/build/ccache/bin/c++ -DBUILDING_GTK__=1 -DBUILDING_JavaScriptCore -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=\"WebKitGTK-6.0\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DJavaScriptCore_EXPORTS -DPAS_BMALLOC=1 -DSTATICALLY_LINKED_WITH_WTF -DSTATICALLY_LINKED_WITH_bmalloc -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCore/Headers -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/API -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/assembler -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3 -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/air -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/bindings -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/builtins -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/bytecode -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/bytecompiler -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/dfg -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/disassembler -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/disassembler/ARM64 -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/disassembler/zydis/Zydis -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/domjit -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/ftl -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/fuzzilli -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/heap -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/debugger -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/inspector -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/inspector/agents -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/inspector/augmentable -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/inspector/remote -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/interpreter -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/jit -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/llint -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/parser -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/profiler -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/runtime -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/tools -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/wasm -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/wasm/js -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/yarr -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCore/DerivedSources -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCore/DerivedSources/inspector -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCore/DerivedSources/runtime -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCore/DerivedSources/yarr -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/API/glib -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCoreGLib/DerivedSources -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCoreGLib/DerivedSources/jsc -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCoreGLib/Headers -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/inspector/remote/glib -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/WTF/Headers -I/home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/bmalloc/Headers -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -fdiagnostics-color=always -Wextra -Wall -pipe -fmax-errors=20 -Wno-odr -Wno-stringop-overread -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g1 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads -fno-strict-aliasing -fno-exceptions -fno-rtti -O3 -DNDEBUG -std=c++20 -fPIC -fvisibility=hidden -ffp-contract=off -MD -MT Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-23a5fd0e-9.cpp.o -MF Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-23a5fd0e-9.cpp.o.d -o Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-23a5fd0e-9.cpp.o -c /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-23a5fd0e-9.cpp In file included from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/assembler/MacroAssembler.h:81, from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/jit/GPRInfo.h:28, from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Common.h:31, from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Type.h:30, from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Bank.h:30, from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Value.h:30, from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3SwitchValue.h:32, from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3SwitchValue.cpp:27, from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-23a5fd0e-9.cpp:1: /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h: In member function ‘void JSC::MacroAssemblerRISCV64::testFinalize(ResultCondition, JSC::AbstractMacroAssembler<JSC::RISCV64Assembler>::RegisterID, JSC::AbstractMacroAssembler<JSC::RISCV64Assembler>::RegisterID)’: /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:4438:16: warning: enumeration value ‘Carry’ not handled in switch [-Wswitch] 4438 | switch (cond) { | ^ In file included from /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/build/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-23a5fd0e-9.cpp:6: /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Validate.cpp: In member function ‘void JSC::B3::{anonymous}::Validater::run()’: /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Validate.cpp:457:43: error: ‘toB3Type’ was not declared in this scope 457 | VALIDATE(value->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); | ^~~~~~~~ /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Validate.cpp:63:13: note: in definition of macro ‘VALIDATE’ 63 | if (condition) \ | ^~~~~~~~~ /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Validate.cpp:465:53: error: ‘toB3Type’ was not declared in this scope 465 | VALIDATE(value->child(1)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); | ^~~~~~~~ /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Validate.cpp:63:13: note: in definition of macro ‘VALIDATE’ 63 | if (condition) \ | ^~~~~~~~~ /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Validate.cpp:487:53: error: ‘toB3Type’ was not declared in this scope 487 | VALIDATE(value->child(0)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); | ^~~~~~~~ /home/abuild/rpmbuild/BUILD/webkitgtk-2.44.0/Source/JavaScriptCore/b3/B3Validate.cpp:63:13: note: in definition of macro ‘VALIDATE’ 63 | if (condition) \ | ^~~~~~~~~
Attachments
Alberto Garcia
Comment 1 2024-04-15 04:38:36 PDT
FYI until this is fixed you can work around the problem and build WebKitGTK for riscv with this patch: https://salsa.debian.org/webkit-team/webkit/-/raw/debian/2.44.1-1/debian/patches/fix-ftbfs-riscv64.patch
Andreas Schwab
Comment 2 2024-04-15 11:09:37 PDT
Workaround is configuring with ENABLE_JIT=OFF
Alberto Garcia
Comment 3 2024-04-15 14:34:17 PDT
(In reply to Andreas Schwab from comment #2) > Workaround is configuring with ENABLE_JIT=OFF Oh ok, I'd swear that I tried that first... thanks.
Alberto Garcia
Comment 4 2024-05-30 09:33:44 PDT
> Workaround is configuring with ENABLE_JIT=OFF This does not work for me, see also bug 274826.
Michael Orlitzky
Comment 5 2024-08-18 09:52:25 PDT
Came to report the same thing in 2.44.3. It looks possibly related to https://bugs.launchpad.net/ubuntu/+source/webkit2gtk/+bug/2008798
thomas.perrot
Comment 6 2024-12-30 01:01:44 PST
Hello, The same issue occurs in version 2.46.5, and the workaround (e.g., ENABLE_JIT=OFF) doesn't work. Kind regards, Thomas
Michael Orlitzky
Comment 7 2024-12-30 06:33:43 PST
(In reply to thomas.perrot from comment #6) > Hello, > > The same issue occurs in version 2.46.5, and the workaround (e.g., > ENABLE_JIT=OFF) doesn't work. Even if you fix this, you will hit at least two other build failures on risc-v.
thomas.perrot
Comment 8 2025-01-06 01:33:58 PST
Hello Michael, Yes, I attempted to fix it, but other build failures occurred. Do you have a plan to address the RISC-V issues? Kind regards, Thomas
Andreas Schwab
Comment 9 2025-01-07 12:31:58 PST
What are those failures?
Michael Orlitzky
Comment 10 2025-01-07 14:27:38 PST
(In reply to thomas.perrot from comment #8) > Hello Michael, > > Yes, I attempted to fix it, but other build failures occurred. Do you have a > plan to address the RISC-V issues? I'm not in charge :) There are PRs for some of them on Github if you search for riscv or risc-v. There's also the OpenBSD ports repo which has patches for several of the outstanding issues. But even if I apply every available patch, there are build failures that I don't know how to solve. At one point I was able to get a stable release to build, but then it would crash at runtime on javascript-heavy pages. I have riscv hardware and can debug them, but the problem then becomes, how do I report the crash when it requires a random assortment of unofficial patches from multiple sources before it will even compile? (And will anybody fix them?) I think eventually we should try to get a riscv machine (even if it's a VM) added to the CI, but before we can do that, it has to build.
Michael Orlitzky
Comment 11 2025-01-07 14:33:35 PST
(In reply to Andreas Schwab from comment #9) > What are those failures? It depends on if you're using the stable releases or git, but there's no shortage of them. Here's the next two I hit with 2.46.5, * https://bugs.webkit.org/show_bug.cgi?id=282677 * https://bugs.webkit.org/show_bug.cgi?id=282898 using the cmake JIT args, -DENABLE_JIT=ON -DENABLE_WEBASSEMBLY=OFF -DENABLE_FTL_JIT=OFF After patching those two, there's another...
Note You need to log in before you can comment on or make changes to this bug.