-
Notifications
You must be signed in to change notification settings - Fork 167
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
ARM cross-compile does not use v8 snapshots #266
Comments
Only if you have an emulator. What the snapshot does is compile and execute JS to native machine code, then save the generated machine code to an image. |
qemu? |
Also a question how does V8 handle this? I'm sure that Google cross-compiles it for arm. cc @ofrobots |
There is some documentation about this here: https://github.com/v8/v8/wiki/Cross-compiling%20for%20ARM |
@targos I'm afraid that this page is very likely to be outdated. V8 does not use |
@orangemocha is there any way to check that |
It looks like it was |
Wait, are we cross-compiling there? Or is it an actual raspberry pi? |
Looking output: Building remotely on node-msft-cross-compiler-1 (cross-compiler-pi1p) in workspace /home/iojs/build/workspace/node-cross-compile/nodes/cross-compiler-pi1p The job ran on https://ci.nodejs.org/computer/node-msft-cross-compiler-1/ which is described as "Ubuntu 14.04 LTS with Raspberry Pi cross compiler installed", so I would say this is a cross-compilation. |
This is a config.gypi:
For some reason |
Indeed. Odd. |
Definitely cross-compiling. Better get the nitty gritty details from @joaocgreis, who set this up and also did some experiments with qemu. |
I think @indutny might be right. The job seem to be doing a
|
I believe I have this working now and will be able to re-enable snapshots when nodejs/node#4117 lands. V8 can handle cross compiling of snapshots if the |
nodejs/node#4117 has landed and CI is building snapshots for arm now: https://ci.nodejs.org/job/node-test-commit-arm-fanned/768/ . I will close this for now, please reopen if there are issues. |
It's still failed when building v5.4.1 on ubuntu 14.04 for android make[1]: ** [/home/kiki/node.js/node-v5.4.1/out/Release/obj.target/v8_snapshot/geni/snapshot.cc] Error 2 { 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'OS': 'android',
'arm_float_abi': 'default',
'arm_fpu': 'vfpv3',
'arm_thumb': 0,
'arm_version': '7',
'asan': 0,
'gas_version': '2.24',
'host_arch': 'arm',
'icu_small': 'false',
'node_byteorder': 'little',
'node_enable_v8_vtunejit': 'false',
'node_install_npm': 'true',
'node_prefix': '/usr/local',
'node_release_urlbase': '',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_openssl': 'false',
'node_shared_zlib': 'false',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_lttng': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'openssl_fips': '',
'openssl_no_asm': 0,
'python': '/home/kiki/node.js/node-v5.4.1/android-toolchain/bin/python',
'target_arch': 'arm',
'v8_enable_gdbjit': 0,
'v8_enable_i18n_support': 0,
'v8_no_strict_aliasing': 1,
'v8_optimized_debug': 0,
'v8_random_seed': 0,
'v8_use_snapshot': 'true',
'want_separate_host_toolset': 0}} |
I have to modified android-configure to pass --without-snapshot to configure.
|
@kikijhu Instead of adding
I don't have the Android NDK here for a quick test, so let us know if this works. Thanks! |
@joaocgreis When setting How should |
GYP uses the variables @fornwall Perhaps the best way is not using the
|
I add these lines to ./android-configure
Build failed again.
|
Hi all, I have same problems during crossing compile node.js.
Following texts are a part of crossing compile nodejs's message.
|
Should a new issue be created for |
Discussion moved to nodejs/node#4860 |
I am seeing this issue cross-compiling for Linux on ARM (but NOT Android). I'm using the following commands:
Per the above suggestion, I also tried adding:
I'm not sure I understand what the fix for this is supposed to be. Is there something I am doing wrong, or is this a bug? |
@michael-ts I think this is the issue to track: nodejs/node#9707 |
@fornwall Ah, i see they are using |
@michael-ts Are you building node 6.x or 7.x? |
@fornwall 6.9.1 |
nodejs/node#3962 enabled snapshots in Node however this doesn't seem to work with the ARM cross-compiler, as seen in https://ci.nodejs.org/job/node-cross-compile/588/nodes=cross-compiler-pi1p/console
I changed the node-cross-compile to pass
--without-snapshot
toconfigure
, so that we can continue running CI while we figure the best long-term approach.A few questions:
/cc @nodejs/build
The text was updated successfully, but these errors were encountered: