Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error C2338 using VS2019 and x86 configuration for node.js 18.x #3869

Closed
mheller82 opened this issue May 24, 2022 · 2 comments
Closed

Comments

@mheller82
Copy link

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.

@richardlau
Copy link
Member

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)

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
Copy link
Author

@richardlau: Thanks for explanation. I might have overseen the issue. I'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants