-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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 v14.x or v.15.x for android x86_64 #36287
Comments
Any chance this is related to #35520? |
I think it's not related, this is more about the linker when building the objects: mksnapshot and the v8_base_without_compiler. I suspect that the handler-inside-posix.o and handler-outside-posix.o is not compiled wiith the v8_base_without_compiler But when I hard-code to include these objects, It shown a lot of other errors on both the target and host output. I still don't know why. Btw, I'm new with build systems like GN and GYP. Any hints are welcome. Thank you. |
This seems to have become a 64 bit problem somewhere between 16.10.10 and 16.11.0 See termux/termux-packages#7710. node v16.10.10 compiles for Android aarch64 but not v16.11.0 |
Update, I was able to fix this error by using this patch
|
I patched the nodejs on our x86_64 platform and have used it for a year without any problem. Currently, I no longer maintain the build, so I can not help you to test it. Anyway, thanks for your fix @thunder-coding |
Additional changes made: - The patch `deps-v8-src-trap-handler-trap-handler.h.patch` should no longer be needed needed. This should also have been fixed nodejs/node#36287. If this PR succeeds to build, I will report that this has been fixed by nodejs/node@e3f8988#diff-f350b1b5e53caf9ecde4240ba8f544b3be4f278e4f8efa86b54c30ea625b8b1d - The libatomic hack has been removed since #3092 has been reported to have been fixed with newer NDK
api.cc |
Completely rewritten the Android build system using Python Co-Authored-By: 东灯 <43312495+Lampese@users.noreply.github.com> Co-Authored-By: Feng Yu <F3n67u@outlook.com> PR-URL: nodejs#44207 Refs: nodejs#36287 Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Christian Clauss <cclauss@me.com>
Completely rewritten the Android build system using Python Co-Authored-By: 东灯 <43312495+Lampese@users.noreply.github.com> Co-Authored-By: Feng Yu <F3n67u@outlook.com> PR-URL: nodejs/node#44207 Refs: nodejs/node#36287 Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Christian Clauss <cclauss@me.com>
Completely rewritten the Android build system using Python Co-Authored-By: 东灯 <43312495+Lampese@users.noreply.github.com> Co-Authored-By: Feng Yu <F3n67u@outlook.com> PR-URL: nodejs/node#44207 Refs: nodejs/node#36287 Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Christian Clauss <cclauss@me.com>
What steps will reproduce the bug?
The Android NDK version: Linux 64-bit (x86) r21, download from https://developer.android.com/ndk/downloads
How often does it reproduce? Is there a required condition?
The build always stuck as below state.
What is the expected behavior?
Build without error
What do you see instead?
Additional information
I noted that in v8_base_without_compiler build config at deps/v8/BUILD.gn, EnableTrapHandler and RegisterDefaultTrapHandler are defined for Linux and x64 platform, but I don't see it generated in out/tools/v8_gypfiles/v8_base_without_compiler.target(host).mk (even I change the condition to always true)
I wonder is this an expected behavior?
I fixed it temporarily by disabling undefined code paths and the node can work normally in the target platform.
I wonder if there are any further issues if I do this.
Thanks
The text was updated successfully, but these errors were encountered: