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

Installation fails (Arch Linux, node-gyp 9.3.0) #160

Open
trougnouf opened this issue Nov 22, 2022 · 3 comments
Open

Installation fails (Arch Linux, node-gyp 9.3.0) #160

trougnouf opened this issue Nov 22, 2022 · 3 comments

Comments

@trougnouf
Copy link

npm installation fails on Arch Linux. I've tried with nodejs versions (19.1.0, 14.21, 16.18) and I have node-gyp 9.3.0 installed

Terminal output:
[trougnouf@d]: ~>$ npm install -g bluetooth-hci-socket
npm ERR! code 1
npm ERR! path /home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket
npm ERR! command failed
npm ERR! command sh -c -- node-gyp rebuild
npm ERR! make: Entering directory '/home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket/build'
npm ERR!   CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
npm ERR! make: Leaving directory '/home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.8 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/trougnouf/.cache/node-gyp/19.1.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/trougnouf/.cache/node-gyp/19.1.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/trougnouf/.cache/node-gyp/19.1.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/BluetoothHciSocket.cpp: In static member function ‘static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
npm ERR! ../src/BluetoothHciSocket.cpp:128:81: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
npm ERR!   128 |   target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
npm ERR!       |                                                                ~~~~~~~~~~~~~~~~~^~
npm ERR! In file included from /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-function.h:15,
npm ERR!                  from /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8.h:33,
npm ERR!                  from /home/trougnouf/.cache/node-gyp/19.1.0/include/node/node.h:73,
npm ERR!                  from /home/trougnouf/.cache/node-gyp/19.1.0/include/node/node_buffer.h:25,
npm ERR!                  from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-template.h:495:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
npm ERR!   495 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
npm ERR!       |                                              ^~~~~~~~~~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-template.h:495:46: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
npm ERR! ../src/BluetoothHciSocket.cpp:251:22: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
npm ERR!   251 |     Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
npm ERR!       |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from ../src/BluetoothHciSocket.cpp:8:
npm ERR! ../node_modules/nan/nan.h:1051:46: note: declared here
npm ERR!  1051 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
npm ERR!       |                                              ^~~~~~~~~~~~
npm ERR! ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
npm ERR! ../src/BluetoothHciSocket.cpp:269:74: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
npm ERR!   269 |   Local<Function> errorConstructor = Local<Function>::Cast(globalObj->Get(Nan::New("Error").ToLocalChecked()));
npm ERR!       |                                                            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-array-buffer.h:13,
npm ERR!                  from /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8.h:24:
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-object.h:290:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR!   290 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-object.h:290:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-object.h:293:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR!   293 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!       |                                           ^~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-object.h:293:43: note:   candidate expects 2 arguments, 1 provided
npm ERR! ../src/BluetoothHciSocket.cpp:275:53: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
npm ERR!   275 |   Local<Value> error = errorConstructor->NewInstance(1, constructorArgs);
npm ERR!       |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-function.h:38:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’
npm ERR!    38 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
npm ERR!       |                                            ^~~~~~~~~~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-function.h:38:44: note:   candidate expects 3 arguments, 2 provided
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-function.h:41:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’
npm ERR!    41 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
npm ERR!       |                                            ^~~~~~~~~~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-function.h:41:44: note:   candidate expects 1 argument, 2 provided
npm ERR! ../src/BluetoothHciSocket.cpp:282:20: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
npm ERR!   282 |   Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
npm ERR!       |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../node_modules/nan/nan.h:1051:46: note: declared here
npm ERR!  1051 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
npm ERR!       |                                              ^~~~~~~~~~~~
npm ERR! ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/BluetoothHciSocket.cpp:395:33: error: no matching function for call to ‘v8::Value::IntegerValue()’
npm ERR!   395 |       devId = arg0->IntegerValue();
npm ERR!       |               ~~~~~~~~~~~~~~~~~~^~
npm ERR! In file included from /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-primitive.h:11,
npm ERR!                  from /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-object.h:11:
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-value.h:413:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
npm ERR!   413 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR!       |                                        ^~~~~~~~~~~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-value.h:413:40: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/BluetoothHciSocket.cpp:417:33: error: no matching function for call to ‘v8::Value::IntegerValue()’
npm ERR!   417 |       devId = arg0->IntegerValue();
npm ERR!       |               ~~~~~~~~~~~~~~~~~~^~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-value.h:413:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
npm ERR!   413 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR!       |                                        ^~~~~~~~~~~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/v8-value.h:413:40: note:   candidate expects 1 argument, 0 provided
npm ERR! ../src/BluetoothHciSocket.cpp: At global scope:
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/node.h:993:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR!   993 |       (node::addon_register_func) (regfunc),                          \
npm ERR!       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/trougnouf/.cache/node-gyp/19.1.0/include/node/node.h:1027:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR!  1027 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
npm ERR!       |   ^~~~~~~~~~~~~
npm ERR! ../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR!   499 | NODE_MODULE(binding, BluetoothHciSocket::Init);
npm ERR!       | ^~~~~~~~~~~
npm ERR! make: *** [binding.target.mk:111: Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Linux 6.0.9-zen1-1-zen
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket
npm ERR! gyp ERR! node -v v19.1.0
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/trougnouf/.npm/_logs/2022-11-22T14_13_46_277Z-debug-0.log
and the content of the log file:
0 verbose cli /usr/bin/node /usr/bin/npm
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/home/trougnouf/.npmrc Completed in 2ms
11 timing config:load:user Completed in 2ms
12 timing config:load:file:/home/trougnouf/.local/etc/npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:validate Completed in 0ms
15 timing config:load:credentials Completed in 0ms
16 timing config:load:setEnvs Completed in 0ms
17 timing config:load Completed in 11ms
18 timing npm:load:configload Completed in 11ms
19 timing npm:load:mkdirpcache Completed in 3ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm install bluetooth-hci-socket
22 verbose argv "install" "--global" "bluetooth-hci-socket"
23 timing npm:load:setTitle Completed in 1ms
24 timing config:load:flatten Completed in 2ms
25 timing npm:load:display Completed in 3ms
26 verbose logfile logs-max:10 dir:/home/trougnouf/.npm/_logs
27 verbose logfile /home/trougnouf/.npm/_logs/2022-11-22T14_03_22_288Z-debug-0.log
28 timing npm:load:logFile Completed in 3ms
29 timing npm:load:timers Completed in 0ms
30 timing npm:load:configScope Completed in 0ms
31 timing npm:load Completed in 22ms
32 timing arborist:ctor Completed in 0ms
33 silly logfile start cleaning logs, removing 1 files
34 timing idealTree:init Completed in 4ms
35 timing idealTree:userRequests Completed in 2ms
36 silly idealTree buildDeps
37 silly fetch manifest bluetooth-hci-socket@*
38 silly logfile done cleaning log files
39 http fetch GET 200 https://registry.npmjs.org/bluetooth-hci-socket 11ms (cache hit)
40 silly placeDep ROOT [email protected] OK for:  want: *
41 silly fetch manifest debug@^2.2.0
42 silly fetch manifest nan@^2.0.5
43 silly fetch manifest usb@^1.1.0
44 http fetch GET 200 https://registry.npmjs.org/debug 8ms (cache hit)
45 http fetch GET 200 https://registry.npmjs.org/nan 11ms (cache hit)
46 http fetch GET 200 https://registry.npmjs.org/usb 14ms (cache hit)
47 timing idealTree:#root Completed in 41ms
48 silly placeDep node_modules/bluetooth-hci-socket [email protected] OK for: [email protected] want: ^2.2.0
49 silly placeDep node_modules/bluetooth-hci-socket [email protected] OK for: [email protected] want: ^2.0.5
50 silly placeDep node_modules/bluetooth-hci-socket [email protected] OK for: [email protected] want: ^1.1.0
51 silly fetch manifest [email protected]
52 silly fetch manifest node-addon-api@^4.2.0
53 silly fetch manifest node-gyp-build@^4.3.0
54 http fetch GET 200 https://registry.npmjs.org/ms 6ms (cache hit)
55 http fetch GET 200 https://registry.npmjs.org/node-gyp-build 6ms (cache hit)
56 http fetch GET 200 https://registry.npmjs.org/node-addon-api 9ms (cache hit)
57 timing idealTree:node_modules/bluetooth-hci-socket Completed in 14ms
58 silly placeDep node_modules/bluetooth-hci-socket [email protected] OK for: [email protected] want: 2.0.0
59 timing idealTree:node_modules/bluetooth-hci-socket/node_modules/debug Completed in 1ms
60 timing idealTree:node_modules/bluetooth-hci-socket/node_modules/ms Completed in 0ms
61 timing idealTree:node_modules/bluetooth-hci-socket/node_modules/nan Completed in 0ms
62 silly placeDep node_modules/bluetooth-hci-socket [email protected] OK for: [email protected] want: ^4.2.0
63 silly placeDep node_modules/bluetooth-hci-socket [email protected] OK for: [email protected] want: ^4.3.0
64 timing idealTree:node_modules/bluetooth-hci-socket/node_modules/usb Completed in 5ms
65 timing idealTree:node_modules/bluetooth-hci-socket/node_modules/node-addon-api Completed in 0ms
66 timing idealTree:node_modules/bluetooth-hci-socket/node_modules/node-gyp-build Completed in 0ms
67 timing idealTree:buildDeps Completed in 62ms
68 timing idealTree:fixDepFlags Completed in 1ms
69 timing idealTree Completed in 69ms
70 timing reify:loadTrees Completed in 70ms
71 timing reify:diffTrees Completed in 1ms
72 silly reify moves {}
73 timing reify:retireShallow Completed in 1ms
74 timing reify:createSparse Completed in 1ms
75 timing reify:loadBundles Completed in 0ms
76 silly audit bulk request {
76 silly audit   'bluetooth-hci-socket': [ '0.5.1' ],
76 silly audit   debug: [ '2.6.9' ],
76 silly audit   nan: [ '2.17.0' ],
76 silly audit   usb: [ '1.9.2' ],
76 silly audit   ms: [ '2.0.0' ],
76 silly audit   'node-addon-api': [ '4.3.0' ],
76 silly audit   'node-gyp-build': [ '4.5.0' ]
76 silly audit }
77 timing reifyNode:node_modules/bluetooth-hci-socket/node_modules/ms Completed in 94ms
78 timing reifyNode:node_modules/bluetooth-hci-socket/node_modules/node-gyp-build Completed in 96ms
79 timing reifyNode:node_modules/bluetooth-hci-socket Completed in 102ms
80 timing reifyNode:node_modules/bluetooth-hci-socket/node_modules/debug Completed in 101ms
81 timing reifyNode:node_modules/bluetooth-hci-socket/node_modules/node-addon-api Completed in 106ms
82 timing reifyNode:node_modules/bluetooth-hci-socket/node_modules/nan Completed in 110ms
83 timing reifyNode:node_modules/bluetooth-hci-socket/node_modules/usb Completed in 162ms
84 timing reify:unpack Completed in 163ms
85 timing reify:unretire Completed in 0ms
86 timing build:queue Completed in 1ms
87 timing build:link:node_modules/bluetooth-hci-socket/node_modules/node-gyp-build Completed in 2ms
88 timing build:link Completed in 2ms
89 info run [email protected] install node_modules/bluetooth-hci-socket node-gyp rebuild
90 info run [email protected] install node_modules/bluetooth-hci-socket/node_modules/usb node-gyp-build
91 info run [email protected] install { code: 0, signal: null }
92 timing build:run:install:node_modules/bluetooth-hci-socket/node_modules/usb Completed in 99ms
93 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 666ms
94 timing auditReport:getReport Completed in 668ms
95 silly audit report {}
96 timing auditReport:init Completed in 0ms
97 timing reify:audit Completed in 669ms
98 info run [email protected] install { code: 1, signal: null }
99 timing reify:rollback:createSparse Completed in 52ms
100 timing reify:rollback:retireShallow Completed in 0ms
101 timing command:install Completed in 1610ms
102 verbose stack Error: command failed
102 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
102 verbose stack     at ChildProcess.emit (node:events:513:28)
102 verbose stack     at maybeClose (node:internal/child_process:1100:16)
102 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
103 verbose pkgid [email protected]
104 verbose cwd /home/trougnouf
105 verbose Linux 6.0.9-zen1-1-zen
106 verbose node v16.18.0
107 verbose npm  v8.19.2
108 error code 1
109 error path /home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket
110 error command failed
111 error command sh -c -- node-gyp rebuild
112 error make: Entering directory '/home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket/build'
112 error   CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
112 error make: Leaving directory '/home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket/build'
113 error gyp info it worked if it ends with ok
113 error gyp info using [email protected]
113 error gyp info using [email protected] | linux | x64
113 error gyp info find Python using Python version 3.10.8 found at "/usr/bin/python3"
113 error gyp info spawn /usr/bin/python3
113 error gyp info spawn args [
113 error gyp info spawn args   '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
113 error gyp info spawn args   'binding.gyp',
113 error gyp info spawn args   '-f',
113 error gyp info spawn args   'make',
113 error gyp info spawn args   '-I',
113 error gyp info spawn args   '/home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket/build/config.gypi',
113 error gyp info spawn args   '-I',
113 error gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
113 error gyp info spawn args   '-I',
113 error gyp info spawn args   '/home/trougnouf/.cache/node-gyp/16.18.0/include/node/common.gypi',
113 error gyp info spawn args   '-Dlibrary=shared_library',
113 error gyp info spawn args   '-Dvisibility=default',
113 error gyp info spawn args   '-Dnode_root_dir=/home/trougnouf/.cache/node-gyp/16.18.0',
113 error gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
113 error gyp info spawn args   '-Dnode_lib_file=/home/trougnouf/.cache/node-gyp/16.18.0/<(target_arch)/node.lib',
113 error gyp info spawn args   '-Dmodule_root_dir=/home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket',
113 error gyp info spawn args   '-Dnode_engine=v8',
113 error gyp info spawn args   '--depth=.',
113 error gyp info spawn args   '--no-parallel',
113 error gyp info spawn args   '--generator-output',
113 error gyp info spawn args   'build',
113 error gyp info spawn args   '-Goutput_dir=.'
113 error gyp info spawn args ]
113 error gyp info spawn make
113 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
113 error ../src/BluetoothHciSocket.cpp: In static member function ‘static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
113 error ../src/BluetoothHciSocket.cpp:128:81: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
113 error   128 |   target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
113 error       |                                                                ~~~~~~~~~~~~~~~~~^~
113 error In file included from /home/trougnouf/.cache/node-gyp/16.18.0/include/node/node.h:73,
113 error                  from /home/trougnouf/.cache/node-gyp/16.18.0/include/node/node_buffer.h:25,
113 error                  from ../src/BluetoothHciSocket.cpp:7:
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:6802:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
113 error  6802 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
113 error       |                                              ^~~~~~~~~~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:6802:46: note:   candidate expects 1 argument, 0 provided
113 error ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
113 error ../src/BluetoothHciSocket.cpp:251:22: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
113 error   251 |     Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
113 error       |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113 error In file included from ../src/BluetoothHciSocket.cpp:8:
113 error ../node_modules/nan/nan.h:1051:46: note: declared here
113 error  1051 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
113 error       |                                              ^~~~~~~~~~~~
113 error ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
113 error ../src/BluetoothHciSocket.cpp:269:74: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
113 error   269 |   Local<Function> errorConstructor = Local<Function>::Cast(globalObj->Get(Nan::New("Error").ToLocalChecked()));
113 error       |                                                            ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
113 error  4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
113 error       |                                           ^~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
113 error  4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
113 error       |                                           ^~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
113 error ../src/BluetoothHciSocket.cpp:275:53: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
113 error   275 |   Local<Value> error = errorConstructor->NewInstance(1, constructorArgs);
113 error       |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:4759:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’
113 error  4759 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
113 error       |                                            ^~~~~~~~~~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:4759:44: note:   candidate expects 3 arguments, 2 provided
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:4762:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’
113 error  4762 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
113 error       |                                            ^~~~~~~~~~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:4762:44: note:   candidate expects 1 argument, 2 provided
113 error ../src/BluetoothHciSocket.cpp:282:20: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
113 error   282 |   Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
113 error       |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113 error ../node_modules/nan/nan.h:1051:46: note: declared here
113 error  1051 |   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
113 error       |                                              ^~~~~~~~~~~~
113 error ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
113 error ../src/BluetoothHciSocket.cpp:395:33: error: no matching function for call to ‘v8::Value::IntegerValue()’
113 error   395 |       devId = arg0->IntegerValue();
113 error       |               ~~~~~~~~~~~~~~~~~~^~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:3101:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
113 error  3101 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
113 error       |                                        ^~~~~~~~~~~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:3101:40: note:   candidate expects 1 argument, 0 provided
113 error ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
113 error ../src/BluetoothHciSocket.cpp:417:33: error: no matching function for call to ‘v8::Value::IntegerValue()’
113 error   417 |       devId = arg0->IntegerValue();
113 error       |               ~~~~~~~~~~~~~~~~~~^~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:3101:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
113 error  3101 |   V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
113 error       |                                        ^~~~~~~~~~~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/v8.h:3101:40: note:   candidate expects 1 argument, 0 provided
113 error ../src/BluetoothHciSocket.cpp: At global scope:
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/node.h:887:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
113 error   887 |       (node::addon_register_func) (regfunc),                          \
113 error       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113 error /home/trougnouf/.cache/node-gyp/16.18.0/include/node/node.h:921:3: note: in expansion of macro ‘NODE_MODULE_X’
113 error   921 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
113 error       |   ^~~~~~~~~~~~~
113 error ../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro ‘NODE_MODULE’
113 error   499 | NODE_MODULE(binding, BluetoothHciSocket::Init);
113 error       | ^~~~~~~~~~~
113 error make: *** [binding.target.mk:109: Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
113 error gyp ERR! build error 
113 error gyp ERR! stack Error: `make` failed with exit code: 2
113 error gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:203:23)
113 error gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
113 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
113 error gyp ERR! System Linux 6.0.9-zen1-1-zen
113 error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
113 error gyp ERR! cwd /home/trougnouf/.local/lib/node_modules/bluetooth-hci-socket
113 error gyp ERR! node -v v16.18.0
113 error gyp ERR! node-gyp -v v9.3.0
113 error gyp ERR! not ok
114 verbose exit 1
115 timing npm Completed in 1696ms
116 verbose unfinished npm timer reify 1669125802363
117 verbose unfinished npm timer reify:build 1669125802609
118 verbose unfinished npm timer build 1669125802609
119 verbose unfinished npm timer build:deps 1669125802609
120 verbose unfinished npm timer build:run:install 1669125802613
121 verbose unfinished npm timer build:run:install:node_modules/bluetooth-hci-socket 1669125802613
122 verbose code 1
123 error A complete log of this run can be found in:
123 error     /home/trougnouf/.npm/_logs/2022-11-22T14_03_22_288Z-debug-0.log
@krucios
Copy link

krucios commented Aug 8, 2023

Same issue here with node-gyp v9.3.1
Does anybody know how to approach this issue?

@ghost
Copy link

ghost commented Nov 28, 2023

Same issue here with node v12.22.9

@krucios
Copy link

krucios commented Dec 1, 2023

I ended up using

    "@abandonware/bluetooth-hci-socket": "^0.5.3-10",
    "@abandonware/noble": "^1.9.2-23",

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

No branches or pull requests

2 participants