Should be simple, but it's not. I need to install OpenZwave, which I've managed to do a couple different ways. But I also need node-openzwave-shared, which is requires for node-red. That fails miserably every time I try. First, I aways get dozens of these warnings while building the package:
- Code: Select all
/home/pi/.cache/node-gyp/10.19.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/pi/.cache/node-gyp/10.19.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.cache/node-gyp/10.19.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/pi/.cache/node-gyp/10.19.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/pi/.cache/node-gyp/10.19.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.cache/node-gyp/10.19.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);
But it does seem to build. Then I get this major failure:
- Code: Select all
pi@barnpi:~ $ node node_modules/openzwave-shared/test2.js
Initialising OpenZWave 1.6.1044 binary addon for Node.JS.
OpenZWave Security API is ENABLED
ZWave device db : /usr/local/etc/openzwave
User settings path : /home/pi/node_modules/openzwave-shared/build/Release/../../
Option Overrides : --ConsoleOutput true
connecting to /dev/ttyACM0
node: symbol lookup error: /home/pi/node_modules/openzwave-shared/build/Release/openzwave_shared.node: undefined symbol: _ZN9OpenZWave7Options6CreateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_
But it's there:
- Code: Select all
pi@barnpi:~ $ ls -l /usr/local/lib
total 1924
drwxr-xr-x 3 root root 4096 Feb 21 14:11 arm-linux-gnueabihf
lrwxrwxrwx 1 root root 19 Feb 21 18:49 libopenzwave.so -> libopenzwave.so.1.6
-rwxr-xr-x 1 root root 1953668 Feb 21 18:49 libopenzwave.so.1.6
drwxr-xr-x 3 root root 4096 Jul 9 2019 pypy2.7
drwxrwsr-x 4 root staff 4096 Feb 21 17:35 python2.7
drwxrwsr-x 3 root staff 4096 Jul 9 2019 python3.7
Here's where I'm starting: https://www.npmjs.com/package/openzwave-shared
I don't think these errors have anything to do with the specific Z-wave stick. It's all about the NPM build.
Has anyone done this?