Skip to content

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

Description

@dna2github

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.

Activity

  1. Trott commented on Jan 2, 2022

    @Trott
    Member

    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.)

  2. added
    androidIssues and PRs related to the Android platform.
    buildIssues and PRs related to Node.js builds or CI infrastructure.
    on Jan 3, 2022
  3. RaisinTen commented on Jan 3, 2022

    @RaisinTen
    Member

    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)

  4. RaisinTen commented on Jan 16, 2022

    @RaisinTen
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidIssues and PRs related to the Android platform.buildIssues and PRs related to Node.js builds or CI infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions