Hi,
I am encountering a compilation failure when building Node.js v24.14.0 natively on RISC-V64.
The build breaks in deps/v8/src/json/json-stringifier.cc. The FastJsonStringifier requests a 16-lane vector, but on RISC-V64 without the V-extension, Highway falls back to a strict 1-lane scalar implementation, causing template deduction to fail.
Error:-
../deps/v8/src/json/json-stringifier.cc:3356:33: error: no matching function for call to ‘Set(hwy::N_SCALAR::FixedTag<unsigned char, 16>&, int)’
3356 | const auto mask_0x20 = hw::Set(tag, 0x20);
| ~~~~~~~^~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: candidate: ‘template<class D, hwy::EnableIf<(D::kPrivateLanes == 1)>* , class T, class T2> hwy::N_SCALAR::Vec1 hwy::N_SCALAR::Set(D, T2)’
116 | HWY_API Vec1 Set(D /* tag /, const T2 t) {
| ^~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: template argument deduction/substitution failed:
../deps/v8/src/json/json-stringifier.cc:3357:33: error: no matching function for call to ‘Set(hwy::N_SCALAR::FixedTag<unsigned char, 16>&, int)’
3357 | const auto mask_0x22 = hw::Set(tag, 0x22);
| ~~~~~~~^~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: candidate: ‘template<class D, hwy::EnableIf<(D::kPrivateLanes == 1)> , class T, class T2> hwy::N_SCALAR::Vec1 hwy::N_SCALAR::Set(D, T2)’
116 | HWY_API Vec1 Set(D /* tag /, const T2 t) {
| ^~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: template argument deduction/substitution failed:
../deps/v8/src/json/json-stringifier.cc:3358:33: error: no matching function for call to ‘Set(hwy::N_SCALAR::FixedTag<unsigned char, 16>&, int)’
3358 | const auto mask_0x5c = hw::Set(tag, 0x5c);
| ~~~~~~~^~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: candidate: ‘template<class D, hwy::EnableIf<(D::kPrivateLanes == 1)> , class T, class T2> hwy::N_SCALAR::Vec1 hwy::N_SCALAR::Set(D, T2)’
116 | HWY_API Vec1 Set(D /* tag /, const T2 t) {
| ^~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: template argument deduction/substitution failed:
../deps/v8/src/json/json-stringifier.cc:3361:33: error: no matching function for call to ‘LoadU(hwy::N_SCALAR::FixedTag<unsigned char, 16>&, const unsigned char&)’
3361 | const auto input = hw::LoadU(tag, block);
| ~~~~~~~~~^~~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:1090:17: note: candidate: ‘template<class D, hwy::EnableIf<(D::kPrivateLanes == 1)>* , class T> hwy::N_SCALAR::Vec1 hwy::N_SCALAR::LoadU(D, const T*)’
1090 | HWY_API Vec1 LoadU(D d, const T* HWY_RESTRICT p) {
| ^~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:1090:17: note: template argument deduction/substitution failed:
make[1]: *** [tools/v8_gypfiles/v8_base_without_compiler.target.mk:1139: /home/user/node/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/json/json-stringifier.o] Error 1
make[1]: *** Waiting for unfinished jobs....
rm c963181735d03de3bf99d3bc40db2e1e69f974c40ec0d109a7f24e14c00b737a.intermediate 68281cc6b5dfa4c0a2cf02421dc41eacecb50a2b11ce1ebe1f983bf22b2a6dbe.intermediate 6964f3c902231b8cdbd04ff5036cb56e7d1e1db774ad7dc13a467d17a2261f7f.intermediate
make: *** [Makefile:143: node] Error 2
Could smeone help me resolve this issue?
Hi,
I am encountering a compilation failure when building Node.js v24.14.0 natively on RISC-V64.
The build breaks in deps/v8/src/json/json-stringifier.cc. The FastJsonStringifier requests a 16-lane vector, but on RISC-V64 without the V-extension, Highway falls back to a strict 1-lane scalar implementation, causing template deduction to fail.
Error:-
../deps/v8/src/json/json-stringifier.cc:3356:33: error: no matching function for call to ‘Set(hwy::N_SCALAR::FixedTag<unsigned char, 16>&, int)’
3356 | const auto mask_0x20 = hw::Set(tag, 0x20);
| ~~~~~~~^~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: candidate: ‘template<class D, hwy::EnableIf<(D::kPrivateLanes == 1)>* , class T, class T2> hwy::N_SCALAR::Vec1 hwy::N_SCALAR::Set(D, T2)’
116 | HWY_API Vec1 Set(D /* tag /, const T2 t) {
| ^~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: template argument deduction/substitution failed:
../deps/v8/src/json/json-stringifier.cc:3357:33: error: no matching function for call to ‘Set(hwy::N_SCALAR::FixedTag<unsigned char, 16>&, int)’
3357 | const auto mask_0x22 = hw::Set(tag, 0x22);
| ~~~~~~~^~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: candidate: ‘template<class D, hwy::EnableIf<(D::kPrivateLanes == 1)> , class T, class T2> hwy::N_SCALAR::Vec1 hwy::N_SCALAR::Set(D, T2)’
116 | HWY_API Vec1 Set(D /* tag /, const T2 t) {
| ^~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: template argument deduction/substitution failed:
../deps/v8/src/json/json-stringifier.cc:3358:33: error: no matching function for call to ‘Set(hwy::N_SCALAR::FixedTag<unsigned char, 16>&, int)’
3358 | const auto mask_0x5c = hw::Set(tag, 0x5c);
| ~~~~~~~^~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: candidate: ‘template<class D, hwy::EnableIf<(D::kPrivateLanes == 1)> , class T, class T2> hwy::N_SCALAR::Vec1 hwy::N_SCALAR::Set(D, T2)’
116 | HWY_API Vec1 Set(D /* tag /, const T2 t) {
| ^~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:116:17: note: template argument deduction/substitution failed:
../deps/v8/src/json/json-stringifier.cc:3361:33: error: no matching function for call to ‘LoadU(hwy::N_SCALAR::FixedTag<unsigned char, 16>&, const unsigned char&)’
3361 | const auto input = hw::LoadU(tag, block);
| ~~~~~~~~~^~~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:1090:17: note: candidate: ‘template<class D, hwy::EnableIf<(D::kPrivateLanes == 1)>* , class T> hwy::N_SCALAR::Vec1 hwy::N_SCALAR::LoadU(D, const T*)’
1090 | HWY_API Vec1 LoadU(D d, const T* HWY_RESTRICT p) {
| ^~~~~
../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:1090:17: note: template argument deduction/substitution failed:
make[1]: *** [tools/v8_gypfiles/v8_base_without_compiler.target.mk:1139: /home/user/node/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/json/json-stringifier.o] Error 1
make[1]: *** Waiting for unfinished jobs....
rm c963181735d03de3bf99d3bc40db2e1e69f974c40ec0d109a7f24e14c00b737a.intermediate 68281cc6b5dfa4c0a2cf02421dc41eacecb50a2b11ce1ebe1f983bf22b2a6dbe.intermediate 6964f3c902231b8cdbd04ff5036cb56e7d1e1db774ad7dc13a467d17a2261f7f.intermediate
make: *** [Makefile:143: node] Error 2
Could smeone help me resolve this issue?