jperkin / node-openzwave

node.js interface to libopenzwave
Other
110 stars 55 forks source link

require openzwave #24

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hello, I can't get your example file working. I require the openzwave file: var OpenZWave = require('node_modules/openzwave/build/Release/openzwave');

I run it: node test.js

And i get:

module.js:356 Module._extensions[extension](this, filename); ^ Error: node_modules/openzwave/build/Release/openzwave.node: undefined symbol: udev_new at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/edouard/Desktop/test.js:5:17) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10)

What am i doing wrong? Thx. eo

Am i loading the wrong openzwave file?

jperkin commented 10 years ago

Something is wrong with libudev, did you build this on a different host or something? Check it is installed correctly, etc. More information on the host environment would be useful. Thanks.

ghost commented 10 years ago

Yes it seems so. No i built it on the same system. I have libudev-dev installed correctly. I think it's just about linking, when I run ldd on openzwave/build/Release/openzwave.node I get:

$ ldd openzwave.node linux-gate.so.1 => (0xb7789000) libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb75cc000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb75b1000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb73fc000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb73b9000) /lib/ld-linux.so.2 (0xb778a000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb739c000)

And we can notice there's no mention to udev or anything. How can I resolve this?

Thx, eo

PS: Im running Ubuntu 13.10, 3.11.0-12, 32bit system

ghost commented 10 years ago

I've found an alternative by using LD_PRELOAD (as mentioned here https://github.com/jperkin/node-openzwave/issues/20) Sorry to duplicate an issue.

jperkin commented 10 years ago

Close as duplicate of #20. Will resolve this issue there.