Samsung / node-jerryscript

JS runtime based on JerryScript
Other
30 stars 19 forks source link

./configure fails on master if host_platform != 'tizen' #76

Closed diamondman closed 3 years ago

diamondman commented 3 years ago

When I run ./configure on the master branch on my amd64 linux (debian 10) host, I receive the following error:

./configure --without-dtrace --without-etw --without-perfctr \
    --without-ssl --without-inspector --without-intl --without-snapshot \
    --dest-cpu x64 --without-bundled-v8
..................................
creating config.gypi                    
creating config.mk         
gyp: name 'host_platform' is not defined while evaluating condition 'host_platform=="tizen"' in /PATH/TO/node-jerryscript/deps/bindings/bindings.gyp while loading dependencies of /PATH/TO/node-jerryscript/node.gyp while trying to load /PATH/TO/src/node-jerryscript/node.gyp
Error running GYP 

The variable o['variables']['host_platform'] is not initialized.

I have a patch ready that sets host_platform to an empty string by default:

diff --git a/configure b/configure
index 8a30b248f0..0ed59c5e87 100755
--- a/configure
+++ b/configure
@@ -1441,7 +1441,7 @@ def make_bin_override():
   return bin_override

 output = {
-  'variables': {},
+  'variables': {'host_platform': ""},
   'include_dirs': [],
   'libraries': [],
   'defines': [],

But when I build with this on my x64 host and run the resulting node binary, any command (even an empty line) will cause it to infinitely loop the following message until the process is killed:

............................
> TypeError: Invalid argument type.
# 0: domain.js:169
# 1: internal/process/next_tick.js:203
# 2: timers.js:810
# 3: timers.js:768
# 4: timers.js:745

> TypeError: Invalid argument type.
# 0: domain.js:169
# 1: internal/process/next_tick.js:203
# 2: timers.js:810
# 3: timers.js:768
# 4: timers.js:745
......................................

I am filing these together in case they are related and my fix missed something. I am happy to provide my patch as a PR and file a different issue if these are unrelated.

zherczeg commented 3 years ago

My compile script uses the following arguments for the master branch:

./configure --debug --without-dtrace --without-etw --without-perfctr \
    --without-ssl --without-inspector --without-intl --without-snapshot \
    --dest-cpu x64 --without-bundled-v8

We are not actively developing the master branch (node8) anymore, we are focusing on the v14-jerry branch (node14). It is easier to configure it:

./configure --debug

We have achieved around 87% pass rate on parallel tests. Currently even if you compile a release node, all asserts are present in the code which is good for our development, but these asserts should be disabled to improve performance at some point.

diamondman commented 3 years ago

Thanks for the info. I will later try again with the other branch. Closing for now.