CoenBresser / homebridge-neo-pixel-platform

A plugin for Homebridge to be able to define and control multiple lights on a single NeoPixel strand of LED's
MIT License
1 stars 1 forks source link

gyp ERR! build error #1

Open zakickes opened 3 years ago

zakickes commented 3 years ago

Hey there Coen. Tried to use this with the most recent version of Homebridge, but I cannot get past the install. I have all dependencies correctly installed, and can otherwise control the LEDS via python.

USER: pi
DIR: /usr/local
CMD: sudo -E -n npm install -g homebridge-neopixel-platform@latest

> rpi-ws281x-native@0.8.2 install /usr/local/lib/node_modules/homebridge-neopixel-platform/node_modules/rpi-ws281x-native
> node-gyp rebuild

make: Entering directory '/usr/local/lib/node_modules/homebridge-neopixel-platform/node_modules/rpi-ws281x-native/build'
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/ws2811.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/pwm.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/dma.o
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/mailbox.o
../src/rpi_ws281x/mailbox.c: In function ‘mbox_open’:
../src/rpi_ws281x/mailbox.c:289:37: warning: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration]
   if (mknod(filename, S_IFCHR|0600, makedev(100, 0)) < 0) {
                                     ^~~~~~~
  CC(target) Release/obj.target/rpi_libws2811/src/rpi_ws281x/board_info.o
  AR(target) Release/obj.target/rpi_libws2811.a
  COPY Release/rpi_libws2811.a
  CXX(target) Release/obj.target/rpi_ws281x/src/rpi-ws281x.o
../src/rpi-ws281x.cc: In function ‘void render(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/rpi-ws281x.cc:43:44: error: no matching function for call to ‘v8::Value::ToObject()’
   Local<Object> buffer = info[0]->ToObject();
                                            ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:2822:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:2822:44: note:   candidate expects 1 argument, 0 provided
../src/rpi-ws281x.cc: In function ‘void init(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/rpi-ws281x.cc:87:52: error: no matching function for call to ‘v8::Value::Int32Value()’
   ledstring.channel[0].count = info[0]->Int32Value();
                                                    ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:2869:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:2869:40: note:   candidate expects 1 argument, 0 provided
../src/rpi-ws281x.cc:91:46: error: no matching function for call to ‘v8::Value::ToObject()’
     Local<Object> config = info[1]->ToObject();
                                              ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:2822:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                            ^~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:2822:44: note:   candidate expects 1 argument, 0 provided
../src/rpi-ws281x.cc:100:38: error: no matching function for call to ‘v8::Object::HasOwnProperty(v8::Local<v8::String>&)’
     if(config->HasOwnProperty(symFreq)) {
                                      ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, v8::Local<v8::Name>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:101:43: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
       ledstring.freq = config->Get(symFreq)->Uint32Value();
                                           ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:104:40: error: no matching function for call to ‘v8::Object::HasOwnProperty(v8::Local<v8::String>&)’
     if(config->HasOwnProperty(symDmaNum)) {
                                        ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, v8::Local<v8::Name>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:105:47: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
       ledstring.dmanum = config->Get(symDmaNum)->Int32Value();
                                               ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:108:41: error: no matching function for call to ‘v8::Object::HasOwnProperty(v8::Local<v8::String>&)’
     if(config->HasOwnProperty(symGpioPin)) {
                                         ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, v8::Local<v8::Name>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:109:60: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
       ledstring.channel[0].gpionum = config->Get(symGpioPin)->Int32Value();
                                                            ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:112:40: error: no matching function for call to ‘v8::Object::HasOwnProperty(v8::Local<v8::String>&)’
     if(config->HasOwnProperty(symInvert)) {
                                        ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, v8::Local<v8::Name>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:113:58: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
       ledstring.channel[0].invert = config->Get(symInvert)->Int32Value();
                                                          ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:116:44: error: no matching function for call to ‘v8::Object::HasOwnProperty(v8::Local<v8::String>&)’
     if(config->HasOwnProperty(symBrightness)) {
                                            ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, v8::Local<v8::Name>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3943:37: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note: candidate: ‘v8::Maybe<bool> v8::Object::HasOwnProperty(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
                                     ^~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3945:37: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc:117:66: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>&)’
       ledstring.channel[0].brightness = config->Get(symBrightness)->Int32Value();
                                                                  ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3717:43: note:   candidate expects 2 arguments, 1 provided
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:3720:43: note:   candidate expects 2 arguments, 1 provided
../src/rpi-ws281x.cc: In function ‘void setBrightness(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/rpi-ws281x.cc:144:57: error: no matching function for call to ‘v8::Value::Int32Value()’
   ledstring.channel[0].brightness = info[0]->Int32Value();
                                                         ^
In file included from /home/pi/.cache/node-gyp/14.15.0/include/node/node.h:67,
                 from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:2869:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
   V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                        ^~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/v8.h:2869:40: note:   candidate expects 1 argument, 0 provided
../src/rpi-ws281x.cc: At global scope:
../src/rpi-ws281x.cc:168:17: error: variable or field ‘initialize’ declared void
 void initialize(Handle<Object> exports) {
                 ^~~~~~
../src/rpi-ws281x.cc:168:17: error: ‘Handle’ was not declared in this scope
../src/rpi-ws281x.cc:168:17: note: suggested alternative: ‘rand_r’
 void initialize(Handle<Object> exports) {
                 ^~~~~~
                 rand_r
../src/rpi-ws281x.cc:168:30: error: expected primary-expression before ‘>’ token
 void initialize(Handle<Object> exports) {
                              ^
../src/rpi-ws281x.cc:168:32: error: ‘exports’ was not declared in this scope
 void initialize(Handle<Object> exports) {
                                ^~~~~~~
In file included from ../../nan/nan.h:56,
                 from ../src/rpi-ws281x.cc:1:
../src/rpi-ws281x.cc:175:25: error: ‘initialize’ was not declared in this scope
 NODE_MODULE(rpi_ws281x, initialize)
                         ^~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/node.h:758:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../src/rpi-ws281x.cc:175:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(rpi_ws281x, initialize)
 ^~~~~~~~~~~
../src/rpi-ws281x.cc:175:25: note: suggested alternative: ‘initstate’
 NODE_MODULE(rpi_ws281x, initialize)
                         ^~~~~~~~~~
/home/pi/.cache/node-gyp/14.15.0/include/node/node.h:758:36: note: in definition of macro ‘NODE_MODULE_X’
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../src/rpi-ws281x.cc:175:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(rpi_ws281x, initialize)
 ^~~~~~~~~~~
make: *** [rpi_ws281x.target.mk:112: Release/obj.target/rpi_ws281x/src/rpi-ws281x.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homebridge-neopixel-platform/node_modules/rpi-ws281x-native/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.4.72-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-neopixel-platform/node_modules/rpi-ws281x-native
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN notsup Unsupported engine for homebridge-neopixel-platform@0.0.11: wanted: {"homebridge":"^0.4.38","node":"^6.0.0"} (current: {"node":"14.15.0","npm":"6.14.8"})
npm WARN notsup Not compatible with your version of node/npm: homebridge-neopixel-platform@0.0.11

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rpi-ws281x-native@0.8.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the rpi-ws281x-native@0.8.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-11-18T00_08_31_381Z-debug.log

Command failed. Please review log for details.

Any help is appreciated

haiax commented 3 years ago

It looks like an issue with the rpi-ws281x-native package version 0.8.2. However, version 0.10.1 can be installed without problem. I suppose the dependencies need to be updated.