@glasfaser said in ble Adapter macht Probleme auf Raspi 5:
sudo -H -u iobroker npm install bluetooth-hci-socket
admin@iobroker:~ $ cd /opt/iobroker
admin@iobroker:/opt/iobroker $ sudo -H -u iobroker npm install bluetooth-hci-socket
npm ERR! code 1
npm ERR! path /opt/iobroker/node_modules/bluetooth-hci-socket
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/opt/iobroker/node_modules/bluetooth-hci-socket/build'
npm ERR! CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
npm ERR! make: Leaving directory '/opt/iobroker/node_modules/bluetooth-hci-socket/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@18.19.0 | linux | arm64
npm ERR! gyp info find Python using Python version 3.11.2 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/npm/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 '/opt/iobroker/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/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/iobroker/.cache/node-gyp/18.19.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/iobroker/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/iobroker/.cache/node-gyp/18.19.0/include/node/v8-function.h:15,
npm ERR! from /home/iobroker/.cache/node-gyp/18.19.0/include/node/v8.h:33,
npm ERR! from /home/iobroker/.cache/node-gyp/18.19.0/include/node/node.h:73,
npm ERR! from /home/iobroker/.cache/node-gyp/18.19.0/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /home/iobroker/.cache/node-gyp/18.19.0/include/node/v8-template.h:513:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
npm ERR! 513 | V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
npm ERR! | ^~~~~~~~~~~
npm ERR! /home/iobroker/.cache/node-gyp/18.19.0/include/node/v8-template.h:513: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! ../../nan/nan.h:1053:46: note: declared here
npm ERR! 1053 | 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/iobroker/.cache/node-gyp/18.19.0/include/node/v8-array-buffer.h:13,
npm ERR! from /home/iobroker/.cache/node-gyp/18.19.0/include/node/v8.h:24:
npm ERR! /home/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.0/include/node/v8-object.h:290:43: note: candidate expects 2 arguments, 1 provided
npm ERR! /home/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.0/include/node/v8-function.h:38:44: note: candidate expects 3 arguments, 2 provided
npm ERR! /home/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.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! ../../nan/nan.h:1053:46: note: declared here
npm ERR! 1053 | 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/iobroker/.cache/node-gyp/18.19.0/include/node/v8-primitive.h:11,
npm ERR! from /home/iobroker/.cache/node-gyp/18.19.0/include/node/v8-object.h:11:
npm ERR! /home/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.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/iobroker/.cache/node-gyp/18.19.0/include/node/node.h:1014: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! 1014 | (node::addon_register_func) (regfunc), \
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/iobroker/.cache/node-gyp/18.19.0/include/node/node.h:1048:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR! 1048 | 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.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 6.1.0-rpi8-rpi-2712
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /opt/iobroker/node_modules/bluetooth-hci-socket
npm ERR! gyp ERR! node -v v18.19.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: /home/iobroker/.npm/_logs/2024-02-10T22_35_01_714Z-debug-0.log
admin@iobroker:/opt/iobroker $