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

Compilation failure on main #894

Closed
gabrielschulhof opened this issue Jan 30, 2021 · 2 comments
Closed

Compilation failure on main #894

gabrielschulhof opened this issue Jan 30, 2021 · 2 comments

Comments

@gabrielschulhof
Copy link
Contributor

I tried to build from main and got this:

../typed_threadsafe_function/typed_threadsafe_function_ctx.cc: In constructor ‘{anonymous}::TSFNWrap::TSFNWrap(const Napi::CallbackInfo&)’:
../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:59:22: error: no matching function for call to ‘Napi::TypedThreadSafeFunction<Napi::Reference<Napi::Value> >::New(Napi::Env, Napi::Object, const char [5], int, int, ContextType*&, {anonymous}::TSFNWrap::TSFNWrap(const Napi::CallbackInfo&)::<lambda(Napi::Env, void*, ContextType*)>)’
   59 |                     });
      |                      ^
In file included from ../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:1:
../../napi.h:2345:67: note: candidate: ‘template<class ResourceString> static Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs> Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(napi_env, const Napi::Function&, ResourceString, size_t, size_t, ContextType*) [with ResourceString = ResourceString; ContextType = Napi::Reference<Napi::Value>; DataType = void; void (* CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*) = 0]’
 2345 |     static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
      |                                                                   ^~~
../../napi.h:2345:67: note:   template argument deduction/substitution failed:
../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:59:22: note:   candidate expects 6 arguments, 7 provided
   59 |                     });
      |                      ^
In file included from ../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:1:
../../napi.h:2357:67: note: candidate: ‘template<class ResourceString> static Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs> Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(napi_env, const Napi::Function&, const Napi::Object&, ResourceString, size_t, size_t, ContextType*) [with ResourceString = ResourceString; ContextType = Napi::Reference<Napi::Value>; DataType = void; void (* CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*) = 0]’
 2357 |     static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
      |                                                                   ^~~
../../napi.h:2357:67: note:   template argument deduction/substitution failed:
../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:50:32: note:   cannot convert ‘(({anonymous}::TSFNWrap*)this)->{anonymous}::TSFNWrap::<anonymous>.Napi::ObjectWrap<{anonymous}::TSFNWrap>::<anonymous>.Napi::Reference<Napi::Object>::Value()’ (type ‘Napi::Object’) to type ‘const Napi::Function&’
   50 |                     this->Value(),
      |                     ~~~~~~~~~~~^~
In file included from ../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:1:
../../napi.h:2372:67: note: candidate: ‘template<class ResourceString, class Finalizer, class FinalizerDataType> static Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs> Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(napi_env, const Napi::Function&, ResourceString, size_t, size_t, ContextType*, Finalizer, FinalizerDataType*) [with ResourceString = ResourceString; Finalizer = Finalizer; FinalizerDataType = FinalizerDataType; ContextType = Napi::Reference<Napi::Value>; DataType = void; void (* CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*) = 0]’
 2372 |     static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
      |                                                                   ^~~
../../napi.h:2372:67: note:   template argument deduction/substitution failed:
../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:50:32: note:   cannot convert ‘(({anonymous}::TSFNWrap*)this)->{anonymous}::TSFNWrap::<anonymous>.Napi::ObjectWrap<{anonymous}::TSFNWrap>::<anonymous>.Napi::Reference<Napi::Object>::Value()’ (type ‘Napi::Object’) to type ‘const Napi::Function&’
   50 |                     this->Value(),
      |                     ~~~~~~~~~~~^~
In file included from ../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:1:
../../napi.h:2389:67: note: candidate: ‘template<class CallbackType, class ResourceString, class Finalizer, class FinalizerDataType> static Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs> Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(napi_env, CallbackType, const Napi::Object&, ResourceString, size_t, size_t, ContextType*, Finalizer, FinalizerDataType*) [with CallbackType = CallbackType; ResourceString = ResourceString; Finalizer = Finalizer; FinalizerDataType = FinalizerDataType; ContextType = Napi::Reference<Napi::Value>; DataType = void; void (* CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*) = 0]’
 2389 |     static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
      |                                                                   ^~~
../../napi.h:2389:67: note:   template argument deduction/substitution failed:
../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:59:22: note:   candidate expects 9 arguments, 7 provided
   59 |                     });
      |                      ^
In file included from ../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:1:
../../napi.h:2434:67: note: candidate: ‘template<class ResourceString, class Finalizer, class FinalizerDataType> static Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs> Napi::TypedThreadSafeFunction<ContextType, DataType, CallJs>::New(napi_env, const Napi::Function&, const Napi::Object&, ResourceString, size_t, size_t, ContextType*, Finalizer, FinalizerDataType*, napi_finalize) [with ResourceString = ResourceString; Finalizer = Finalizer; FinalizerDataType = FinalizerDataType; ContextType = Napi::Reference<Napi::Value>; DataType = void; void (* CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*) = 0]’
 2434 |     static TypedThreadSafeFunction<ContextType, DataType, CallJs> New(
      |                                                                   ^~~
../../napi.h:2434:67: note:   template argument deduction/substitution failed:
../typed_threadsafe_function/typed_threadsafe_function_ctx.cc:59:22: note:   candidate expects 10 arguments, 7 provided
   59 |                     });
      |                      ^
@mhdawson
Copy link
Member

mhdawson commented Feb 1, 2021

What environment/compiler?

The nightly CI runs seem ok: https://ci.nodejs.org/view/x%20-%20Abi%20stable%20module%20API/job/node-test-node-addon-api-LTS%20versions/

@gabrielschulhof
Copy link
Contributor Author

NM. Must be something local. It went away after a thorough git clean.

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