node-hashtable
node-hashtable copied to clipboard
Build Fails with Node v13.8.0
I'm trying to install this on Arch Linux, and I get the following:
> [email protected] install /home/lain/test/node_modules/hashtable
> node-gyp configure build
make: Entering directory '/home/lain/test/node_modules/hashtable/build'
CXX(target) Release/obj.target/native/src/hashtable.o
In file included from ../src/hashtable.h:14,
from ../src/hashtable.cpp:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../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 ../src/hashtable.h:15,
from ../src/hashtable.cpp:1:
../src/v8_value_hasher.h: In member function ‘bool v8_value_equal_to::operator()(CopyablePersistent*, CopyablePersistent*) const’:
../src/v8_value_hasher.h:43:24: error: no matching function for call to ‘v8::Value::Equals(v8::Local<v8::Value>&)’
43 | if (a->Equals(b)) { /* same as JS == */
| ^
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2781:37: note: candidate: ‘v8::Maybe<bool> v8::Value::Equals(v8::Local<v8::Context>, v8::Local<v8::Value>) const’
2781 | V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
| ^~~~~~
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2781:37: note: candidate expects 2 arguments, 1 provided
../src/hashtable.cpp: In static member function ‘static void HashTable::init(v8::Local<v8::Object>)’:
../src/hashtable.cpp:26:82: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
26 | target->Set(Nan::New("HashTable").ToLocalChecked(), constructor->GetFunction());
| ^
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:6283:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
6283 | V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
| ^~~~~~~~~~~
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:6283:46: note: candidate expects 1 argument, 0 provided
../src/hashtable.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HashTable::Constructor(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/hashtable.cpp:50:43: error: no matching function for call to ‘v8::Value::Int32Value()’
50 | int buckets = info[0]->Int32Value();
| ^
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2778:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
2778 | V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
| ^~~~~~~~~~
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2778:40: note: candidate expects 1 argument, 0 provided
../src/hashtable.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HashTable::Rehash(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/hashtable.cpp:231:42: error: no matching function for call to ‘v8::Value::Int32Value()’
231 | size_t buckets = info[0]->Int32Value();
| ^
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2778:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
2778 | V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
| ^~~~~~~~~~
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2778:40: note: candidate expects 1 argument, 0 provided
../src/hashtable.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HashTable::Reserve(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/hashtable.cpp:249:43: error: no matching function for call to ‘v8::Value::Int32Value()’
249 | size_t elements = info[0]->Int32Value();
| ^
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2778:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
2778 | V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
| ^~~~~~~~~~
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2778:40: note: candidate expects 1 argument, 0 provided
../src/hashtable.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HashTable::MaxLoadFactor(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/hashtable.cpp:266:39: error: no matching function for call to ‘v8::Value::NumberValue()’
266 | factor = info[0]->NumberValue();
| ^
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2773:39: note: candidate: ‘v8::Maybe<double> v8::Value::NumberValue(v8::Local<v8::Context>) const’
2773 | V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
| ^~~~~~~~~~~
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2773:39: note: candidate expects 1 argument, 0 provided
../src/hashtable.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HashTable::ForEach(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/hashtable.cpp:289:33: error: no matching function for call to ‘v8::Value::ToObject()’
289 | ctx = info[1]->ToObject();
| ^
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2754:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
2754 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
| ^~~~~~~~
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:2754:44: note: candidate expects 1 argument, 0 provided
../src/hashtable.cpp:303:33: error: no matching function for call to ‘v8::Function::Call(v8::Local<v8::Object>&, const unsigned int&, v8::Local<v8::Value> [3])’
303 | cb->Call(ctx, argc, argv);
| ^
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:4335:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)’
4335 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Call(Local<Context> context,
| ^~~~
/home/lain/.cache/node-gyp/13.8.0/include/node/v8.h:4335:43: note: candidate expects 4 arguments, 3 provided
In file included from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
../src/hashtable.cpp: At global scope:
/home/lain/.cache/node-gyp/13.8.0/include/node/node.h:610: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-typ ]
610 | (node::addon_register_func) (regfunc), \
| ^
/home/lain/.cache/node-gyp/13.8.0/include/node/node.h:644:3: note: in expansion of macro ‘NODE_MODULE_X’
644 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/hashtable.cpp:318:1: note: in expansion of macro ‘NODE_MODULE’
318 | NODE_MODULE(map, init);
| ^~~~~~~~~~~
In file included from /home/lain/.cache/node-gyp/13.8.0/include/node/node.h:63,
from ../src/hashtable.h:13,
from ../src/hashtable.cpp:1:
/home/lain/.cache/node-gyp/13.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/lain/.cache/node-gyp/13.8.0/include/node/node_object_wrap.h:85:78: required from here
/home/lain/.cache/node-gyp/13.8.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);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lain/.cache/node-gyp/13.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>&)]’:
../../nan/nan_object_wrap.h:65:61: required from here
/home/lain/.cache/node-gyp/13.8.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]
make: *** [native.target.mk:111: Release/obj.target/native/src/hashtable.o] Error 1
make: Leaving directory '/home/lain/test/node_modules/hashtable/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/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 5.5.2-arch1-1
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/lain/test/node_modules/hashtable
gyp ERR! node -v v13.8.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok