Open andreas-schwab opened 7 months ago
(Has the same problem, did some additional research). Actually the problem is with the v8 source version, which is currently used by nodejs. The riskv code support here is just unfinished and the template "Tagged" is just absent. The code is completed in the current v8 version from github, but it is not incorporated to the nodejs yet.
For Node.js 20 you'll probably need https://github.com/nodejs/node/pull/51495 for riscv. I'll land it on the v20.x-staging
branch later today.
g++ -o /home/abuild/rpmbuild/BUILD/node-v20.11.0/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/add-type-assertions-reducer.o ../deps/v8/src/compiler/add-type-assertions-reducer.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DNODE_OPENSSL_CERT_STORE' '-DICU_NO_USER_DATA_OVERRIDE' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D__STDC_FORMAT_MACROS' '-DV8_TARGET_ARCH_RISCV64' '-D__riscv_xlen=64' '-DCAN_USE_FPU_INSTRUCTIONS' '-DV8_HAVE_TARGET_OS' '-DV8_TARGET_OS_LINUX' '-DV8_EMBEDDER_STRING="-node.17"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_ATOMIC_OBJECT_FIELD_WRITES' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DV8_SHARED_RO_HEAP' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_USE_ZLIB' '-DV8_ENABLE_TURBOFAN' '-DV8_ENABLE_WEBASSEMBLY' '-DV8_ENABLE_JAVASCRIPT_PROMISE_HOOKS' '-DV8_ALLOCATION_FOLDING' '-DV8_ALLOCATION_SITE_TRACKING' '-DV8_ADVANCED_BIGINT_ALGORITHMS' -I../deps/v8 -I../deps/v8/include -I/home/abuild/rpmbuild/BUILD/node-v20.11.0/out/Release/obj/gen/generate-bytecode-output-root -I/home/abuild/rpmbuild/BUILD/node-v20.11.0/out/Release/obj/gen -pthread -Wno-unused-parameter -Wno-return-type -fno-strict-aliasing -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++17 -MMD -MF /home/abuild/rpmbuild/BUILD/node-v20.11.0/out/Release/.deps//home/abuild/rpmbuild/BUILD/node-v20.11.0/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/add-type-assertions-reducer.o.d.raw -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -Wno-error=return-type -fno-strict-aliasing -Wno-class-memaccess -g1 -c In file included from ../deps/v8/src/compiler/node.h:8, from ../deps/v8/src/compiler/node-marker.h:8, from ../deps/v8/src/compiler/graph-reducer.h:9, from ../deps/v8/src/compiler/add-type-assertions-reducer.h:8, from ../deps/v8/src/compiler/add-type-assertions-reducer.cc:5: ../deps/v8/src/common/globals.h:184:9: warning: multi-line comment [-Wcomment] 184 | #endif // defined(USE_SIMULATOR) && \ | ^ In file included from ../deps/v8/src/codegen/assembler-arch.h:27, from ../deps/v8/src/wasm/baseline/liftoff-assembler-defs.h:8, from ../deps/v8/src/execution/riscv/frame-constants-riscv.h:11, from ../deps/v8/src/execution/frame-constants.h:426, from ../deps/v8/src/builtins/builtins-utils.h:11: ../deps/v8/src/codegen/riscv/assembler-riscv.h:289:60: error: ‘Tagged’ has not been declared 289 | Tagged
code, | ^
~../deps/v8/src/codegen/riscv/assembler-riscv.h:289:66: error: expected ‘,’ or ‘...’ before ‘<’ token 289 | Taggedcode, | ^ In file included from ../deps/v8/src/codegen/assembler-arch.h:27, from ../deps/v8/src/wasm/baseline/liftoff-assembler-defs.h:8, from ../deps/v8/src/execution/riscv/frame-constants-riscv.h:11, from ../deps/v8/src/execution/frame-constants.h:426, from ../deps/v8/src/builtins/builtins-utils.h:11, from ../deps/v8/src/api/api-arguments.h:9, from ../deps/v8/src/ic/call-optimization.h:8, from ../deps/v8/src/compiler/heap-refs.h:11, from ../deps/v8/src/compiler/types.h:10, from ../deps/v8/src/compiler/node.h:12: ../deps/v8/src/codegen/riscv/assembler-riscv.h:289:60: error: ‘Tagged’ has not been declared 289 | Tagged
code, | ^
~../deps/v8/src/codegen/riscv/assembler-riscv.h:289:66: error: expected ‘,’ or ‘...’ before ‘<’ token 289 | Taggedcode, | ^ In file included from ../deps/v8/src/codegen/assembler-arch.h:27, from ../deps/v8/src/wasm/baseline/liftoff-assembler-defs.h:8, from ../deps/v8/src/execution/riscv/frame-constants-riscv.h:11, from ../deps/v8/src/execution/frame-constants.h:426, from ../deps/v8/src/builtins/builtins-utils.h:11, from ../deps/v8/src/api/api-arguments.h:9, from ../deps/v8/src/ic/call-optimization.h:8, from ../deps/v8/src/compiler/heap-refs.h:11, from ../deps/v8/src/compiler/feedback-source.h:8, from ../deps/v8/src/compiler/common-operator.h:12, from ../deps/v8/src/compiler/js-operator.h:10: ../deps/v8/src/codegen/riscv/assembler-riscv.h:289:60: error: ‘Tagged’ has not been declared 289 | Tagged
code, | ^
~../deps/v8/src/codegen/riscv/assembler-riscv.h:289:66: error: expected ‘,’ or ‘...’ before ‘<’ token 289 | Taggedcode, | ^ In file included from ../deps/v8/src/codegen/assembler-arch.h:27, from ../deps/v8/src/wasm/baseline/liftoff-assembler-defs.h:8, from ../deps/v8/src/execution/riscv/frame-constants-riscv.h:11, from ../deps/v8/src/execution/frame-constants.h:426, from ../deps/v8/src/builtins/builtins-utils.h:11, from ../deps/v8/src/objects/elements.h:8, from ../deps/v8/src/objects/js-objects-inl.h:10, from ../deps/v8/src/objects/api-callbacks-inl.h:13, from ../deps/v8/src/objects/map-inl.h:9, from ../deps/v8/src/objects/instance-type-inl.h:11, from ../deps/v8/src/objects/js-proxy-inl.h:8, from ../deps/v8/src/objects/objects-inl.h:30, from ../deps/v8/src/heap/paged-spaces-inl.h:13, from ../deps/v8/src/heap/new-spaces-inl.h:12, from ../deps/v8/src/heap/heap-inl.h:32, from ../deps/v8/src/init/setup-isolate-full.cc:8: ../deps/v8/src/codegen/riscv/assembler-riscv.h:289:60: error: ‘Tagged’ has not been declared 289 | Tagged
code, | ^
~../deps/v8/src/codegen/riscv/assembler-riscv.h:289:66: error: expected ‘,’ or ‘...’ before ‘<’ token 289 | Taggedcode, | ^ make[1]: *** [tools/v8_gypfiles/v8_compiler.target.mk:277: /home/abuild/rpmbuild/BUILD/node-v20.11.0/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/add-type-assertions-reducer.o] Error 1