Repository navigation
Build Error C2338 using VS2019 and x86 configuration for node.js 18.x #3869
Description
Details
I try to compile node.js 18.x from the sources. As described I installed VS2019 (latest version), NASM and Python 3.10.4 on my windows machine.
The x64 build works nicely. The x86 build fails (on several machines). I get an compile error code C2338. I run the following command vcbuild.bat package x86. When I run vcbuild.bat package x64 everything is fine.
Is the documentation incomplete or do I miss some tools needed for building node.js 18.x (14.x and 16.x I can build in x86 and x64)
The following errors are shown on the command line
Checking inspector protocol compatibility, and also Generating inspector protocol sources from protocol json
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\spaces.h(320,1): error C2338: sizeof(MemoryChunk) <= MemoryChunk:
:kHeaderSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_init.vcxproj]
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\spaces.h(321,1): error C2338: sizeof(Page) <= MemoryChunk::kHeade
rSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_init.vcxproj]
Assembling ....\deps\v8\src\heap\base\asm\ia32\push_registers_masm.S...
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\large-spaces.h(56,1): error C2338: sizeof(LargePage) <= MemoryChu
nk::kHeaderSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_init.vcxproj]
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\spaces.h(320,1): error C2338: sizeof(MemoryChunk) <= MemoryChunk:
:kHeaderSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_compiler.vcxproj]
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\spaces.h(321,1): error C2338: sizeof(Page) <= MemoryChunk::kHeade
rSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_compiler.vcxproj]
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\large-spaces.h(56,1): error C2338: sizeof(LargePage) <= MemoryChu
nk::kHeaderSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_compiler.vcxproj]
v8_pch.cc
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\spaces.h(320,1): error C2338: sizeof(MemoryChunk) <= MemoryChunk:
:kHeaderSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\spaces.h(321,1): error C2338: sizeof(Page) <= MemoryChunk::kHeade
rSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
C:\Users\mail\Downloads\node-v18.2.0\deps\v8\src\heap\large-spaces.h(56,1): error C2338: sizeof(LargePage) <= MemoryChu
nk::kHeaderSize [C:\Users\mail\Downloads\node-v18.2.0\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
Node.js version
18.x
Example code
No response
Operating system
Windows 11
VS 2019 Enterprise
Python 3.10.4
NASM (latest installer)
Scope
code
Module and version
Not applicable.
Activity
richardlau commentedon May 25, 2022
It's currently broken. See nodejs/node#42666. We noted it in the release notes for Node.js 18.0.0: https://github.com/nodejs/node/blob/HEAD/doc/changelogs/CHANGELOG_V18.md#toolchain-and-compiler-upgrades
nodejs/node#42690 is tracking the issue.
mheller82 commentedon May 25, 2022
@richardlau: Thanks for explanation. I might have overseen the issue. I'll close this one.