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

Android build failed #49739

Closed
MatteoBax opened this issue Sep 20, 2023 · 6 comments · Fixed by #49744
Closed

Android build failed #49739

MatteoBax opened this issue Sep 20, 2023 · 6 comments · Fixed by #49744
Labels
android Issues and PRs related to the android platform. build Issues and PRs related to build files or the CI.

Comments

@MatteoBax
Copy link
Contributor

MatteoBax commented Sep 20, 2023

Hi,
when I try to build Node.js (version 20.7.0) for the Android platform I get:

./android-configure /workspaces/codespaces-blank/android-ndk-r26 31 aarch64
Node.js android configure: Found Python 3.10.8...
Info: Configuring for arm64...
Node.js configure: Found Python 3.10.8...
WARNING: --openssl-no-asm will result in binaries that do not take advantage
         of modern CPU cryptographic instructions and will therefore be slower.
         Please refer to BUILDING.md
WARNING: warnings were emitted in the configure phase
INFO: configure completed successfully

make -j4 
make[1]: *** No rule to make target '/workspaces/codespaces-blank/node-v20.7.0/out/Release/obj.host/libuv/deps/uv/src/unix/pthread-fixes.o', needed by '/workspaces/codespaces-blank/node-v20.7.0/out/Release/obj.host/deps/uv/libuv.a'.  Stop.
make[1]: *** Waiting for unfinished jobs....
  /workspaces/codespaces-blank/android-ndk-r26/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang -o /workspaces/codespaces-blank/node-v20.7.0/out/Release/obj.host/libuv/deps/uv/src/unix/procfs-exepath.o ../deps/uv/src/unix/procfs-exepath.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' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' -I../deps/uv/include -I../deps/uv/src  -msign-return-address=all -Wall -Wextra -Wno-unused-parameter -fvisibility=hidden -g --std=gnu89 -Wall -Wextra -Wno-unused-parameter -Wstrict-prototypes -fno-strict-aliasing -pthread -O3 -fno-omit-frame-pointer -fPIC  -MMD -MF /workspaces/codespaces-blank/node-v20.7.0/out/Release/.deps//workspaces/codespaces-blank/node-v20.7.0/out/Release/obj.host/libuv/deps/uv/src/unix/procfs-exepath.o.d.raw   -c
make: *** [Makefile:134: node] Error 2

How can I solve it?

@tniessen tniessen added build Issues and PRs related to build files or the CI. android Issues and PRs related to the android platform. labels Sep 20, 2023
bnoordhuis added a commit to bnoordhuis/io.js that referenced this issue Sep 21, 2023
The file was removed in the latest libuv upgrade. Remove it from the
build recipe as well.

Fixes: nodejs#49739
bnoordhuis added a commit to bnoordhuis/io.js that referenced this issue Sep 21, 2023
The file was removed in the latest libuv upgrade. Remove it from the
build recipe as well.

Fixes: nodejs#49739
@bnoordhuis
Copy link
Member

Here you go: #49744

@MatteoBax
Copy link
Contributor Author

MatteoBax commented Sep 21, 2023

I edited the "deps/uv/uv.gyp" file as described in the pull request #49744 but now the problem is:

../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....
rm ba2e713c65e96ba2093f69b541eaf18cf990bba7.intermediate baa44214685e5f3e204d864ab741a526ee533e52.intermediate
make: *** [Makefile:134: node] Error 2

The file "/workspaces/codespaces-blank/android-ndk-r26/sources/android/cpufeatures/cpu-features.h" exist.

@bnoordhuis
Copy link
Member

There's something wrong with your local copy, that's not the deps/zlib/cpu_features.c from v20.7.0. The header file is called cpu_features.h (note underscore vs. dash) and that's what cpu_features.c includes.

@MatteoBax
Copy link
Contributor Author

MatteoBax commented Sep 21, 2023

I redownloaded the Node.js (v20.7.0) source but it still gives me the same error.

On line 43 of cpu_features.c:
#include <cpu-features.h>

@bnoordhuis
Copy link
Member

Oh, I was looking at the wrong line. Problem with your SDK install, can't help you with that.

@MatteoBax
Copy link
Contributor Author

MatteoBax commented Sep 22, 2023

I opened another issue because I can't resolve the problem.

nodejs-github-bot pushed a commit that referenced this issue Sep 23, 2023
The file was removed in the latest libuv upgrade. Remove it from the
build recipe as well.

Fixes: #49739
PR-URL: #49744
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
ruyadorno pushed a commit that referenced this issue Sep 28, 2023
The file was removed in the latest libuv upgrade. Remove it from the
build recipe as well.

Fixes: #49739
PR-URL: #49744
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
alexfernandez pushed a commit to alexfernandez/node that referenced this issue Nov 1, 2023
The file was removed in the latest libuv upgrade. Remove it from the
build recipe as well.

Fixes: nodejs#49739
PR-URL: nodejs#49744
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
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.

3 participants