I need to compile node.js on a 32-bit system for compatibility with existing code.
I started with the source code from nodejs.org and compiled it. Then I started by changing lines 164-166 in the common.gypi file. It was:
164 [ 'target_arch=="x64"', { 165 'cflags': [ '-m64' ], 166 'ldflags': [ '-m64' ], 167 }],
and now this:
164 [ 'target_arch=="x64"', { 165 'cflags': [ '-m32' ], 166 'ldflags': [ '-m32' ], 167 }],
When I tried to do this again, I get the following errors:
../deps/v8/src/execution.h: 259: error: integer constant too large for long type .. / deps / v 8 / src / execution.h: 260: error: integer constant too large for long type .. / deps / v 8 / src / execution.h: 259: error: function call cannot appear in constant expression .. / deps / v 8 / src / execution.h: 260: error: function call cannot appear in constant expression
These errors relate to these lines:
#ifdef V8_TARGET_ARCH_X64 static const uintptr_t kInterruptLimit = V8_UINT64_C(0xfffffffffffffffe); static const uintptr_t kIllegalLimit = V8_UINT64_C(0xfffffffffffffff8);
I believe this code is from google v8 source code.
I would appreciate any suggestions on how to fix these specific compilation errors and / or how to compile 64-bit node.js on a 32-bit system. Most of the research I have done is how to compile something 32-bit for a 64-bit system.
source share