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

support Node.JS v12 #8

Open
jacobbubu opened this issue Jan 8, 2020 · 9 comments
Open

support Node.JS v12 #8

jacobbubu opened this issue Jan 8, 2020 · 9 comments

Comments

@jacobbubu
Copy link

It worked when I was trying to build node.js v6.5.0 but failed with node.js v12.40.0

The part of the output is following:

Traceback (most recent call last):
  File "../../deps/v8/tools/run.py", line 12, in <module>
    sys.exit(subprocess.call(sys.argv[1:]))
  File "/usr/lib/python3.6/subprocess.py", line 287, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/media/psf/vm_share/github/node/out/Release/bytecode_builtins_list_generator'
tools/v8_gypfiles/generate_bytecode_builtins_list.target.mk:13: recipe for target '/media/psf/vm_share/github/node/out/Release/obj/gen/generate-bytecode-output-root/builtins-generated/bytecodes-builtins-list.h' failed
make[1]: *** [/media/psf/vm_share/github/node/out/Release/obj/gen/generate-bytecode-output-root/builtins-generated/bytecodes-builtins-list.h] Error 1
Makefile:101: recipe for target 'node' failed
make: *** [node] Error 2
[BUILD] Build failed. See './out-bin/nodejs-android-arm64/build.log'
@nappy
Copy link

nappy commented Feb 19, 2020

I encountered the same issue and from my understanding now, its becuase bytecode_builtins_list_generator is not compiled for the host system

@nappy
Copy link

nappy commented Feb 19, 2020

There you go:

diff --git a/configure.py b/configure.py
index 473bbfeb..0453acf4 100755
--- a/configure.py
+++ b/configure.py
@@ -966,7 +966,7 @@ def configure_node(o):
                      else target_arch != host_arch)
   want_snapshots = not options.without_snapshot
   o['variables']['want_separate_host_toolset'] = int(
-      cross_compiling and want_snapshots)
+      cross_compiling)
 
   if not options.without_node_snapshot:
     o['variables']['node_use_node_snapshot'] = b(

@SwatiSonam
Copy link

I am facing the same issue while cross-compiling nodejs version 13.1.0. Above changes are already there in configure.py, it is still not working though, bytecode_builtins_list_generator is getting compiled for the target machine, can someone please help here.

@nappy
Copy link

nappy commented Aug 14, 2020

Its probably due to this change in v13.0.1: nodejs/node#30021
Either reverse that change or build with snapshots: termux/termux-packages#4762

@SwatiSonam
Copy link

Thanks for your prompt response. I tried compiling using --with-snapshots flag, still stuck with same issue (bytecode_builtins_list_generator is getting built for target machine). Could you please suggest something here?

@nappy
Copy link

nappy commented Aug 15, 2020

If you want to compile node 13 I think it would be easier to just revert this change: nodejs/node@2623ef0 and compile --without-snapshot (as long they did not any further conflicting changes). If you want to make snapshots work with cross-compiling you might want to take a closer look how termux did this, or maybe just use their binaries. I have not done this, I am still on node v12 for my android project. I would be interested in a solution once LTS switches to 14.

@SwatiSonam
Copy link

Thanks a lot for all your help and suggestions. I am able to compile nodejs 13.0 using the steps mentioned in link - https://chrislea.com/2018/08/20/cross-compiling-node-js-for-arm-on-ubuntu/

@272development
Copy link

Can you please share the version 13 compiles? arm and arm64?

Thank you greatly!

@DerGoogler
Copy link

Can you please share the version 13 compiles? arm and arm64?

Thank you greatly!

Want it too 😀

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

5 participants