Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies fail to build on Node 14 #20

Closed
mrstegeman opened this issue Oct 18, 2020 · 2 comments
Closed

Dependencies fail to build on Node 14 #20

mrstegeman opened this issue Oct 18, 2020 · 2 comments

Comments

@mrstegeman
Copy link
Contributor

Some of the dependencies are failing to compile. However, since they're listed as optional in the parent dependency, the package.sh script doesn't fail.

> @abandonware/[email protected] install /build/node_modules/@abandonware/i2c
> node-gyp rebuild

make: Entering directory '/build/node_modules/@abandonware/i2c/build'
  CXX(target) Release/obj.target/i2c/src/i2c.o
../src/i2c.cc: In function ‘void Scan(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:64:43: error: no matching function for call to ‘v8::Array::Set(int&, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
     results->Set(i, Nan::New<Integer>(res));
                                           ^
In file included from /root/.cache/node-gyp/14.13.0/include/node/node.h:67,
                 from ../src/i2c.cc:1:
/root/.cache/node-gyp/14.13.0/include/node/v8.h:3670:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/root/.cache/node-gyp/14.13.0/include/node/v8.h:3670:37: note:   candidate expects 3 arguments, 2 provided
/root/.cache/node-gyp/14.13.0/include/node/v8.h:3673:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/root/.cache/node-gyp/14.13.0/include/node/v8.h:3673:37: note:   candidate expects 3 arguments, 2 provided
../src/i2c.cc:72:77: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                             ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:72:77: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
   Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                             ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc: In function ‘void Open(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:104:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:104:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc: In function ‘void Read(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:126:45: error: no matching function for call to ‘v8::Array::Set(int&, Nan::imp::IntegerFactory<v8::Integer>::return_t)’
       data->Set(i, Nan::New<Integer>(buf[i]));
                                             ^
In file included from /root/.cache/node-gyp/14.13.0/include/node/node.h:67,
                 from ../src/i2c.cc:1:
/root/.cache/node-gyp/14.13.0/include/node/v8.h:3670:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/root/.cache/node-gyp/14.13.0/include/node/v8.h:3670:37: note:   candidate expects 3 arguments, 2 provided
/root/.cache/node-gyp/14.13.0/include/node/v8.h:3673:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/root/.cache/node-gyp/14.13.0/include/node/v8.h:3673:37: note:   candidate expects 3 arguments, 2 provided
../src/i2c.cc:135:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:135:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc: In function ‘void ReadByte(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:157:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:157:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc: In function ‘void ReadBlock(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:192:81: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
       Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                                 ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:192:81: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
       Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                                 ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc: In function ‘void Write(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:233:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:233:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc: In function ‘void WriteByte(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:256:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:256:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc: In function ‘void WriteBlock(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:285:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:285:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc: In function ‘void WriteWord(const Nan::FunctionCallbackInfo<v8::Value>&)’:
../src/i2c.cc:310:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
../src/i2c.cc:310:79: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
     Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv);
                                                                               ^
In file included from ../src/i2c.cc:3:
../../../nan/nan.h:1026:46: note: declared here
   NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                              ^~~~~~~~~~~~
In file included from ../src/i2c.cc:1:
../src/i2c.cc: At global scope:
/root/.cache/node-gyp/14.13.0/include/node/node.h:748:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/root/.cache/node-gyp/14.13.0/include/node/node.h:782:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/i2c.cc:355:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(i2c, Init)
 ^~~~~~~~~~~
make: *** [i2c.target.mk:109: Release/obj.target/i2c/src/i2c.o] Error 1
make: Leaving directory '/build/node_modules/@abandonware/i2c/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/root/.nvm/versions/node/v14.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 4.19.76-linuxkit
gyp ERR! command "/root/.nvm/versions/node/v14.13.0/bin/node" "/root/.nvm/versions/node/v14.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /build/node_modules/@abandonware/i2c
gyp ERR! node -v v14.13.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] (node_modules/@abandonware/i2c):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 8 packages from 6 contributors and audited 140 packages in 23.322s
found 0 vulnerabilities
@rzr
Copy link
Owner

rzr commented Oct 18, 2020

Thanks for feedback , this is an other mission for @abandonware team

this relates to:

kelly/node-i2c#98

rzr added a commit to abandonware/node-i2c that referenced this issue Oct 20, 2020
Relate-to: https://v8docs.nodesource.com/node-14.1/d3/d32/classv8_1_1_array.html
Relate-to: rzr/generic-sensors-webthings#20
Change-Id: I1ae50057f7815674f4f48f658a6b3262972a81dd
Signed-off-by: Philippe Coval <[email protected]>
rzr added a commit to abandonware/node-i2c that referenced this issue Oct 20, 2020
Relate-to: https://v8docs.nodesource.com/node-14.1/d3/d32/classv8_1_1_array.html
Relate-to: rzr/generic-sensors-webthings#20
Change-Id: I1ae50057f7815674f4f48f658a6b3262972a81dd
Signed-off-by: Philippe Coval <[email protected]>
@rzr
Copy link
Owner

rzr commented Oct 20, 2020

I think it's fixed now please review:

WebThingsIO/addon-list#1114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants