jperkin / node-openzwave

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

error under debian #20

Open ghost opened 10 years ago

ghost commented 10 years ago

Got this error durning 'require':

root@debian:/home/drago/empathy/node_modules/openzwave# node test.js

module.js:356
  Module._extensions[extension](this, filename);
                               ^
Error: /home/drago/empathy/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.<anonymous> (/home/drago/empathy/node_modules/openzwave/lib/openzwave.js:17:13)
    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 Module.require (module.js:364:17)

node -v v0.10.21 npm -v 1.3.15 Linux 3.2.0-4-686-pae

mathieuruellan commented 10 years ago

I have the same issue with debian node -v v0.10.23 npm -v 1.3.10

beanz commented 10 years ago

I've not thought about the correct fix but a workaround is to launch with:

LD_PRELOAD=/lib/x86_64-linux-gnu/libudev.so.0 node test.js

where the correct path to libudev.so.0 will be os dependent but can easily be found by using something like:

locate -r '/libudev.so.0$'
jperkin commented 10 years ago

I can't reproduce this on my RPi running Debian Wheezy, I have these libudev packages installed:

ii  libgudev-1.0-0:armhf  175-7.2    armhf      GObject-based wrapper library for libudev
ii  libudev-dev           175-7.2    armhf      libudev development files
ii  libudev0:armhf        175-7.2    armhf      libudev shared library
ii  udev                  175-7.2    armhf      /dev/ and hotplug management daemon

While I try to get a Debian VM up and running to reproduce, can anyone who hits this problem please provide details of which version they are running, which libudev packages are installed, etc. Thanks.

amccool commented 10 years ago

ii libgudev-1.0-0:i386 204-10 i386 GObject-based wrapper library for libudev ii libudev-dev 204-10 i386 libudev development files ii libudev1:i386 204-10 i386 libudev shared library ii udev 204-10 i386 /dev/ and hotplug management daemon

Linux version 3.13-1-686-pae (debian-kernel@lists.debian.org) (gcc version 4.8.2 (Debian 4.8.2-16) ) #1 SMP Debian 3.13.7-1 (2014-03-25)

NickDelBen commented 9 years ago

Was this issue ever resolved? Is this project still active?

amccool commented 9 years ago

I actively use this project, with the workaround. I did need to add a X.disconnect() followed by a process.exit()

jperkin commented 9 years ago

It's still active, I just didn't ever get around to trying to reproduce the issue - I'll see if I can to that soon. Sorry for the delay.

NickDelBen commented 9 years ago

I can reproduce, using Ubuntu 14.04 on a Thinkpad X220. Using node when i ad the npm package as a dependency, it downloads and builds fine (no error to console at least) but then if i import the package using a require there is an issue.

ekarak commented 9 years ago

If you get openzwave lib installed and working on your machine (either by manual compilation or by debian package), then you could also try the 'OpenZWave/node-openzwave-shared' fork. Στις 5 Ιουλ 2015 2:16 π.μ., ο χρήστης "NickDelBen" notifications@github.com έγραψε:

I can reproduce, using Ubuntu 14.04 on a Thinkpad X220. Using node when i ad the npm package as a dependency, it downloads and builds fine (no error to console at least) but then if i import the package using a require there is an issue.

— Reply to this email directly or view it on GitHub https://github.com/jperkin/node-openzwave/issues/20#issuecomment-118561813 .