-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
I was having issues with the npm published version. Building off the master branch works for Node v12:
yarn add https://github.com/charto/nbindBut I get errors when attempting to build with Node v13:
$ node-gyp configure build
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@13.6.0 | linux | x64
gyp info find Python using Python version 3.8.1 found at "/usr/sbin/python3"
gyp info spawn /usr/sbin/python3
gyp info spawn args [
gyp info spawn args '/<project_path>/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 '/<project_path>/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/<project_path>/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/<homedir>/.cache/node-gyp/13.6.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=/<homedir>/.cache/node-gyp/13.6.0',
gyp info spawn args '-Dnode_gyp_dir=/<project_path>/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/<homedir>/.cache/node-gyp/13.6.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/<project_path>',
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 '/<project_path>/build'
CXX(target) Release/obj.target/nbind/src/pack.o
In file included from ../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:55,
from ../../../node_modules/nbind/include/nbind/api.h:71,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
../../../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../node_modules/nan/nan.h:2298: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]
2298 | , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
| ^
In file included from ../../../node_modules/nbind/include/nbind/api.h:71,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
../../../node_modules/nbind/include/nbind/v8/BindWrapper.h: In member function ‘void nbind::BindWrapperBase::addInstance(v8::Local<v8::Object>)’:
../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:139:8: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘MarkIndependent’
139 | ref->MarkIndependent();
| ^~~~~~~~~~~~~~~
In file included from ../../../node_modules/nbind/include/nbind/api.h:78,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
../../../node_modules/nbind/include/nbind/v8/External.h: In constructor ‘nbind::External::Destructor<Data>::Destructor(void (*)(Data*), Data*, const Nan::Persistent<v8::Object, Nan::CopyablePersistentTraits<v8::Object> >&)’:
../../../node_modules/nbind/include/nbind/v8/External.h:77:9: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘MarkIndependent’
77 | weak.MarkIndependent();
| ^~~~~~~~~~~~~~~
In file included from ../../../node_modules/nbind/include/nbind/BindDefiner.h:18,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
../../../node_modules/nbind/include/nbind/v8/Caller.h: In function ‘v8::Local<v8::Value> nbind::makeTypeError(NanArgs&, uint32_t, const void* const*, bool*)’:
../../../node_modules/nbind/include/nbind/v8/Caller.h:28:59: error: no matching function for call to ‘v8::Array::Set(uint32_t&, Nan::imp::FactoryBase<v8::Boolean>::return_t)’
28 | flagArray->Set(num, Nan::New<v8::Boolean>(flagList[num]));
| ^
In file included from ../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:52,
from ../../../node_modules/nbind/include/nbind/api.h:71,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
3547 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
| ^~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate expects 3 arguments, 2 provided
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
3550 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
| ^~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate expects 3 arguments, 2 provided
In file included from ../../../node_modules/nbind/include/nbind/BindDefiner.h:18,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
../../../node_modules/nbind/include/nbind/v8/Caller.h:32:71: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::Array>&)’
32 | errObj->Set(Nan::New<v8::String>("flags").ToLocalChecked(), flagArray);
| ^
In file included from ../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:52,
from ../../../node_modules/nbind/include/nbind/api.h:71,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
3547 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
| ^~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3547:37: note: candidate expects 3 arguments, 2 provided
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
3550 | V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
| ^~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3550:37: note: candidate expects 3 arguments, 2 provided
In file included from ../../../node_modules/nbind/include/nbind/BindDefiner.h:23,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
../../../node_modules/nbind/include/nbind/v8/ValueObj.h: In static member function ‘static ArgType nbind::BindingType<nbind::ValueType<ArgType> >::fromWireType(nbind::WireType)’:
../../../node_modules/nbind/include/nbind/v8/ValueObj.h:115:75: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
115 | auto fromJS = target->Get(Nan::New<v8::String>("fromJS").ToLocalChecked());
| ^
In file included from ../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:52,
from ../../../node_modules/nbind/include/nbind/api.h:71,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3594:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
3594 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
| ^~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3594:43: note: candidate expects 2 arguments, 1 provided
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3597:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
3597 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
| ^~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3597:43: note: candidate expects 2 arguments, 1 provided
In file included from ../../../node_modules/nbind/include/nbind/BindDefiner.h:24,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
../../../node_modules/nbind/include/nbind/v8/Int64.h: In function ‘ArgType nbind::int64FromWire(nbind::WireType, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../../../node_modules/nbind/include/nbind/v8/Int64.h:15:75: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
15 | auto fromJS = target->Get(Nan::New<v8::String>("fromJS").ToLocalChecked());
| ^
In file included from ../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:52,
from ../../../node_modules/nbind/include/nbind/api.h:71,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3594:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
3594 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
| ^~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3594:43: note: candidate expects 2 arguments, 1 provided
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3597:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
3597 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
| ^~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:3597:43: note: candidate expects 2 arguments, 1 provided
/<homedir>/.cache/node-gyp/13.6.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>&)]’:
/<homedir>/.cache/node-gyp/13.6.0/include/node/node_object_wrap.h:85:78: required from here
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:10400: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]
10400 | reinterpret_cast<Callback>(callback), type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/<homedir>/.cache/node-gyp/13.6.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:65:61: required from here
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:10400: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]
In file included from ../../../node_modules/nan/nan.h:2784,
from ../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:55,
from ../../../node_modules/nbind/include/nbind/api.h:71,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
../../../node_modules/nan/nan_weak.h: In instantiation of ‘Nan::WeakCallbackInfo<P>::WeakCallbackInfo(Nan::Persistent<v8::Value>*, Nan::WeakCallbackInfo<P>::Callback, void*, void*, void*) [with T = Nan::Persistent<v8::Object>; Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<Nan::Persistent<v8::Object> >&)]’:
../../../node_modules/nan/nan_weak.h:264:12: required from ‘void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = Nan::Persistent<v8::Object>; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<Nan::Persistent<v8::Object> >&); Nan::WeakCallbackType = v8::WeakCallbackType]’
../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:138:68: required from here
../../../node_modules/nan/nan_weak.h:58:16: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class v8::Persistent<v8::Value>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
58 | std::memcpy(&persistent_, persistent, sizeof (v8::Persistent<v8::Value>));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:52,
from ../../../node_modules/nbind/include/nbind/api.h:71,
from ../../../node_modules/nbind/include/nbind/BindDefiner.h:11,
from ../../../node_modules/nbind/include/nbind/noconflict.h:8,
from ../../../node_modules/nbind/include/nbind/nbind.h:8,
from ../src/pack.cc:14:
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:646:35: note: ‘class v8::Persistent<v8::Value>’ declared here
646 | template <class T, class M> class Persistent : public PersistentBase<T> {
| ^~~~~~~~~~
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::WeakCallbackInfo<Nan::Persistent<v8::Object> >; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::WeakCallbackInfo<Nan::Persistent<v8::Object> > >&)]’:
../../../node_modules/nan/nan_weak.h:268:35: required from ‘void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = Nan::Persistent<v8::Object>; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<Nan::Persistent<v8::Object> >&); Nan::WeakCallbackType = v8::WeakCallbackType]’
../../../node_modules/nbind/include/nbind/v8/BindWrapper.h:138:68: required from here
/<homedir>/.cache/node-gyp/13.6.0/include/node/v8.h:10400:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::WeakCallbackInfo<Nan::Persistent<v8::Object> > >::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::WeakCallbackInfo<Nan::Persistent<v8::Object> > >&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
10400 | reinterpret_cast<Callback>(callback), type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [nbind.target.mk:138: Release/obj.target/nbind/src/pack.o] Error 1
make: Leaving directory '/<project_path>/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/<project_path>/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.4.0-17763-Microsoft
gyp ERR! command "/<homedir>/.nvm/versions/node/v13.6.0/bin/node" "/<project_path>/node_modules/.bin/node-gyp" "configure" "build"
gyp ERR! cwd /<project_path>
gyp ERR! node -v v13.6.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not okpirate, kelvinhammond, Skywalker13, buckle2000, JessicaMulein and 1 more
Metadata
Metadata
Assignees
Labels
No labels