Open vibr77-zz opened 4 years ago
When doing a verbose on ldconfig openwave I have :
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_mutexattr_destroy'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_create'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_mutex_trylock'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_condattr_setpshared'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_attr_setstacksize'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_mutexattr_settype'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_join'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_cancel'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_setname_np'
ld: /usr/local/lib64/libopenzwave.so: undefined reference to `pthread_mutexattr_init'
OK I have made some test t understand this issue Ubuntu 18 LTS Openzwave 1.6 Node : 12.16.2
It works fine with test2 script, but when I use node worker it triggers an exception...
Vincent
Same thing switching to openzwave 1.4
with the trace
2020-06-06 14:10:44.062 Detail, Node001, QueryStage_ManufacturerSpecific1
2020-06-06 14:10:44.062 Detail, Node001, Load Controller Manufacturer Specific Config
6: 0x970655 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/home/vincent/.nvm/versions/node/v12.16.2/bin/node]
7: 0x7f993c202591 Nan::AsyncResource::runInAsyncScope(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/home/vincent/magik2/node_modules/openzwave-shared/build/Debug/openzwave_shared.node]
8: 0x7f993c2026a0 Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*, Nan::AsyncResource*) const [/home/vincent/magik2/node_modules/openzwave-shared/build/Debug/openzwave_shared.node]
9: 0x7f993c202621 Nan::Callback::Call(v8::Local<v8::Object>, int, v8::Local<v8::Value>*, Nan::AsyncResource*) const [/home/vincent/magik2/node_modules/openzwave-shared/build/Debug/openzwave_shared.node]
10: 0x7f993c201704 OZW::handleNotification(OZW::NotifInfo*) [/home/vincent/magik2/node_modules/openzwave-shared/build/Debug/openzwave_shared.node]
11: 0x7f993c201fb6 OZW::async_cb_handler(uv_async_s*) [/home/vincent/magik2/node_modules/openzwave-shared/build/Debug/openzwave_shared.node]
12: 0x1326a71 [/home/vincent/.nvm/versions/node/v12.16.2/bin/node]
13: 0x1339398 [/home/vincent/.nvm/versions/node/v12.16.2/bin/node]
[34m2020-06-06 14:10:44.064 Detail, Node001, QueryStage_NodePlusInfo
@ekarak Could you take a look at this?
It seems that NAN is not supporting Node Worker Thread even with
openzwave.cc `#if NODE_MAJOR_VERSION >= 10 NAN_MODULE_WORKER_ENABLED(openzwave_shared, OZW::init)
NODE_MODULE(openzwave_shared, OZW::init)
Handle scope is not working given the fact it send the callback to the Master Thread where it should go to the sub Thread...
A shift to N-API seems mandatory...
Wdyt ?
A shift to N-API seems mandatory...
This is in my TODOs but I currently have no time for that. If you would like to create a PR I will be happy to review it and help
I would also remove OZW 1.4 support and make all the repo NOdejs 10+ compatible and dropping older nodejs versions
@chrisns This is something we have to fix, I mean, the translation to N-API it's a priority...
Hello, Running on my debian VM I have the following error starting openzwave node
[nodemon] app crashed - waiting for file changes before starting...