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

Fails to build on node.js v12.0.0 #127

Closed
coreyfarrell opened this issue Apr 25, 2019 · 1 comment
Closed

Fails to build on node.js v12.0.0 #127

coreyfarrell opened this issue Apr 25, 2019 · 1 comment

Comments

@coreyfarrell
Copy link

I found this error while attempting to enable testing of import-fresh under node.js 12. Tested with Fedora 28 though I suspect this is not platform specific. Please let me know if you need any further details.

  CXX(target) Release/obj.target/addon/src/heapdump.o
In file included from ../src/heapdump.cc:17:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../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]
     , reinterpret_cast(AsyncExecuteComplete)
                                                              ^
../src/heapdump.cc: In function ‘void {anonymous}::Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
../src/heapdump.cc:128:67: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
            Nan::New(Configure)->GetFunction());
                                                                   ^
In file included from /home/cfarrell/.node-gyp/12.0.0/include/node/node.h:63,
                 from ../src/heapdump.cc:15:
/home/cfarrell/.node-gyp/12.0.0/include/node/v8.h:5947:46: note: candidate: ‘v8::MaybeLocal v8::FunctionTemplate::GetFunction(v8::Local)’
   V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
                                              ^~~~~~~~~~~
/home/cfarrell/.node-gyp/12.0.0/include/node/v8.h:5947:46: note:   candidate expects 1 argument, 0 provided
../src/heapdump.cc:131:71: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
            Nan::New(WriteSnapshot)->GetFunction());
                                                                       ^
In file included from /home/cfarrell/.node-gyp/12.0.0/include/node/node.h:63,
                 from ../src/heapdump.cc:15:
/home/cfarrell/.node-gyp/12.0.0/include/node/v8.h:5947:46: note: candidate: ‘v8::MaybeLocal v8::FunctionTemplate::GetFunction(v8::Local)’
   V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
                                              ^~~~~~~~~~~
/home/cfarrell/.node-gyp/12.0.0/include/node/v8.h:5947:46: note:   candidate expects 1 argument, 0 provided
In file included from ../src/heapdump.cc:15:
../src/heapdump.cc: At global scope:
/home/cfarrell/.node-gyp/12.0.0/include/node/node.h:556:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local, v8::Local, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/home/cfarrell/.node-gyp/12.0.0/include/node/node.h:590:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/heapdump.cc:134:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(addon, Initialize)
 ^~~~~~~~~~~
In file included from /home/cfarrell/.node-gyp/12.0.0/include/node/node.h:63,
                 from ../src/heapdump.cc:15:
/home/cfarrell/.node-gyp/12.0.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void (*)(const v8::WeakCallbackInfo&)]’: /home/cfarrell/.node-gyp/12.0.0/include/node/node_object_wrap.h:84:78: required from here /home/cfarrell/.node-gyp/12.0.0/include/node/v8.h:9817:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} [-Wcast-function-type] reinterpret_cast(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cfarrell/.node-gyp/12.0.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void (*)(const v8::WeakCallbackInfo&)]’: ../../nan/nan_object_wrap.h:65:61: required from here /home/cfarrell/.node-gyp/12.0.0/include/node/v8.h:9817:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]

@bnoordhuis
Copy link
Owner

Fixed in v0.3.13. I'll release it later today when I'm near a computer where I can publish from.

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