v8-riscv / node

Node.js on RISC-V! See the link below to learn more and try it out.
https://github.com/v8-riscv/node/wiki
Other
29 stars 4 forks source link

Build node.js with v8-riscv64 on x64. #6

Closed luyahan closed 2 years ago

luyahan commented 4 years ago

command line:

export CC=gcc
export CXX=g++

./configure  --dest-cpu=riscv64  --verbose  --openssl-no-asm --build-v8-with-gn
make -j2

So we can test nodejs-riscv64 on x86 host.

ghost commented 4 years ago

So does that build the simulated version of RISC-V V8?

luyahan commented 3 years ago

Hi luyanhan, I built on riscv target machine hifive unleased board I am getting following issue. can you please help me to solve this issue.

g++ -o /home/root/nodejs riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o ../deps/v8/src/heap/base/asm/ia32/push_registers_asm.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DV8_TARGET_ARCH_RISCV64' '-DV8_EMBEDDER_STRING="-node.7"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DENABLE_MINOR_MC' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_SNAPSHOT_COMPRESSION' '-DV8_ENABLE_WEBASSEMBLY' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/v8 -I../deps/v8/include -I/home/root/nodejs-riscv64/out/Release/obj/gen/inspector-generated-output-root -I../deps/v8/third_party/inspector_protocol -I/home/root/nodejs-riscv64/out/Release/obj/gen -I/home/root/nodejs-riscv64/out/Release/obj/gen/generate-bytecode-output-root -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/tools/toolutil -I../deps/v8/third_party/zlib -I../deps/v8/third_party/zlib/google -pthread -Wno-unused-parameter -Wno-return-type -fno-strict-aliasing -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF /home/root/nodejs-riscv64/out/Release/.deps//home/root/nodejs-riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o.d.raw -c /tmp/ccXbGDEh.s: Assembler messages: /tmp/ccXbGDEh.s:9: Error: unrecognized opcode push %ebp' /tmp/ccXbGDEh.s:10: Error: unrecognized opcodemovl %esp,%ebp' /tmp/ccXbGDEh.s:11: Error: unrecognized opcode push %ebx' /tmp/ccXbGDEh.s:12: Error: unrecognized opcodepush %esi' /tmp/ccXbGDEh.s:13: Error: unrecognized opcode push %edi' /tmp/ccXbGDEh.s:14: Error: unrecognized opcodemovl 28(%esp),%ecx' /tmp/ccXbGDEh.s:15: Error: unrecognized opcode push %esp' /tmp/ccXbGDEh.s:16: Error: unrecognized opcodepush 28(%esp)' /tmp/ccXbGDEh.s:17: Error: unrecognized opcode push 28(%esp)' /tmp/ccXbGDEh.s:18: Error: bad expression /tmp/ccXbGDEh.s:19: Error: unrecognized opcodeaddl $24,%esp' /tmp/ccXbGDEh.s:20: Error: unrecognized opcode pop %ebp' /tmp/ccXbGDEh.s:18: Error: invalid operands (*ABS* and *UND* sections) for%' make[1]: [tools/v8_gypfiles/v8_base_without_compiler.host.mk:751: /home/root/nodejs-riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o] Error 1 make[1]: Waiting for unfinished jobs.... rm 21dd92d70b3ebf332cf3864a5751c201149f9af8.intermediate 36b48df745443acba47d3a0b69cfca3cc2fd0049.intermediate b35d52d0018bac5bb12e975239af7eece96ee2a2.intermediate 243ed329d3a22bcb8013d529cf47fb2531490388.intermediate 3b1da71b10bf34ad72e5aff777a5fc8cbe5d8279.intermediate make: *** [Makefile:104: node] Error 2

Thanks & Regards, Sateesh

Sorry, i don't write a guide to build it. I will do it today.

luyahan commented 3 years ago

Hi luyanhan, I built on riscv target machine hifive unleased board I am getting following issue. can you please help me to solve this issue.

