jperkin / node-openzwave

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

[Raspbian Wheezy] Error building libopenzwave #23

Closed asciidisco closed 10 years ago

asciidisco commented 10 years ago

Hi,

very interesting project, I´m looking forward to play with it, but unfortunately it seems like I´m not able to install it on RPi.

I personally believe that it has something to do with using the latest & greatest Node Version v0.11.9, because I was able to install it without any errors using a friends RPi that runs the latest stable Node version from the v0.10.x branch.

my knowledge of C++ is quite limited & I was hoping that we might be able to solve this issue together, also because I believe that it will arise with the next stable Node release (if it is really connected to the node version).

Thanks in advance & keep up the great work.

Cheers Sebastian

Stack trace snippet:

../deps/open-zwave/cpp/hidapi/linux/hid.c: In function ‘get_device_string’:
../deps/open-zwave/cpp/hidapi/linux/hid.c:308:6: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  AR(target) Release/obj.target/deps/open-zwave/libopenzwave.a
  COPY Release/libopenzwave.a
  CXX(target) Release/obj.target/openzwave/src/openzwave.o
../src/openzwave.cc:36:24: error: expected class-name before ‘{’ token
../src/openzwave.cc:37:33: error: ‘Arguments’ does not name a type
../src/openzwave.cc:37:44: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:38:37: error: ‘Arguments’ does not name a type
../src/openzwave.cc:38:48: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:39:40: error: ‘Arguments’ does not name a type
../src/openzwave.cc:39:51: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:40:38: error: ‘Arguments’ does not name a type
../src/openzwave.cc:40:49: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:41:38: error: ‘Arguments’ does not name a type
../src/openzwave.cc:41:49: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:42:41: error: ‘Arguments’ does not name a type
../src/openzwave.cc:42:52: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:43:37: error: ‘Arguments’ does not name a type
../src/openzwave.cc:43:48: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:44:38: error: ‘Arguments’ does not name a type
../src/openzwave.cc:44:49: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:45:39: error: ‘Arguments’ does not name a type
../src/openzwave.cc:45:50: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:46:40: error: ‘Arguments’ does not name a type
../src/openzwave.cc:46:51: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:47:41: error: ‘Arguments’ does not name a type
../src/openzwave.cc:47:52: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:48:39: error: ‘Arguments’ does not name a type
../src/openzwave.cc:48:50: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:49:39: error: ‘Arguments’ does not name a type
../src/openzwave.cc:49:50: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
../src/openzwave.cc:54:1: error: ‘uv_async_t’ does not name a type
../src/openzwave.cc: In function ‘void {anonymous}::cb(const OpenZWave::Notification*, void*)’:
../src/openzwave.cc:149:17: error: ‘async’ was not declared in this scope
../src/openzwave.cc:149:22: error: ‘uv_async_send’ was not declared in this scope
../src/openzwave.cc: At global scope:
../src/openzwave.cc:155:23: error: variable or field ‘async_cb_handler’ declared void
../src/openzwave.cc:155:23: error: ‘uv_async_t’ was not declared in this scope
../src/openzwave.cc:155:35: error: ‘handle’ was not declared in this scope
../src/openzwave.cc:155:43: error: expected primary-expression before ‘int’
../src/openzwave.cc:728:1: error: expected ‘}’ at end of input
../src/openzwave.cc:84:24: warning: ‘{anonymous}::znodes_mutex’ defined but not used [-Wunused-variable]
../src/openzwave.cc:87:17: warning: ‘{anonymous}::homeid’ defined but not used [-Wunused-variable]
make: *** [Release/obj.target/openzwave/src/openzwave.o] Error 1
make: Leaving directory `/home/pi/playground/node_modules/openzwave/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:101:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:827:12)
gyp ERR! System Linux 3.6.11+
gyp ERR! command "node" "/opt/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/playground/node_modules/openzwave
gyp ERR! node -v v0.11.9
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! openzwave@0.0.32 install: `node-gyp rebuild`
npm ERR! System Linux 3.6.11+
GayathriKaliyamoorthy commented 10 years ago

I'm also getting the same stack trace when I compile my addon module with v0.11.9, but compiles fine with v0.10.x. Any suggestions would be really helpful.

jperkin commented 10 years ago

The ABI appears to have changed quite a bit in v0.11, and for now I'm going to punt. Rather than chasing unstable versions, I'm going to wait until it stabilises in v0.12 and aim for that, perhaps by using a wrapper as this is going to bite a lot of people.

Sorry if this affects your application, but I'd strongly suggest sticking with the stable v0.10 releases for now.

infernix commented 9 years ago

Please put a version requirement in the readme. I wasted quite a bit of time on this.

ekarak commented 9 years ago

:) shameless plug: OpenZWave/node-openzwave-shared compiles and runs under both Node 0.10.x and 0.12.x by leveraging the NaN abstraction layer (although I haven't really stressed it under 0.12.x to locate any mem leaks or race conditions)