I need to get a working copy of node 8 on the T1040. I am using the Qoriq SDK v2.0 and have tried meta-node but the binary produced crashes on start. Cross compiling does not really work, but compiling from source on the T1040 and executing gets a little farther, but crashes in the V8 engine.
The team that supports the nodejs ppc port is from IBM, and they do not support Freescale/NXP ppc64 hardware. The support is almost there as they support linux-ppc64le and AIX-ppc64be, so I hope to add support for a linux-ppc64be target.
Building the node 8.11.4 release binary succeeds and node starts, but it crashes after any input (like enter).
$ ./configure --without-intl --without-snapshot --gdb --without-inspector
$ make -j4 node
./node
>
unhandled signal 4 at 000000bb709be26c nip 000000bb709be26c lr 000000bb708b39f0 code 30001
# .... ENDS IN SIG 4 (illegal instruction).....
Building with the debug configuration and running with gdb shows that the initial crash is in the native macro assembly module:
$ ./configure --without-intl --without-snapshot --gdb --without-inspector
$ make -j4 -C ./out BUILDTYPE=Debug node
$ gdb ./out/Debug/node
>
# Fatal error in ../deps/v8/src/ppc/assembler-ppc.h, line 776
# Debug check failed: !ra.is(r0).
Program received signal SIGTRAP, Trace/breakpoint trap.
v8::base::OS::Abort () at ../deps/v8/src/base/platform/platform-posix.cc:248
248 V8_IMMEDIATE_CRASH();
#0 v8::base::OS::Abort () at ../deps/v8/src/base/platform/platform-posix.cc:248
#1 0x00000000127bdf24 in V8_Fatal (file=0x12dac720 "../deps/v8/src/ppc/assembler-ppc.h", line=776,
format=0x12dac510 "Debug check failed: %s.") at ../deps/v8/src/base/logging.cc:126
#2 0x00000000124ff7c8 in v8::internal::Assembler::lhbrx<v8::internal::Register> (this=0x132be6e0,
rt=..., ra=..., rb=..., rc=v8::internal::LeaveRC) at ../deps/v8/src/ppc/assembler-ppc.h:776
#3 0x00000000124ff5f0 in v8::internal::Assembler::lhbrx<v8::internal::Register> (this=0x132be6e0,
dst=..., src=...) at ../deps/v8/src/ppc/assembler-ppc.h:776
#4 0x00000000124ff088 in v8::internal::RegExpMacroAssemblerPPC::LoadCurrentCharacterUnchecked (
this=0x3fffffffcc38, cp_offset=0, characters=2)
at ../deps/v8/src/regexp/ppc/regexp-macro-assembler-ppc.cc:1306
#5 0x00000000124fce7c in v8::internal::RegExpMacroAssemblerPPC::LoadCurrentCharacter (
this=0x3fffffffcc38, cp_offset=0, on_end_of_input=0x0, check_bounds=true, characters=2)
at ../deps/v8/src/regexp/ppc/regexp-macro-assembler-ppc.cc:988
#6 0x00000000121c93f0 in v8::internal::RegExpNode::EmitQuickCheck (this=0x132baaf8,
compiler=0x3fffffffc7e0, bounds_check_trace=0x3fffffffc668, trace=0x3fffffffbf30,
preload_has_checked_bounds=false, on_possible_success=0x3fffffffc078, details=0x3fffffffc08c,
fall_through_on_failure=true) at ../deps/v8/src/regexp/jsregexp.cc:2430
This crash is from a debug assertion in some template code that is removed in later versions of v8, I am removing the assertion and recompiling to see if the crash still happens.
I appreciate any assistance or direction with this problem. I do not have much experience with porting and can use some suggestions for tools or techniques.
Hello Patrick Brown,
Please download the latest nodejs 7.10.0 recipe from OpenEmbedded Layer Index - meta-nodejs, then put these recipes in the folder meta-openembedded/meta-oe/recipes-devtools/nodejs, and execute "bitbake nodejs".
Please add "nodejs" in variable IMAGE_INSTALL_append in meta-freescale/recipes-fsl/images/fsl-image-core.bb, execute "bitbake fsl-image-core" to build nodejs to the rootfs filesystem.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------