g++ -o /home/root/nodejs riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o ../deps/v8/src/heap/base/asm/ia32/push_registers_asm.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DV8_TARGET_ARCH_RISCV64' '-DV8_EMBEDDER_STRING="-node.7"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DENABLE_MINOR_MC' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_SNAPSHOT_COMPRESSION' '-DV8_ENABLE_WEBASSEMBLY' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/v8 -I../deps/v8/include -I/home/root/nodejs-riscv64/out/Release/obj/gen/inspector-generated-output-root -I../deps/v8/third_party/inspector_protocol -I/home/root/nodejs-riscv64/out/Release/obj/gen -I/home/root/nodejs-riscv64/out/Release/obj/gen/generate-bytecode-output-root -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/tools/toolutil -I../deps/v8/third_party/zlib -I../deps/v8/third_party/zlib/google -pthread -Wno-unused-parameter -Wno-return-type -fno-strict-aliasing -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF /home/root/nodejs-riscv64/out/Release/.deps//home/root/nodejs-riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o.d.raw -c /tmp/ccXbGDEh.s: Assembler messages: /tmp/ccXbGDEh.s:9: Error: unrecognized opcode push %ebp' /tmp/ccXbGDEh.s:10: Error: unrecognized opcodemovl %esp,%ebp' /tmp/ccXbGDEh.s:11: Error: unrecognized opcode push %ebx' /tmp/ccXbGDEh.s:12: Error: unrecognized opcodepush %esi' /tmp/ccXbGDEh.s:13: Error: unrecognized opcode push %edi' /tmp/ccXbGDEh.s:14: Error: unrecognized opcodemovl 28(%esp),%ecx' /tmp/ccXbGDEh.s:15: Error: unrecognized opcode push %esp' /tmp/ccXbGDEh.s:16: Error: unrecognized opcodepush 28(%esp)' /tmp/ccXbGDEh.s:17: Error: unrecognized opcode push 28(%esp)' /tmp/ccXbGDEh.s:18: Error: bad expression /tmp/ccXbGDEh.s:19: Error: unrecognized opcodeaddl $24,%esp' /tmp/ccXbGDEh.s:20: Error: unrecognized opcode pop %ebp' /tmp/ccXbGDEh.s:18: Error: invalid operands (*ABS* and *UND* sections) for%' make[1]: [tools/v8_gypfiles/v8_base_without_compiler.host.mk:751: /home/root/nodejs-riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o] Error 1 make[1]: Waiting for unfinished jobs.... rm 21dd92d70b3ebf332cf3864a5751c201149f9af8.intermediate 36b48df745443acba47d3a0b69cfca3cc2fd0049.intermediate b35d52d0018bac5bb12e975239af7eece96ee2a2.intermediate 243ed329d3a22bcb8013d529cf47fb2531490388.intermediate 3b1da71b10bf34ad72e5aff777a5fc8cbe5d8279.intermediate make: *** [Makefile:104: node] Error 2

Thanks & Regards, Sateesh

You can see this wiki https://github.com/v8-riscv/node/wiki

luyahan commented 3 years ago

Hi luyanhan, I built on riscv target machine hifive unleased board I am getting following issue. can you please help me to solve this issue.

g++ -o /home/root/nodejs riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o ../deps/v8/src/heap/base/asm/ia32/push_registers_asm.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DV8_TARGET_ARCH_RISCV64' '-DV8_EMBEDDER_STRING="-node.7"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DENABLE_MINOR_MC' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_SNAPSHOT_COMPRESSION' '-DV8_ENABLE_WEBASSEMBLY' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/v8 -I../deps/v8/include -I/home/root/nodejs-riscv64/out/Release/obj/gen/inspector-generated-output-root -I../deps/v8/third_party/inspector_protocol -I/home/root/nodejs-riscv64/out/Release/obj/gen -I/home/root/nodejs-riscv64/out/Release/obj/gen/generate-bytecode-output-root -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/tools/toolutil -I../deps/v8/third_party/zlib -I../deps/v8/third_party/zlib/google -pthread -Wno-unused-parameter -Wno-return-type -fno-strict-aliasing -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF /home/root/nodejs-riscv64/out/Release/.deps//home/root/nodejs-riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o.d.raw -c /tmp/ccXbGDEh.s: Assembler messages: /tmp/ccXbGDEh.s:9: Error: unrecognized opcode push %ebp' /tmp/ccXbGDEh.s:10: Error: unrecognized opcodemovl %esp,%ebp' /tmp/ccXbGDEh.s:11: Error: unrecognized opcode push %ebx' /tmp/ccXbGDEh.s:12: Error: unrecognized opcodepush %esi' /tmp/ccXbGDEh.s:13: Error: unrecognized opcode push %edi' /tmp/ccXbGDEh.s:14: Error: unrecognized opcodemovl 28(%esp),%ecx' /tmp/ccXbGDEh.s:15: Error: unrecognized opcode push %esp' /tmp/ccXbGDEh.s:16: Error: unrecognized opcodepush 28(%esp)' /tmp/ccXbGDEh.s:17: Error: unrecognized opcode push 28(%esp)' /tmp/ccXbGDEh.s:18: Error: bad expression /tmp/ccXbGDEh.s:19: Error: unrecognized opcodeaddl $24,%esp' /tmp/ccXbGDEh.s:20: Error: unrecognized opcode pop %ebp' /tmp/ccXbGDEh.s:18: Error: invalid operands (*ABS* and *UND* sections) for%' make[1]: [tools/v8_gypfiles/v8_base_without_compiler.host.mk:751: /home/root/nodejs-riscv64/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/heap/base/asm/ia32/push_registers_asm.o] Error 1 make[1]: Waiting for unfinished jobs.... rm 21dd92d70b3ebf332cf3864a5751c201149f9af8.intermediate 36b48df745443acba47d3a0b69cfca3cc2fd0049.intermediate b35d52d0018bac5bb12e975239af7eece96ee2a2.intermediate 243ed329d3a22bcb8013d529cf47fb2531490388.intermediate 3b1da71b10bf34ad72e5aff777a5fc8cbe5d8279.intermediate make: *** [Makefile:104: node] Error 2

Thanks & Regards, Sateesh

You can ask any question by slack. This our slack join url

qjivy commented 2 years ago

Now already done. We have CI for build https://ci.rvperf.org/view/NodeJS/