You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can not build with Node 22 on Apple Silicon, while it was working fine with Node 20
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@22.0.0 | darwin | arm64
..
..
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o
CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o
LIBTOOL-STATIC Release/cpu_features.a
CXX(target) Release/obj.target/cpufeatures/src/binding.o
In file included from ../src/binding.cc:3:
../../nan/nan.h:2546:8: error: no matching member function for call to 'SetAccessor'
tpl->SetAccessor(
~~~~~^~~~~~~~~~~
/Users/nazar/Library/Caches/node-gyp/22.0.0/include/node/v8-template.h:1055:8: note: candidate function not viable: no known conversion from 'v8::AccessControl' to 'PropertyAttribute' for 5th argument
void SetAccessor(
^
/Users/nazar/Library/Caches/node-gyp/22.0.0/include/node/v8-template.h:1049:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'AccessorGetterCallback' (aka 'void (*)(Local<String>, const PropertyCallbackInfo<Value> &)') for 2nd argument
void SetAccessor(
^
In file included from ../src/binding.cc:3:
../../nan/nan.h:2592:8: error: no matching member function for call to 'SetAccessor'
tpl->SetAccessor(
~~~~~^~~~~~~~~~~
/Users/nazar/Library/Caches/node-gyp/22.0.0/include/node/v8-template.h:1055:8: note: candidate function not viable: no known conversion from 'v8::AccessControl' to 'PropertyAttribute' for 5th argument
void SetAccessor(
^
/Users/nazar/Library/Caches/node-gyp/22.0.0/include/node/v8-template.h:1049:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'AccessorGetterCallback' (aka 'void (*)(Local<String>, const PropertyCallbackInfo<Value> &)') for 2nd argument
void SetAccessor(
^
In file included from ../src/binding.cc:1:
In file included from /Users/nazar/Library/Caches/node-gyp/22.0.0/include/node/node.h:73:
In file included from /Users/nazar/Library/Caches/node-gyp/22.0.0/include/node/v8.h:24:
In file included from /Users/nazar/Library/Caches/node-gyp/22.0.0/include/node/v8-array-buffer.h:12:
/Users/nazar/Library/Caches/node-gyp/22.0.0/include/node/v8-local-handle.h:269:5: error: static assertion failed due to requirement 'std::is_base_of<v8::Value, v8::Data>::value': type check
static_assert(std::is_base_of<T, S>::value, \"type check\");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan_callbacks_12_inl.h:175:20: note: in instantiation of function template specialization 'v8::Local<v8::Value>::Local<v8::Data>' requested here
cbinfo(info, obj->GetInternalField(kDataIndex));
^
3 errors generated.
make: *** [Release/obj.target/cpufeatures/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/Users/nazar/Hub/project/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Darwin 23.4.0
gyp ERR! command \"/Users/nazar/.asdf/installs/nodejs/22.0.0/bin/node\" \"/Users/nazar/Hub/project/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/nazar/Hub/project/node_modules/cpu-features
The text was updated successfully, but these errors were encountered:
@mscdex Tried setting package via commit hash "git+ssh://git@github.com/mscdex/cpu-features.git#76160ec" and still get the same build error. Please re-open this issue.
It's working in CI, so I'm not sure what to tell you.
Make sure there isn't something weird with your local setup. The errors were fixed with nan v2.19.0 and this package is now requiring v2.19.0 or newer.
Can not build with Node 22 on Apple Silicon, while it was working fine with Node 20
The text was updated successfully, but these errors were encountered: