nodejs-mobile / nodejs-mobile

Full-fledged Node.js on Android and iOS
https://nodejs-mobile.github.io
Other
466 stars 46 forks source link

Building failed on MacOS with M2 chip #15

Closed icezohu closed 1 year ago

icezohu commented 1 year ago

Version

v12.18.0

Platform

Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020 arm64

Subsystem

No response

What steps will reproduce the bug?

running command ./tools/android_build.sh /Users/xxx/workspace/src/android/android-ndk-r21b x 23

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

No response

What is the expected behavior?

No response

What do you see instead?

../deps/v8/src/base/build_config.h:149:2: error: Target architecture arm is only supported on arm and ia32 host

error Target architecture arm is only supported on arm and ia32 host

^ 1 error generated. make[1]: [/Users/xxx/workspace/src/github/nodejs-mobile/out/Release/obj.host/v8_libplatform/deps/v8/src/libplatform/default-foreground-task-runner.o] Error 1 make[1]: Waiting for unfinished jobs.... rm e511a75fd2bf4d0c2878fbf52807e735e0b8c40d.intermediate 80bcc6442d7097f99b623da031fcca34999be784.intermediate make: *** [node] Error 2

Additional information

No response

staltz commented 1 year ago

As the error says, "Target architecture arm is only supported on arm and ia32 host". This is a limitation imposed by V8 inside Node.js. You cannot build for arm(v7) from an arm64 computer.

icezohu commented 1 year ago

As the error says, "Target architecture arm is only supported on arm and ia32 host". This is a limitation imposed by V8 inside Node.js. You cannot build for arm(v7) from an arm64 computer.

Thank you for the infomation