node-openzwave icon indicating copy to clipboard operation
node-openzwave copied to clipboard

error under debian

Open ghost opened this issue 12 years ago • 9 comments

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

ghost avatar Nov 24 '13 18:11 ghost

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

mathieuruellan avatar Dec 17 '13 14:12 mathieuruellan

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$'

beanz avatar Dec 17 '13 14:12 beanz

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.

jperkin avatar Jan 28 '14 11:01 jperkin

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 ([email protected]) (gcc version 4.8.2 (Debian 4.8.2-16) ) #1 SMP Debian 3.13.7-1 (2014-03-25)

amccool avatar May 04 '14 23:05 amccool

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

NickDelBen avatar Jul 02 '15 02:07 NickDelBen

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

amccool avatar Jul 02 '15 02:07 amccool

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.

jperkin avatar Jul 02 '15 08:07 jperkin

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.

NickDelBen avatar Jul 04 '15 23:07 NickDelBen

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" [email protected] έγραψε:

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 .

ekarak avatar Jul 05 '15 05:07 ekarak