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

Does not build with node 12 #17

Open
ml- opened this issue Aug 10, 2019 · 0 comments
Open

Does not build with node 12 #17

ml- opened this issue Aug 10, 2019 · 0 comments

Comments

@ml-
Copy link

ml- commented Aug 10, 2019

I'm trying to build an application that uses @paulcbetts/system-idle-time as a dependency.
The build fails when using node 12

Error:

Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /home/ml/apps/rocketchat-desktop/src/Rocket.Chat.Electron-2.15.5/node_modules/@paulcbetts/system-idle-time
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.2
gyp info using node@12.8.0 | linux | x64
gyp info find Python using Python version 2.7.16 found at "/usr/bin/python2"
gyp info spawn /usr/bin/python2
gyp info spawn args [
gyp info spawn args   '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ml/apps/rocketchat-desktop/src/Rocket.Chat.Electron-2.15.5/node_modules/@paulcbetts/system-idle-time/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ml/.cache/node-gyp/12.8.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/ml/.cache/node-gyp/12.8.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/ml/.cache/node-gyp/12.8.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/ml/apps/rocketchat-desktop/src/Rocket.Chat.Electron-2.15.5/node_modules/@paulcbetts/system-idle-time',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/ml/apps/rocketchat-desktop/src/Rocket.Chat.Electron-2.15.5/node_modules/@paulcbetts/system-idle-time/build'
CXX(target) Release/obj.target/system_idle_time/src/module.o
In file included from ../node_modules/nan/nan_converters.h:67,
from ../node_modules/nan/nan.h:222,
from ../src/module.h:4,
from ../src/module.cc:1:
../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’:
../node_modules/nan/nan_converters_43_inl.h:18:51: warning: ‘v8::MaybeLocal<v8::Boolean> v8::Value::ToBoolean(v8::Local<v8::Context>) const’ is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
18 |       val->To ## TYPE(isolate->GetCurrentContext())                            \
|                                                   ^
../node_modules/nan/nan_converters_43_inl.h:22:1: note: in expansion of macro ‘X’
22 | X(Boolean)
| ^
In file included from /home/ml/.cache/node-gyp/12.8.0/include/node/v8-internal.h:14,
from /home/ml/.cache/node-gyp/12.8.0/include/node/v8.h:25,
from /home/ml/.cache/node-gyp/12.8.0/include/node/node.h:63,
from ../node_modules/nan/nan.h:53,
from ../src/module.h:4,
from ../src/module.cc:1:
/home/ml/.cache/node-gyp/12.8.0/include/node/v8.h:2531:59: note: declared here
2531 |                 V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
|                                                           ^~~~~~~~~
/home/ml/.cache/node-gyp/12.8.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
311 |   declarator __attribute__((deprecated(message)))
|   ^~~~~~~~~~
In file included from ../node_modules/nan/nan_converters.h:67,
from ../node_modules/nan/nan.h:222,
from ../src/module.h:4,
from ../src/module.cc:1:
../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)’:
../node_modules/nan/nan_converters_43_inl.h:37:57: warning: ‘v8::Maybe<bool> v8::Value::BooleanValue(v8::Local<v8::Context>) const’ is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
37 |   return val->NAME ## Value(isolate->GetCurrentContext());                     \
|                                                         ^
../node_modules/nan/nan_converters_43_inl.h:40:1: note: in expansion of macro ‘X’
40 | X(bool, Boolean)
| ^
In file included from /home/ml/.cache/node-gyp/12.8.0/include/node/v8-internal.h:14,
from /home/ml/.cache/node-gyp/12.8.0/include/node/v8.h:25,
from /home/ml/.cache/node-gyp/12.8.0/include/node/node.h:63,
from ../node_modules/nan/nan.h:53,
from ../src/module.h:4,
from ../src/module.cc:1:
/home/ml/.cache/node-gyp/12.8.0/include/node/v8.h:2569:51: note: declared here
2569 |                 V8_WARN_UNUSED_RESULT Maybe<bool> BooleanValue(
|                                                   ^~~~~~~~~~~~
/home/ml/.cache/node-gyp/12.8.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
311 |   declarator __attribute__((deprecated(message)))
|   ^~~~~~~~~~
In file included from ../node_modules/nan/nan_new.h:189,
from ../node_modules/nan/nan.h:223,
from ../src/module.h:4,
from ../src/module.cc:1:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::StringObject>::return_t Nan::imp::Factory<v8::StringObject>::New(v8::Local<v8::String>)’:
../node_modules/nan/nan_implementation_12_inl.h:356:37: error: no matching function for call to ‘v8::StringObject::New(v8::Local<v8::String>&)’
356 |   return v8::StringObject::New(value).As<v8::StringObject>();
|                                     ^
In file included from /home/ml/.cache/node-gyp/12.8.0/include/node/node.h:63,
from ../node_modules/nan/nan.h:53,
from ../src/module.h:4,
from ../src/module.cc:1:
/home/ml/.cache/node-gyp/12.8.0/include/node/v8.h:5388:23: note: candidate: ‘static v8::Local<v8::Value> v8::StringObject::New(v8::Isolate*, v8::Local<v8::String>)’
5388 |   static Local<Value> New(Isolate* isolate, Local<String> value);
|                       ^~~
/home/ml/.cache/node-gyp/12.8.0/include/node/v8.h:5388:23: note:   candidate expects 2 arguments, 1 provided
In file included from ../node_modules/nan/nan_new.h:189,
from ../node_modules/nan/nan.h:223,
from ../src/module.h:4,
from ../src/module.cc:1:
../node_modules/nan/nan_implementation_12_inl.h:356:58: error: expected primary-expression before ‘>’ token
356 |   return v8::StringObject::New(value).As<v8::StringObject>();
|                                                          ^
../node_modules/nan/nan_implementation_12_inl.h:356:60: error: expected primary-expression before ‘)’ token
356 |   return v8::StringObject::New(value).As<v8::StringObject>();
|                                                            ^
In file included from ../src/module.h:4,
from ../src/module.cc:1:
../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../node_modules/nan/nan.h:2232:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
2232 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
|                                                              ^
In file included from /usr/include/c++/9.1.0/cassert:44,
from /home/ml/.cache/node-gyp/12.8.0/include/node/node_object_wrap.h:26,
from ../node_modules/nan/nan.h:55,
from ../src/module.h:4,
from ../src/module.cc:1:
../node_modules/nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
../node_modules/nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
24 |     assert(persistent().IsNearDeath());
|                         ^~~~~~~~~~~
../node_modules/nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’:
../node_modules/nan/nan_object_wrap.h:127:26: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
127 |     assert(wrap->handle_.IsNearDeath());
|                          ^~~~~~~~~~~
In file included from ../node_modules/nan/nan.h:53,
from ../src/module.h:4,
from ../src/module.cc:1:
../src/module.cc: At global scope:
/home/ml/.cache/node-gyp/12.8.0/include/node/node.h:556:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
556 |       (node::addon_register_func) (regfunc),                          \
|                                           ^
/home/ml/.cache/node-gyp/12.8.0/include/node/node.h:590:3: note: in expansion of macro ‘NODE_MODULE_X’
590 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
|   ^~~~~~~~~~~~~
../src/module.cc:18:1: note: in expansion of macro ‘NODE_MODULE’
18 | NODE_MODULE(system_idle_time, IdleTime::Init)
| ^~~~~~~~~~~
In file included from /home/ml/.cache/node-gyp/12.8.0/include/node/node.h:63,
from ../node_modules/nan/nan.h:53,
from ../src/module.h:4,
from ../src/module.cc:1:
/home/ml/.cache/node-gyp/12.8.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/ml/.cache/node-gyp/12.8.0/include/node/node_object_wrap.h:84:78:   required from here
/home/ml/.cache/node-gyp/12.8.0/include/node/v8.h:9853:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
9853 |                reinterpret_cast<Callback>(callback), type);
|                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ml/.cache/node-gyp/12.8.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../node_modules/nan/nan_object_wrap.h:66:61:   required from here
/home/ml/.cache/node-gyp/12.8.0/include/node/v8.h:9853:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
make: *** [system_idle_time.target.mk:108: Release/obj.target/system_idle_time/src/module.o] Error 1
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

1 participant