NEWS
Ständig prebuild Fehler beim Adapter installieren / updaten
-
Hallo,
wie im Titel bereits beschrieben, tauchen bei mir bei jeder Kompilierung Fehler auf:
Entferne ich das Prebuild, lädt er es sich einfach wieder herunter:
Danach gibt es dann einen weiteren Anlauf und der Adapter wird installiert / aktualisiert.
Trotzdem ist es nervíg. Gerade beim Testen. Wenn ich einen Adapter anpasse, mache ich das neuerdings über GitHub. Durch den Fehler dauert das aktualisieren aber unnötig lange.
Wie kommt npm darauf, dass jeder, wirklich jeder Adapter das USB-node benötigt?
-
@peterfido sagte in Ständig prebuild Fehler beim Adapter installieren / updaten:
Wie kommt npm darauf, dass jeder, wirklich jeder Adapter das USB-node benötigt?
Tut nicht jeder. Aber npm unternimmt immer einen neuen Versuch die Arbeit zu Ende zu bringen, wenn es aufgerufen wird.
Mach den cache mal leer:npm cache clean --force
node 10.21.0? Da würde ich ja auf die aktuelle LTS node12 gehen.
-
@Thomas-Braun
Ja, die 10er Version.npm cache clean --force
klappt im Home Verzeichnis.
Im iobroker-Verzeichnis darf ich das nicht.peter@proxbroker:~$ cd /opt/iobroker peter@proxbroker:/opt/iobroker$ npm cache clean --force [sudo] Passwort für peter: Das hat nicht funktioniert, bitte nochmal probieren. [sudo] Passwort für peter: Leider darf der Benutzer peter »/usr/bin/npm cache clean --force« als iobroker auf proxbroker nicht ausführen. peter@proxbroker:/opt/iobroker$
-
@peterfido
Eigentlich sollte bei einem 'richtig' aufgesetzen ioBroker das möglich sein. Hier geht es jedenfalls:pi@raspberrypi:~ $ cd /opt/iobroker/ pi@raspberrypi:/opt/iobroker $ npm cache clean --force npm WARN using --force I sure hope you know what you are doing. pi@raspberrypi:/opt/iobroker $
sudoers richtig? peter in den richtigen Gruppen?
-
@Thomas-Braun
Folgende sudoers habe ich:# # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL Peter ALL = NOPASSWD: ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d iobroker ALL = NOPASSWD: /var/scripte/*
-
Das ist imho auch nicht richtig.
Peter ist nicht peter und in meiner sudoers steht der 'pi' gar nicht drin:# User privilege specification root ALL=(ALL:ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL
Was steht in
ls -ls /etc/sudoers.d/
drin?
-
@Thomas-Braun
Peter habe ich gerade in klein geändert, war mir eben auch aufgefallen.
Im suders.d:root@proxbroker:/opt/iobroker# ls -ls /etc/sudoers.d/ insgesamt 8 4 -r--r----- 1 root root 1206 Jun 28 07:43 iobroker 4 -r--r----- 1 root root 958 Feb 2 2020 README root@proxbroker:/opt/iobroker# cat /etc/sudoers.d/iobroker iobroker ALL=(ALL) ALL iobroker ALL=(ALL) NOPASSWD: /usr/sbin/shutdown iobroker ALL=(ALL) NOPASSWD: /usr/sbin/halt iobroker ALL=(ALL) NOPASSWD: /usr/sbin/poweroff iobroker ALL=(ALL) NOPASSWD: /usr/sbin/reboot iobroker ALL=(ALL) NOPASSWD: /usr/bin/systemctl start iobroker ALL=(ALL) NOPASSWD: /usr/bin/systemctl stop iobroker ALL=(ALL) NOPASSWD: /usr/bin/mount iobroker ALL=(ALL) NOPASSWD: /usr/bin/umount iobroker ALL=(ALL) NOPASSWD: /usr/bin/systemd-run iobroker ALL=(ALL) NOPASSWD: /usr/bin/apt-get iobroker ALL=(ALL) NOPASSWD: /usr/bin/apt iobroker ALL=(ALL) NOPASSWD: /usr/bin/dpkg iobroker ALL=(ALL) NOPASSWD: /usr/bin/make iobroker ALL=(ALL) NOPASSWD: /usr/bin/ping iobroker ALL=(ALL) NOPASSWD: /usr/bin/fping iobroker ALL=(ALL) NOPASSWD: /usr/sbin/arp-scan iobroker ALL=(ALL) NOPASSWD: /usr/sbin/setcap iobroker ALL=(ALL) NOPASSWD: /usr/bin/cat iobroker ALL=(ALL) NOPASSWD: /usr/bin/df iobroker ALL=(ALL) NOPASSWD: /usr/sbin/ldconfig ALL ALL=NOPASSWD: /usr/bin/systemctl start iobroker ALL ALL=NOPASSWD: /usr/bin/systemctl stop iobroker ALL ALL=NOPASSWD: /usr/bin/systemctl restart iobroker ALL ALL=(iobroker) NOPASSWD: /usr/bin/node /opt/iobroker/node_modules/iobroker.js-controller/iobroker.js *
-
-
peter@proxbroker:/opt/iobroker$ groups peter cdrom floppy audio dip video plugdev netdev bluetooth lpadmin scanner iobroker peter@proxbroker:/opt/iobroker$
dabei habe ich vorhin nochmal
sudo usermod -aG sudo peter
durchgeführt.
-
@peterfido
Hmmmm.
Also der peter sollte in die sudo-Gruppe rein...Da musst du dich wohl mal ausnahmsweiste als root anmelden und den peter da reinhieven:
sudo su usermod -a -G sudo peter exit
Vielleicht funktioniert das unter Proxmox aber auch anders...
-
lüppt jetzt:
peter@proxbroker:~$ cd /opt/iobroker peter@proxbroker:/opt/iobroker$ npm cache clean --force [sudo] Passwort für peter: npm WARN using --force I sure hope you know what you are doing. peter@proxbroker:/opt/iobroker$
Allerdings wird die sudo - Gruppe immer noch nicht aufgelistet.
-
@peterfido Hast du den peter mal ausgeloggt?
Die Gruppen werden nur bei der Anmeldung eingelesen. -
@Thomas-Braun
Okay, das warsLeider hat es nicht viel gebracht:
prebuild-install info begin Prebuild-install version 5.3.3 prebuild-install info looking for cached prebuild @ /home/iobroker/.npm/_prebuilds/405966-usb-v1.6.3-node-v64-linux-x64.tar.gz prebuild-install info found cached prebuild prebuild-install info unpacking @ /home/iobroker/.npm/_prebuilds/405966-usb-v1.6.3-node-v64-linux-x64.tar.gz prebuild-install info unpack resolved to /opt/iobroker/node_modules/usb/build/Release/usb_bindings.node prebuild-install info unpack required /opt/iobroker/node_modules/usb/build/Release/usb_bindings.node successfully prebuild-install info install Successfully installed prebuilt binary! In file included from ../src/BluetoothHciSocket.cpp:8:../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete) ^ ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv); ^ In file included from ../src/BluetoothHciSocket.cpp:8:../../nan/nan.h:1045:46: note: declared here NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback( ^~~~~~~~~~~~../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv); ^In file included from ../src/BluetoothHciSocket.cpp:8:../../nan/nan.h:1045:46: note: declared here NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback( ^~~~~~~~~~~~ ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’ Local<Value> error = errorConstructor->NewInstance(1, constructorArgs); ^In file included from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node.h:63, from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node_buffer.h:25, from ../src/BluetoothHciSocket.cpp:7:/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:3993:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’ V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( ^~~~~~~~~~~/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:3993:44: note: candidate expects 3 arguments, 2 provided/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:3996:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’ V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( ^~~~~~~~~~~/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:3996:44: note: candidate expects 1 argument, 2 provided ../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv); ^ In file included from ../src/BluetoothHciSocket.cpp:8:../../nan/nan.h:1045:46: note: declared here NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback( ^~~~~~~~~~~~../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv); ^In file included from ../src/BluetoothHciSocket.cpp:8:../../nan/nan.h:1045:46: note: declared here NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback( ^~~~~~~~~~~~ ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:../src/BluetoothHciSocket.cpp:395:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] devId = arg0->IntegerValue(); ^ In file included from /home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:26, from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node.h:63, from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node_buffer.h:25, from ../src/BluetoothHciSocket.cpp:7:/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:2476:46: note: declared here V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const); ^~~~~~~~~~~~/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:../src/BluetoothHciSocket.cpp:417:34: warning: ‘int64_t v8::Value::IntegerValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations] devId = arg0->IntegerValue(); ^In file included from /home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:26, from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node.h:63, from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node_buffer.h:25, from ../src/BluetoothHciSocket.cpp:7:/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:2476:46: note: declared here V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const); ^~~~~~~~~~~~/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ In file included from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node_buffer.h:25, from ../src/BluetoothHciSocket.cpp:7:../src/BluetoothHciSocket.cpp: At global scope:/home/iobroker/.cache/node-gyp/10.21.0/include/node/node.h:573:43: 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] (node::addon_register_func) (regfunc), \ ^/home/iobroker/.cache/node-gyp/10.21.0/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’ NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) ^~~~~~~~~~~~~../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(binding, BluetoothHciSocket::Init); ^~~~~~~~~~~ In file included from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node.h:63, from /home/iobroker/.cache/node-gyp/10.21.0/include/node/node_buffer.h:25, from ../src/BluetoothHciSocket.cpp:7:/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:/home/iobroker/.cache/node-gyp/10.21.0/include/node/node_object_wrap.h:84:78: required from here/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] reinterpret_cast<Callback>(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:../../nan/nan_object_wrap.h:65:61: required from here/home/iobroker/.cache/node-gyp/10.21.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] make: *** [binding.target.mk:103: Release/obj.target/binding/src/BluetoothHciSocket.o] Fehler 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)gyp ERR! stack at ChildProcess.emit (events.js:198:13)gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)gyp ERR! System Linux 4.19.0-8-amd64gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/iobroker/node_modules/bluetooth-hci-socketgyp ERR! node -v v10.21.0gyp ERR! node-gyp -v v5.1.0gyp ERR! not ok npm
Mache jetzt Feierabend für Heute.
Vielen Dank.
-
Hallo,
habe nun auf nodejs12.19.0 aktualisiert.
Der Fehler ist geblieben. Dafür fehlt Node-Red jetzt der Serialport und der S7 - Adapter startet ständig neu, weil er auf nen Fehler stößt. Daher spiele ich gerade das Backup wieder ein und lebe mit dem Fehler.
-
@peterfido Da muss noch ein rebuild erfolgen.
Cache zuvor löschen. -
Auch nach einem Rebuild läuft der Serialport nicht. Habe jetzt nen Update des Serialports innerhalb Node-Red durchgeführt. Auch der läuft nicht.
-
Cache gelöscht, Node-Red aktualisiert, alles neu gebuildet. Ergebnis ernüchternd:
Und das hier:
Und der HUE Bewegungsmelder hat sich auch verabschiedet. Der lief jetzt seit Tagen mit der minütlichen Abfrage durch.
-
@peterfido sagte in Ständig prebuild Fehler beim Adapter installieren / updaten:
BluetoothHciSocket.cpp
Hast die libudev-dev installiert?
-
@Thomas-Braun
Ja.
-
Das Build-Environment auch?
On Unix
Python v2.7, v3.5, v3.6, v3.7, or v3.8
make
A proper C/C++ compiler toolchain, like GCC