-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Cross compile node-v12.* and above, compilation fails #37515
Comments
@gengjiawen |
As far as I know, our current toolchain only target on armv7 ? Will armv7 an option for you ? |
hm, we don't cross with arm64 in our CI because the native hardware we use is very fast so I can't guarantee it'll work but I don't see why not. It looks to me like a problem selecting the host compiler so you're not getting binaries that can run on your native arch. Look back through the compile output to see how You have:
Can you check that |
@gengjiawen Can you share the toolchain address of your cross-compiled node of armV7 architecture? |
Sure. But you need to know docker. |
After removing the "--with-snapshot" parameter, you can successfully cross-compile. The "--with-snapshot" parameter has certain limitations in cross-compilation |
Hello, I cross-compile the node of armV8 architecture on ubuntu20, and use the command as follows:
./configure --prefix=*/node-v12.18.3 --dest-cpu=arm64 --dest-os=linux --without-snapshot --cross-compiling --without-intl
make -j8
What steps will reproduce the bug?
(1)Use the tool chain "gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu"
(2)Import environment variables
(3)Enter the source code file of node-12.18.3 and execute:
./configure --prefix=*/node-v12.18.3 --dest-cpu=arm64 --dest-os=linux --without-snapshot --cross-compiling --without-intl
make -j8
(4)Error message appears:
LD_LIBRARY_PATH=/home/messageflow/cross_compilation_file/0000000000SeRfMgBhrc/888/888/node-v12.18.3/out/Release/lib.host:/home/messageflow/cross_compilation_file/0000000000SeRfMgBhrc/888/888/node-v12.18.3/out/Release/lib.target:$LD_LIBRARY_PATH;
export LD_LIBRARY_PATH;
cd ../tools/v8_gypfiles;
mkdir -p /home/messageflow/cross_compilation_file/0000000000SeRfMgBhrc/888/888/node-v12.18.3/out/Release/obj/gen/generate-bytecode-output-root/builtins-generated;
python ../../deps/v8/tools/run.py
"/home/messageflow/cross_compilation_file/0000000000SeRfMgBhrc/888/888/node-v12.18.3/out/Release/bytecode_builtins_list_generator"
"/home/messageflow/cross_compilation_file/0000000000SeRfMgBhrc/888/888/node-v12.18.3/out/Release/obj/gen/generate-bytecode-output-root/builtins-generated/bytecodes-builtins-list.h"
Traceback (most recent call last):
File "../../deps/v8/tools/run.py", line 12, in
sys.exit(subprocess.call(sys.argv[1:]))
File "/usr/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error
make[1]: *** [tools/v8_gypfiles/generate_bytecode_builtins_list.target.mk:13: /home/messageflow/cross_compilation_file/0000000000SeRfMgBhrc/888/888/node-v12.18.3/out/Release/obj/gen/generate-bytecode-output-root/builtins-generated/bytecodes-builtins-list.h] Error 1
make[1]: *** Waiting for unfinished jobs....
rm f2e0808c1d47bf6fdca65b88327ed0a19993d209.intermediate
make: *** [Makefile:104: node] Error 2
How often does it reproduce? Is there a required condition?
Inevitable event
What is the expected behavior?
The binary node is successfully generated in the "*/node-v12.18.3/out/Release" directory
What do you see instead?
The error message is as above
Additional information
The text was updated successfully, but these errors were encountered: