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

Error Compiling Node.js v20.2.0 for Android (x86_64) using android-ndk-r25c #54919

Open
HiconKong opened this issue Sep 13, 2024 · 6 comments
Open
Labels
android Issues and PRs related to the android platform. build Issues and PRs related to build files or the CI.

Comments

@HiconKong
Copy link

HiconKong commented Sep 13, 2024

Version

v20.2.0

Platform

Docker From Ubuntu:20.04

Linux fc67e7bf1d76 5.15.0-101-generic #111~20.04.1-Ubuntu SMP Mon Mar 11 15:44:43 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

./android-configure /workspace/android-ndk-r25c 24 x86_64
make

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

all building steps works fine,and generate node binaray at out/Release

What do you see instead?

/workspace/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang -o /workspace/node/out/Release/obj.host/genccode/deps/icu-small/source/tools/genccode/genccode.o ../deps/icu-small/source/tools/genccode/genccode.c '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DNODE_OPENSSL_HAS_QUIC' '-DICU_NO_USER_DATA_OVERRIDE' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/tools/toolutil  -Wall -Wextra -Wno-unused-parameter -m64 -pthread -O3 -fno-omit-frame-pointer -fPIC  -MMD -MF /workspace/node/out/Release/.deps//workspace/node/out/Release/obj.host/genccode/deps/icu-small/source/tools/genccode/genccode.o.d.raw   -c
  /workspace/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang++ -rdynamic -m64 -pthread -fPIC  -o /workspace/node/out/Release/genccode -Wl,--start-group /workspace/node/out/Release/obj.host/genccode/deps/icu-small/source/tools/genccode/genccode.o /workspace/node/out/Release/obj.host/genccode/tools/icu/no-op.o /workspace/node/out/Release/obj.host/tools/icu/libicutools.a -Wl,--end-group 
  LD_LIBRARY_PATH=/workspace/node/out/Release/lib.host:/workspace/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../tools/icu; mkdir -p /workspace/node/out/Release/obj/gen; "/workspace/node/out/Release/icupkg" -tl ../../deps/icu-tmp/icudt73l.dat "/workspace/node/out/Release/obj/gen/icudt73l.dat"
/bin/sh: 1: /workspace/node/out/Release/icupkg: not found
make[1]: *** [tools/icu/icudata.target.mk:13: /workspace/node/out/Release/obj/gen/icudt73l.dat] Error 127
make: *** [Makefile:134: node] Error 2

Additional information

image

@RedYetiDev RedYetiDev added build Issues and PRs related to build files or the CI. android Issues and PRs related to the android platform. labels Sep 13, 2024
@RedYetiDev
Copy link
Member

Is this reproducible on the main branch?

@HiconKong
Copy link
Author

no, i checkout main branch, and error different
image

build steps:
1../android-configure /workspace/android-ndk-r25c 24 x86_64
2.make

@RedYetiDev
Copy link
Member

Can you provide the error as a textual output; rather than a screenshot?

@HiconKong
Copy link
Author

Hi,currently i get error:
`WARNING: linker: Warning: failed to find generated linker configuration from "/linkerconfig/ld.config.txt"
CANNOT LINK EXECUTABLE "/workspace/node/out/Release/torque": library "libdl.so" not found: needed by main executable
linker: CANNOT LINK EXECUTABLE "/workspace/node/out/Release/torque": library "libdl.so" not found: needed by main executable

make[1]: *** [tools/v8_gypfiles/run_torque.target.mk:17: 010fc3fce712b2de6fd928cc15b58656333c3aaf.intermediate] Error 1
rm 010fc3fce712b2de6fd928cc15b58656333c3aaf.intermediate 637454bf7bda9fb424d235143ccd28cd1a54c56d.intermediate
make: *** [Makefile:137: node] Error 2
root@fc67e7bf1d76:/workspace/node# ./out/Release/node -V
linker: Warning: failed to find generated linker configuration from "/linkerconfig/ld.config.txt"
WARNING: linker: Warning: failed to find generated linker configuration from "/linkerconfig/ld.config.txt"
CANNOT LINK EXECUTABLE "./out/Release/node": library "libm.so" not found: needed by main executable
linker: CANNOT LINK EXECUTABLE "./out/Release/node": library "libm.so" not found: needed by main executable`

@RedYetiDev
Copy link
Member

@nodejs/build WDYT

@richardlau
Copy link
Member

richardlau commented Sep 18, 2024

@nodejs/build WDYT

Android is an unsupported platform: https://github.com/nodejs/node/blob/v20.2.0/BUILDING.md#android
I suspect there isn't much knowledge/experience around it among the collaborators.
I have no objections to keeping the issue open to source help/potential solutions from the wider ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Issues and PRs related to the android platform. build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

3 participants