asdf-vm / asdf-nodejs

Node.js plugin for asdf version manager
https://github.com/asdf-vm/asdf
MIT License
908 stars 144 forks source link

Error installing node v15.14.0 on apple arm #398

Open robertwt7 opened 2 months ago

robertwt7 commented 2 months ago

it's weird that this is only happening for node v15.14.0 however, mine failed in the end when trying to compile. this is on macos 14.6.1 on arm (m3). Not sure if this is happening for everyone else?

This is the error when compiling with node-build:

In file included from ../deps/v8/src/compiler/backend/instruction-scheduler.cc:5:
In file included from ../deps/v8/src/compiler/backend/instruction-scheduler.h:9:
In file included from ../deps/v8/src/compiler/backend/instruction.h:14:
In file included from ../deps/v8/src/codegen/external-reference.h:9:
In file included from ../deps/v8/src/runtime/runtime.h:11:
../deps/v8/src/base/bit-field.h:43:29: error: integer value 3 is outside the valid range of values [0, 1]
for this enumeration type [-Wenum-constexpr-conversion]
  static constexpr T kMax = static_cast<T>(kNumValues - 1);
                            ^
../deps/v8/src/base/bit-field.h:43:29: error: integer value 31 is outside the valid range of values [0, 15
] for this enumeration type [-Wenum-constexpr-conversion]
../deps/v8/src/base/bit-field.h:43:29: error: integer value 7 is outside the valid range of values [0, 3]
for this enumeration type [-Wenum-constexpr-conversion]
2 errors generated.
make[1]: *** [/private/var/folders/8f/g5qfjjhx4h96gvt7jp17yzy00000gn/T/node-build.20240904125241.3657.C24p
70/node-v15.14.0/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/backend/instruction-scheduler.o]
Error 1
2 warnings and 1 error generated.
make[1]: *** [/private/var/folders/8f/g5qfjjhx4h96gvt7jp17yzy00000gn/T/node-build.20240904125241.3657.C24p
70/node-v15.14.0/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/access-builder.o] Error 1
2 warnings and 1 error generated.
make[1]: *** [/private/var/folders/8f/g5qfjjhx4h96gvt7jp17yzy00000gn/T/node-build.20240904125241.3657.C24p
70/node-v15.14.0/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/access-info.o] Error 1
3 errors generated.
make[1]: *** [/private/var/folders/8f/g5qfjjhx4h96gvt7jp17yzy00000gn/T/node-build.20240904125241.3657.C24p
70/node-v15.14.0/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/backend/code-generator.o] Error 1
rm 67320f2e72764f2ed9091841e2d29adad8a94c02.intermediate 43eeddd5adf5bf84e8e9df1e02a6210e9fafa0a1.intermed
iate 9119334d82d195298835b84a8ddfeb14b3b615df.intermediate
make: *** [node] Error 2

BUILD FAILED (macOS 14.6.1 using node-build 5.3.10)

This might be related to #189, it doesn't happen for any other node version above 16 since they all have their own binary. but building it from scratch gives me a similar error like what someone is experiencing when building node v14 on sillicon.

The current workaround is to change the arch: arch -x86_64 asdf install nodejs 15.14.0

However it seems like node v15 should already supports arm and the installation works in nvm without workaround