Sitelet https://github.com/nodejs/node/issues/49766
Skip to content

[deps/zlib] Android arm64 build fails due to missing cpufeatures library #49766

Description

@MatteoBax

When I compile the aarch64 Android project I get:

./deps/zlib/cpu_features.c:43:10: fatal error: 'cpu-features.h' file not found
#include <cpu-features.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [deps/zlib/zlib.target.mk:127: /workspaces/codespaces-blank/node/out/Release/obj.target/zlib/deps/zlib/cpu_features.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../deps/zlib/deflate.c:2003:31: warning: comparison of integers of different signs: 'IPos' (aka 'unsigned int') and 'int' [-Wsign-compare]
            if (s->prev_match == -1) {
                ~~~~~~~~~~~~~ ^  ~~
ar crsT /workspaces/codespaces-blank/node/out/Release/obj.target/deps/openssl/libopenssl.a @/workspaces/codespaces-blank/node/out/Release/obj.target/deps/openssl/libopenssl.a.ar-file-list
1 warning generated.
rm ba2e713c65e96ba2093f69b541eaf18cf990bba7.intermediate baa44214685e5f3e204d864ab741a526ee533e52.intermediate
make: *** [Makefile:134: node] Error 2

The commands I run to compile the project are:
./android-configure /home/codespace/Android/android-ndk-r26 31 aarch64
make -j4

Activity

  1. bnoordhuis commented on Sep 22, 2023

    @bnoordhuis
    Member

    Google for "android cpu-features.h not found" - people hit this across various OSS projects and it's always some NDK setup issue.

    I'm going to close this because a) it's not an issue with node itself, and b) android is not a supported platform, meaning: patches welcome but you're on your own if it doesn't work. Good luck.

  2. added
    androidIssues and PRs related to the Android platform.
    on Sep 22, 2023
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.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions