Closed
Listed in
Description
https://ci.nodejs.org/job/node-compile-windows/46957/nodes=win-vs2019-arm64/console
11:13:20 simd.cc
11:13:21 C:\workspace\node-compile-windows\node\deps\v8\src\objects\simd.cc(99,28): error C2078: too many initializers [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
11:13:21 C:\workspace\node-compile-windows\node\deps\v8\src\objects\simd.cc(109,1): error C2766: explicit specialization; 'int v8::internal::`anonymous-namespace'::extract_first_nonzero_index<uint32x4_t>(uint32x4_t)' has already been defined [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
Activity
targos commentedon Sep 16, 2022
The first error is considered "not a bug" by Microsoft. What should we do?
@nodejs/platform-windows-arm
https://developercommunity.visualstudio.com/t/error-c2078-too-many-initializers-when-using-arm-n/402911
pbo-linaro commentedon Sep 16, 2022
It seems like a workaround was given by Microsoft (using .128_u8).
It it's working, would that be possible to simply add an ifdef for that compiler (vs gcc/clang)?
niyas-sait commentedon Sep 16, 2022
We probably should upstream a patch to V8 as well to fix the same issue with MSVC.
targos commentedon Sep 16, 2022
Yes, please send a patch upstream if possible!
pbo-linaro commentedon Sep 16, 2022
I'll look at it :)
If we integrate that in v8, can you easily update to latest version (including current trunk)?
targos commentedon Sep 16, 2022
Yes, the canary branch in this repository is updated automatically every day.
pbo-linaro commentedon Sep 20, 2022
@targos After investigation, it is indeed not a bug in msvc, but simply the C++ standard dictating this (and gcc having an extension that accepts it). The way to initialize those variables must be changed specifically for msvc.
In more, there is another problem appearing with a conflict between two template specialization.
Quick and dirty details and patch are available here: https://github.com/pbo-linaro/node/commit/7586c64749459e238023834dc0ab8b0d941c819b.
I'll try to upstream that in V8 directly (so nodejs and other projects can benefit from it).
If that's not ready for next nodejs release, you can still use that patch 👍
pbo-linaro commentedon Sep 23, 2022
@targos I just submitted 4 patches to fix all compilation errors of V8 with MSVC (including some not concerning Node).
This one solves issue discussed here.
targos commentedon Sep 23, 2022
Amazing!
[msvc] fix build with neon intrinsics
pbo-linaro commentedon Sep 25, 2022
@targos Patches are now merged upstream, v8 canary should be able to compile for windows from now.
Don't hesitate to ping me if you need help in the future 👍
deps: V8: cherry-pick 1b3a4f0c34a1
targos commentedon Sep 25, 2022
Cherry-picked all patches to nodejs/node#44741.
23 remaining items