TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
451 stars 141 forks source link

Support for node 10 #104

Open dganzella opened 5 years ago

dganzella commented 5 years ago

it seeems binding.cc is using non-existent functions on newer node versions.

Like -

./src/binding.cc:619:11: error: no member named 'ForceSet' in 'v8::Object' target->ForceSet(Nan::New("endianness").ToLocalChecked(), Nan::New(CheckEndianness()).ToLocalChecked(), static_cast(ReadOnly|DontDelete));



Is there is a way to go around it? Or is this updated somewhere ?
elisaado commented 5 years ago

@dganzella Do you happen to know which node version does work right now?

dganzella commented 5 years ago

@dganzella Do you happen to know which node version does work right now?

@elisaado Version 67. I had posted a screenshot but I simply have no idea where that went

dganzella commented 5 years ago

Oh yeah, here :

https://github.com/TooTallNate/NodObjC/issues/111

dganzella commented 5 years ago

(Just so you know, I realized it was most likely a problem with nodObjC that is using an old ref branch and not ref itself)

elisaado commented 5 years ago

@dganzella Ah, okay, thank you.

Q-Zhan commented 5 years ago

I have the same problem while using nodev10.9.0 to install ref.I want to know what can I do.

-bash-4.1# tnpm i ref

ref@1.3.5 install /data/sites/now.qq.com/zhixu_admin/TSW/now-node-monitor/src/node_modules/ref node-gyp rebuild

make: Entering directory /data/sites/now.qq.com/zhixu_admin/TSW/now-node-monitor/src/node_modules/ref/build' CXX(target) Release/obj.target/binding/src/binding.o In file included from ../src/binding.cc:7:0: ../../nan/nan.h: 在构造函数‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’中: ../../nan/nan.h:1081:101: 错误:对‘v8::String::WriteUtf8(v8::Isolate*, char*&, int, int, const int&)’的调用没有匹配的函数 length_ = string->WriteUtf8(v8::Isolate::GetCurrent(), str_, static_cast<int>(len), 0, flags); ^ ../../nan/nan.h:1081:101: 附注:备选是: In file included from /root/.node-gyp/10.9.0/include/node/node.h:63:0, from ../src/binding.cc:5: /root/.node-gyp/10.9.0/include/node/v8.h:2645:7: 附注:int v8::String::WriteUtf8(char*, int, int*, int) const int WriteUtf8(char* buffer, ^ /root/.node-gyp/10.9.0/include/node/v8.h:2645:7: 附注: 备选需要 4 实参,但提供了 5 个 ../src/binding.cc: 在函数‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::WriteInt64(Nan::NAN_METHOD_ARGS_TYPE)’中: ../src/binding.cc:360:30: 警告:‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.node-gyp/10.9.0/include/node/v8.h:2874): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value _str(in); ^ ../src/binding.cc: 在函数‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::WriteUInt64(Nan::NAN_METHOD_ARGS_TYPE)’中: ../src/binding.cc:447:30: 警告:‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.node-gyp/10.9.0/include/node/v8.h:2874): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value _str(in); ^ ../src/binding.cc: 在函数‘void init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’中: ../src/binding.cc:643:8: 警告:‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at ../../nan/nan_maybe_43_inl.h:130) [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8::String>(CheckEndianness()).ToLocalChecked(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)); ^ ../src/binding.cc:643:187: 警告:‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at ../../nan/nan_maybe_43_inl.h:130) [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8::String>(CheckEndianness()).ToLocalChecked(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)); ^ ../src/binding.cc:644:8: 警告:‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at ../../nan/nan_maybe_43_inl.h:130) [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::New<v8::String>("NULL").ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)); ^ ../src/binding.cc:644:142: 警告:‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at ../../nan/nan_maybe_43_inl.h:130) [-Wdeprecated-declarations] Nan::ForceSet(target, Nan::New<v8::String>("NULL").ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete)); ^ make: *** [Release/obj.target/binding/src/binding.o] 错误 1 make: Leaving directory/data/sites/now.qq.com/zhixu_admin/TSW/now-node-monitor/src/node_modules/ref/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/data/services/TSW-1.0/bin/tnpm/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12) gyp ERR! System Linux 3.10.94-1-tlinux2_kvm_guest-0019.tl1 gyp ERR! command "/root/.nvm/versions/node/v10.9.0/bin/node" "/data/services/TSW-1.0/bin/tnpm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /data/sites/now.qq.com/zhixu_admin/TSW/now-node-monitor/src/node_modules/ref gyp ERR! node -v v10.9.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN nodejs_monitor_oss@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ref@1.3.5 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ref@1.3.5 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.tnpm/_logs/2018-12-18T08_43_30_811Z-debug.log