-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Build fails when cross compiling v12.x host x86-64 to arm #32717
Comments
Does it work when you install qemu-user? |
Having said that, our cross-compile job doesn't use qemu-user and works okay - |
Hi bnordhuis, I tested the qemu-user-static and it still fail. I installed it with the command bellow and set those to crosscompile script export AR_host="${HOST_PREFIX_ARM}ar" The bytecode_builtins_list_generator executable is still build by target toochain and now the build fail with the error message bellow: In additional to, I can cross compile node v8.17.0 successfully in the previous environment without any modification. |
I was needing to
|
same issue, I tried the above suggestions and still encountered the problem. Anyone can give me more suggestions, thanks in advance. |
I am facing the same issue while building nodejs version 13.1.0, can anyone help me here. |
It seems like there really should be a script that one can run to do this configure and build correctly. I know there are several options around the target processor. But a make target set or something really could be crafted around those details so that the right things could be done, and this could be tested on each release for the set of combinations known at each release point. Adding more combinations over time would then be a natural process. |
We are improving this on #35252. Please stay tuned. |
A sample build: https://github.com/gengjiawen/node-github-workflow/runs/1970162330?check_suite_focus=true I have tested on v15, not sure v12, let's take a look. |
Change the host system ,use Ubuntu to try ? |
The problem is The value comes from https://github.com/nodejs/node/blob/v12.22.12/configure.py#L1059 want_snapshots = not options.without_snapshot
o['variables']['want_separate_host_toolset'] = int(
cross_compiling and want_snapshots) Setting Removing By reading this comment, I was under the impression that Update: some related comment that comes to the same conclusion imyller/meta-nodejs#31 (comment) |
I confirm it works with the Android NDK r25b and apt-get update && apt-get install -y python gcc g++ gcc-multilib g++-multilib
export AR="ar"
export AR_host="ar"
export AR_target="llvm-ar"
export CC="gcc -m32"
export CC_host="gcc -m32"
export CC_target="armv7a-linux-androideabi24-clang"
export CXX="g++ -m32"
export CXX_host="g++ -m32"
export CXX_target="armv7a-linux-androideabi24-clang++"
export GYP_DEFINES="target_arch=arm v8_target_arch=arm android_target_arch=arm host_os=linux OS=android"
./configure --dest-cpu=arm --dest-os=android --openssl-no-asm --cross-compiling --shared --without-intl --without-npm
make -j$(nproc) |
I am trying to cross compile node v12.16.1 for arm. It appears that part of the build process is to build the bytecode_builtins_list_generator executable that will be used in the host machine to create header files dynamically. However the build process is using target compiler instead of host compiler where the final binary can not to be executed in the host machine.
bytecode_builtins_list_generator: node/out/Release/bytecode_builtins_list_generator: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=27e85c210648cdd73a0e84e1c367c3915259ff85, not stripped
compiler: arm-linux-gnueabi-g++ version 5.5.0
Host Platform: Linux 4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Target Platform: -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon
Node version: v12.16.1
Configure: ./configure --prefix=/work/deploy/node --shared --cross-compiling --shared-openssl --with-arm-fpu=neon --with-arm-float-abi=softfp --shared-openssl-includes=
/work/sdk/openssl/1.0.2s/include/ --shared-openssl-libname=crypto,ssl --shared-openssl-libpath=/work/sdk/openssl/1.0.2s/lib/
--dest-cpu=arm --dest-os=linux --without-snapshot --without-node-snapshot --without-report --without-dtrace --without-etw --without-npm --no-browser-globals --wi
thout-inspector --without-intl
config.gypi
########################################################
Do not edit. Generated by the configure script.
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [ '/work/sdk/openssl/1.0.2s/include/'],
'libraries': [ '-L/work/sdk/include/oss/openssl/1.0.2s/lib/',
'-lcrypto',
'-lssl']},
'variables': { 'arm_float_abi': 'softfp',
'arm_fpu': 'neon',
'arm_thumb': 0,
'arm_version': '7',
'asan': 0,
'build_v8_with_gn': 'false',
'coverage': 'false',
'debug_nghttp2': 'false',
'enable_lto': 'false',
'enable_pgo_generate': 'false',
'enable_pgo_use': 'false',
'force_dynamic_crt': 1,
'host_arch': 'x64',
'icu_small': 'false',
'is_debug': 0,
'llvm_version': '0.0',
'napi_build_version': '5',
'node_byteorder': 'little',
'node_debug_lib': 'false',
'node_enable_d8': 'false',
'node_install_npm': 'false',
'node_module_version': 72,
'node_no_browser_globals': 'true',
'node_prefix': '/work/deploy/node',
'node_release_urlbase': '',
'node_report': 'false',
'node_shared': 'true',
'node_shared_cares': 'false',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_nghttp2': 'false',
'node_shared_openssl': 'true',
'node_shared_zlib': 'false',
'node_tag': '',
'node_target_type': 'shared_library',
'node_use_bundled_v8': 'true',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_large_pages': 'false',
'node_use_large_pages_script_lld': 'false',
'node_use_node_code_cache': 'false',
'node_use_node_snapshot': 'false',
'node_use_openssl': 'true',
'node_use_v8_platform': 'true',
'node_with_ltcg': 'false',
'node_without_node_options': 'false',
'openssl_fips': '',
'openssl_is_fips': 'false',
'shlib_suffix': 'so.72',
'target_arch': 'arm',
'v8_enable_gdbjit': 0,
'v8_enable_i18n_support': 0,
'v8_enable_inspector': 0,
'v8_no_strict_aliasing': 1,
'v8_optimized_debug': 1,
'v8_promise_internal_field_count': 1,
'v8_random_seed': 0,
'v8_trace_maps': 0,
'v8_use_siphash': 1,
'v8_use_snapshot': 0,
'want_separate_host_toolset': 0}}
error message:
The text was updated successfully, but these errors were encountered: