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

cross compiling failed on node v16.13.1 for android aarch64 #41380

Closed
dna2github opened this issue Jan 2, 2022 · 3 comments · Fixed by #41555
Closed

cross compiling failed on node v16.13.1 for android aarch64 #41380

dna2github opened this issue Jan 2, 2022 · 3 comments · Fixed by #41555
Labels
android Issues and PRs related to the android platform. build Issues and PRs related to build files or the CI.

Comments

@dna2github
Copy link

Version

Version: v16.13.1

Platform

Linux 3.10.0-229.el7.x86_64 x86_64 GNU/Linux

Subsystem

deps/libuv

What steps will reproduce the bug?

source android-configure /path_to_ndk x86_64 24
make -j8

The Android NDK version: Linux 64-bit, download from https://developer.android.com/ndk/downloads

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

always

What is the expected behavior?

no error during the build

What do you see instead?

/node-v16.13.1/out/Release/obj.target/libuv/deps/uv/src/unix/core.o: In function `uv_run':
/node-v16.13.1/out/../deps/uv/src/unix/core.c:389: undefined reference to `uv__io_poll'
/node-v16.13.1/out/Release/obj.target/libuv/deps/uv/src/unix/core.o: In function `uv__io_close':
/node-v16.13.1/out/../deps/uv/src/unix/core.c:956: undefined reference to `uv__platform_invalidate_fd'
/node-v16.13.1/out/Release/obj.target/libuv/deps/uv/src/unix/poll.o: In function `uv_poll_init':
/node-v16.13.1/out/../deps/uv/src/unix/poll.c:74: undefined reference to `uv__io_check_fd'
/node-v16.13.1/out/Release/obj.target/libuv/deps/uv/src/unix/poll.o: In function `uv__poll_stop':
/node-v16.13.1/out/../deps/uv/src/unix/poll.c:108: undefined reference to `uv__platform_invalidate_fd'
/node-v16.13.1/out/../deps/uv/src/unix/poll.c:108: undefined reference to `uv__platform_invalidate_fd'
/node-v16.13.1/out/../deps/uv/src/unix/poll.c:108: undefined reference to `uv__platform_invalidate_fd'
/node-v16.13.1/out/Release/obj.target/libuv/deps/uv/src/unix/linux-core.o: In function `uv__platform_loop_init':
/node-v16.13.1/out/../deps/uv/src/unix/linux-core.c:90: undefined reference to `uv__epoll_init'
/node-v16.13.1/out/../deps/uv/src/unix/linux-core.c:90: undefined reference to `uv__epoll_init'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Additional information

searched for the missing functions, their definitions are all in /node-v16.13.1/deps/uv/unix/epoll.c; however, in /node-v16.13.1/out/deps/uv/libuv.target.mk, epoll.o is not in OBJS list; add epoll.o to the list and compile passed.

@Trott
Copy link
Member

Trott commented Jan 2, 2022

You probably know this, but just in case:

Android is not a supported platform. Patches to improve the Android build are welcome. There is no testing on Android in the current continuous integration environment. The participation of people dedicated and determined to improve Android building, testing, and support is encouraged.

(No problem opening an issue, though! Hopefully someone who knows something responds.)

@Mesteery Mesteery added android Issues and PRs related to the android platform. build Issues and PRs related to build files or the CI. labels Jan 3, 2022
@RaisinTen
Copy link
Contributor

I think this source list

node/deps/uv/uv.gyp

Lines 257 to 265 in f1658bd

'src/unix/linux-core.c',
'src/unix/linux-inotify.c',
'src/unix/linux-syscalls.c',
'src/unix/linux-syscalls.h',
'src/unix/pthread-fixes.c',
'src/unix/android-ifaddrs.c',
'src/unix/procfs-exepath.c',
'src/unix/random-getrandom.c',
'src/unix/random-sysctl-linux.c',

must be synced with

node/deps/uv/CMakeLists.txt

Lines 205 to 214 in f1658bd

src/unix/android-ifaddrs.c
src/unix/linux-core.c
src/unix/linux-inotify.c
src/unix/linux-syscalls.c
src/unix/procfs-exepath.c
src/unix/pthread-fixes.c
src/unix/random-getentropy.c
src/unix/random-getrandom.c
src/unix/random-sysctl-linux.c
src/unix/epoll.c)

@RaisinTen
Copy link
Contributor

I'm reopening this so that it gets automatically closed when #41555 lands.

@RaisinTen RaisinTen reopened this Jan 16, 2022
nodejs-github-bot pushed a commit that referenced this issue Jan 18, 2022
thedull pushed a commit to thedull/node that referenced this issue Jan 18, 2022
BethGriggs pushed a commit that referenced this issue Jan 25, 2022
Linkgoron pushed a commit to Linkgoron/node that referenced this issue Jan 31, 2022
danielleadams pushed a commit that referenced this issue Feb 26, 2022
danielleadams pushed a commit that referenced this issue Mar 14, 2022
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

Successfully merging a pull request may close this issue.

4 participants