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

node-gyp rebuild command failure #3056

Open
shahraship opened this issue Aug 7, 2024 · 1 comment
Open

node-gyp rebuild command failure #3056

shahraship opened this issue Aug 7, 2024 · 1 comment
Labels

Comments

@shahraship
Copy link

  • Node Version: 20.11.1, 10.8.2

  • Platform: Darwin uname-mbp-2.lan 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 arm64

  • Compiler: Apple clang version 15.0.0 (clang-1500.3.9.4)
    Target: arm64-apple-darwin23.5.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

  • Module: node-gyp rebuild

> electron-builder install-app-deps
  • electron-builder  version=24.13.3
  • rebuilding native dependencies  [email protected] platform=darwin arch=arm64
  ⨯ cannot execute  cause=exit status 1
                    errorOut=npm error code 1
    npm error path /Users/devuname/Developer/repo-name/node_modules/cpu-features
    npm error command failed
    npm error command sh -c node buildcheck.js > buildcheck.gypi && node-gyp rebuild
    npm error CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o
    npm error   LIBTOOL-STATIC Release/cpu_features.a
    npm error   CXX(target) Release/obj.target/cpufeatures/src/binding.o
    npm error gyp info it worked if it ends with ok
    npm error gyp info using [email protected]
    npm error gyp info using [email protected] | darwin | arm64
    npm error gyp info find Python using Python version 3.11.6 found at "/opt/homebrew/opt/[email protected]/bin/python3.11"
    npm error gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.11
    npm error gyp info spawn args [
    npm error gyp info spawn args '/Users/devuname/Developer/repo-name/node_modules/node-gyp/gyp/gyp_main.py',
    npm error gyp info spawn args 'binding.gyp',
    npm error gyp info spawn args '-f',
    npm error gyp info spawn args 'make',
    npm error gyp info spawn args '-I',
    npm error gyp info spawn args '/Users/devuname/Developer/repo-name/node_modules/cpu-features/build/config.gypi',
    npm error gyp info spawn args '-I',
    npm error gyp info spawn args '/Users/devuname/Developer/repo-name/node_modules/node-gyp/addon.gypi',
    npm error gyp info spawn args '-I',
    npm error gyp info spawn args '/Users/devuname/.electron-gyp/28.3.3/include/node/common.gypi',
    npm error gyp info spawn args '-Dlibrary=shared_library',
    npm error gyp info spawn args '-Dvisibility=default',
    npm error gyp info spawn args '-Dnode_root_dir=/Users/devuname/.electron-gyp/28.3.3',
    npm error gyp info spawn args '-Dnode_gyp_dir=/Users/devuname/Developer/repo-name/node_modules/node-gyp',
    npm error gyp info spawn args '-Dnode_lib_file=/Users/devuname/.electron-gyp/28.3.3/<(target_arch)/node.lib',
    npm error gyp info spawn args '-Dmodule_root_dir=/Users/devuname/Developer/repo-name/node_modules/cpu-features',
    npm error gyp info spawn args '-Dnode_engine=v8',
    npm error gyp info spawn args '--depth=.',
    npm error gyp info spawn args '--no-parallel',
    npm error gyp info spawn args '--generator-output',
    npm error gyp info spawn args 'build',
    npm error gyp info spawn args '-Goutput_dir=.'
    npm error gyp info spawn args ]
    npm error gyp info spawn make
    npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    npm error In file included from ../src/binding.cc:3:
    npm error ../../nan/nan.h:688:39: warning: 'IdleNotificationDeadline' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
    npm error     return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
    npm error                                       ^
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-isolate.h:1343:3: note: 'IdleNotificationDeadline' has been explicitly marked deprecated here
    npm error   V8_DEPRECATE_SOON(
    npm error   ^
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8config.h:561:41: note: expanded from macro 'V8_DEPRECATE_SOON'
    npm error #   define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
    npm error                                         ^
    npm error In file included from ../src/binding.cc:3:
    npm error ../../nan/nan.h:2548:8: error: no matching member function for call to 'SetAccessor'
    npm error   tpl->SetAccessor(
    npm error   ~~~~~^~~~~~~~~~~
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'v8::PropertyAttribute' to 'AccessControl' for 5th argument
    npm error   void SetAccessor(
    npm error        ^
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-template.h:809: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
    npm error   void SetAccessor(
    npm error        ^
    npm error In file included from ../src/binding.cc:3:
    npm error ../../nan/nan.h:2596:8: error: no matching member function for call to 'SetAccessor'
    npm error   tpl->SetAccessor(
    npm error   ~~~~~^~~~~~~~~~~
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'v8::PropertyAttribute' to 'AccessControl' for 5th argument
    npm error   void SetAccessor(
    npm error        ^
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-template.h:809: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
    npm error   void SetAccessor(
    npm error        ^
    npm error 1 warning and 2 errors generated.
    npm error make: *** [Release/obj.target/cpufeatures/src/binding.o] Error 1
    npm error gyp ERR! build error 
    npm error gyp ERR! stack Error: `make` failed with exit code: 2
    npm error gyp ERR! stack at ChildProcess.<anonymous> (/Users/devuname/Developer/repo-name/node_modules/node-gyp/lib/build.js:209:23)
    npm error gyp ERR! System Darwin 23.5.0
    npm error gyp ERR! command "/Users/devuname/.nvm/versions/node/v20.11.1/bin/node" "/Users/devuname/Developer/repo-name/node_modules/.bin/node-gyp" "rebuild"
    npm error gyp ERR! cwd /Users/devuname/Developer/repo-name/node_modules/cpu-features
    npm error gyp ERR! node -v v20.11.1
    npm error gyp ERR! node-gyp -v v10.1.0
    npm error gyp ERR! not ok
    npm error A complete log of this run can be found in: /Users/devuname/.npm/_logs/2024-08-06T16_16_44_793Z-debug-0.log
    
                    command=/Users/devuname/.nvm/versions/node/v20.11.1/bin/node /Users/devuname/.nvm/versions/node/v20.11.1/lib/node_modules/npm/bin/npm-cli.js rebuild [email protected]
                    workingDir=
npm error code 1
npm error path /Users/devuname/Developer/repo-name
npm error command failed
npm error command sh -c electron-builder install-app-deps
npm error A complete log of this run can be found in: /Users/devuname/.npm/_logs/2024-08-06T16_16_02_575Z-debug-0.log

Upgraded the node-gyp version to 10.2.0 as well and had similar error

> electron-builder install-app-deps

  • electron-builder  version=24.13.3
  • rebuilding native dependencies  [email protected] platform=darwin arch=arm64
  ⨯ cannot execute  cause=exit status 1
                    errorOut=npm error code 1
    npm error path /Users/devuname/Developer/repo-name/node_modules/cpu-features
    npm error command failed
    npm error command sh -c node buildcheck.js > buildcheck.gypi && node-gyp rebuild
    npm error CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o
    npm error   CC(target) Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o
    npm error   LIBTOOL-STATIC Release/cpu_features.a
    npm error   CXX(target) Release/obj.target/cpufeatures/src/binding.o
    npm error gyp info it worked if it ends with ok
    npm error gyp info using [email protected]
    npm error gyp info using [email protected] | darwin | arm64
    npm error gyp info find Python using Python version 3.11.6 found at "/opt/homebrew/opt/[email protected]/bin/python3.11"
    npm error gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.11
    npm error gyp info spawn args [
    npm error gyp info spawn args '/Users/devuname/Developer/repo-name/node_modules/node-gyp/gyp/gyp_main.py',
    npm error gyp info spawn args 'binding.gyp',
    npm error gyp info spawn args '-f',
    npm error gyp info spawn args 'make',
    npm error gyp info spawn args '-I',
    npm error gyp info spawn args '/Users/devuname/Developer/repo-name/node_modules/cpu-features/build/config.gypi',
    npm error gyp info spawn args '-I',
    npm error gyp info spawn args '/Users/devuname/Developer/repo-name/node_modules/node-gyp/addon.gypi',
    npm error gyp info spawn args '-I',
    npm error gyp info spawn args '/Users/devuname/.electron-gyp/28.3.3/include/node/common.gypi',
    npm error gyp info spawn args '-Dlibrary=shared_library',
    npm error gyp info spawn args '-Dvisibility=default',
    npm error gyp info spawn args '-Dnode_root_dir=/Users/devuname/.electron-gyp/28.3.3',
    npm error gyp info spawn args '-Dnode_gyp_dir=/Users/devuname/Developer/repo-name/node_modules/node-gyp',
    npm error gyp info spawn args '-Dnode_lib_file=/Users/devuname/.electron-gyp/28.3.3/<(target_arch)/node.lib',
    npm error gyp info spawn args '-Dmodule_root_dir=/Users/devuname/Developer/repo-name/node_modules/cpu-features',
    npm error gyp info spawn args '-Dnode_engine=v8',
    npm error gyp info spawn args '--depth=.',
    npm error gyp info spawn args '--no-parallel',
    npm error gyp info spawn args '--generator-output',
    npm error gyp info spawn args 'build',
    npm error gyp info spawn args '-Goutput_dir=.'
    npm error gyp info spawn args ]
    npm error gyp info spawn make
    npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    npm error In file included from ../src/binding.cc:3:
    npm error ../../nan/nan.h:688:39: warning: 'IdleNotificationDeadline' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
    npm error     return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
    npm error                                       ^
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-isolate.h:1343:3: note: 'IdleNotificationDeadline' has been explicitly marked deprecated here
    npm error   V8_DEPRECATE_SOON(
    npm error   ^
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8config.h:561:41: note: expanded from macro 'V8_DEPRECATE_SOON'
    npm error #   define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
    npm error                                         ^
    npm error In file included from ../src/binding.cc:3:
    npm error ../../nan/nan.h:2548:8: error: no matching member function for call to 'SetAccessor'
    npm error   tpl->SetAccessor(
    npm error   ~~~~~^~~~~~~~~~~
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'v8::PropertyAttribute' to 'AccessControl' for 5th argument
    npm error   void SetAccessor(
    npm error        ^
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-template.h:809: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
    npm error   void SetAccessor(
    npm error        ^
    npm error In file included from ../src/binding.cc:3:
    npm error ../../nan/nan.h:2596:8: error: no matching member function for call to 'SetAccessor'
    npm error   tpl->SetAccessor(
    npm error   ~~~~~^~~~~~~~~~~
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'v8::PropertyAttribute' to 'AccessControl' for 5th argument
    npm error   void SetAccessor(
    npm error        ^
    npm error /Users/devuname/.electron-gyp/28.3.3/include/node/v8-template.h:809: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
    npm error   void SetAccessor(
    npm error        ^
    npm error 1 warning and 2 errors generated.
    npm error make: *** [Release/obj.target/cpufeatures/src/binding.o] Error 1
    npm error gyp ERR! build error 
    npm error gyp ERR! stack Error: `make` failed with exit code: 2
    npm error gyp ERR! stack at ChildProcess.<anonymous> (/Users/devuname/Developer/repo-name/node_modules/node-gyp/lib/build.js:216:23)
    npm error gyp ERR! System Darwin 23.5.0
    npm error gyp ERR! command "/Users/devuname/.nvm/versions/node/v20.11.1/bin/node" "/Users/devuname/Developer/repo-name/node_modules/.bin/node-gyp" "rebuild"
    npm error gyp ERR! cwd /Users/devuname/Developer/repo-name/node_modules/cpu-features
    npm error gyp ERR! node -v v20.11.1
    npm error gyp ERR! node-gyp -v v10.2.0
    npm error gyp ERR! not ok
    npm error A complete log of this run can be found in: /Users/devuname/.npm/_logs/2024-08-07T17_17_27_276Z-debug-0.log
    
                    command=/Users/devuname/.nvm/versions/node/v20.11.1/bin/node /Users/devuname/.nvm/versions/node/v20.11.1/lib/node_modules/npm/bin/npm-cli.js rebuild [email protected]
                    workingDir=
npm error code 1
npm error path /Users/devuname/Developer/repo-name
npm error command failed
npm error command sh -c electron-builder install-app-deps
npm error A complete log of this run can be found in: /Users/devuname/.npm/_logs/2024-08-07T17_17_22_648Z-debug-0.log
@cclauss cclauss added the macOS label Aug 7, 2024
@cclauss
Copy link
Contributor

cclauss commented Aug 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants