cat /proc/version: Linux version 4.4.0-97-generic (buildd@lcy01-16) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) )
node --version: v8.10.0
npm --version: 5.7.1
node-gyp --version: v3.6.2
cld: 2.4.7
I get the following build error when I run the command npm i cld:
> cld@2.4.7 install /home/user/node-upgrade/node_modules/cld
> node-gyp rebuild
make: Entering directory `/home/user/node-upgrade/node_modules/cld/build'
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil_shared.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_hint_code.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_impl.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/debug.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/fixunicodevalue.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_entities.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_language.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_ulscript.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/getonescriptspan.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/lang_script.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/offsetmap.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/scoreonescriptspan.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/tote.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/utf8statetable.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_uni_prop_80.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_cjk_compatible.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_delta_bi_32.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_distinct_bi_0.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quad0122.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaocta0122.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaoctachrome.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctocta0122.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctoctachrome.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_16.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_2.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_0122.o
CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_2.o
AR(target) Release/obj.target/deps/cld/cld-c.a
COPY Release/cld-c.a
CXX(target) Release/obj.target/cld/src/constants.o
CXX(target) Release/obj.target/cld/src/cld.o
In file included from ../node_modules/nan/nan.h:111:0,
from ../src/cld.cc:4:
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Handle<v8::Integer>) [with T = v8::Int32; v8::Handle<v8::Integer> = v8::Local<v8::Integer>]’:
../node_modules/nan/nan_new.h:34:64: warning: ‘v8::Local<v8::Int32> v8::Value::ToInt32() const’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:9796): Use maybe version [-Wdeprecated-declarations]
To<v8::Int32>(v8::Handle<v8::Integer> i) { return i->ToInt32(); }
^
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Handle<v8::Integer>) [with T = v8::Uint32; v8::Handle<v8::Integer> = v8::Local<v8::Integer>]’:
../node_modules/nan/nan_new.h:39:65: warning: ‘v8::Local<v8::Uint32> v8::Value::ToUint32() const’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:9790): Use maybe version [-Wdeprecated-declarations]
To<v8::Uint32>(v8::Handle<v8::Integer> i) { return i->ToUint32(); }
^
In file included from ../node_modules/nan/nan_new.h:191:0,
from ../node_modules/nan/nan.h:111,
from ../src/cld.cc:4:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::BooleanObject>::return_t Nan::imp::Factory<v8::BooleanObject>::New(bool)’:
../node_modules/nan/nan_implementation_12_inl.h:49:38: warning: ‘static v8::Local<v8::Value> v8::BooleanObject::New(bool)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:4845): Pass an isolate [-Wdeprecated-declarations]
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
^
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Script>::return_t Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>)’:
../node_modules/nan/nan_implementation_12_inl.h:166:69: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:1423): Use maybe version [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Script>::return_t Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../node_modules/nan/nan_implementation_12_inl.h:173:69: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:1423): Use maybe version [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::String>::return_t Nan::imp::Factory<v8::String>::New(const uint8_t*, int)’:
../node_modules/nan/nan_implementation_12_inl.h:206:42: warning: ‘static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:2679): Use maybe version [-Wdeprecated-declarations]
v8::String::kNormalString, length);
^
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::String>::return_t Nan::imp::Factory<v8::String>::New(v8::String::ExternalStringResource*)’:
../node_modules/nan/nan_implementation_12_inl.h:217:66: warning: ‘static v8::Local<v8::String> v8::String::NewExternal(v8::Isolate*, v8::String::ExternalStringResource*)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:2718): Use maybe version [-Wdeprecated-declarations]
return v8::String::NewExternal(v8::Isolate::GetCurrent(), value);
^
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::UnboundScript>::return_t Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>)’:
../node_modules/nan/nan_implementation_12_inl.h:237:76: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:1404): Use maybe version [-Wdeprecated-declarations]
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
^
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::UnboundScript>::return_t Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../node_modules/nan/nan_implementation_12_inl.h:244:76: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:1404): Use maybe version [-Wdeprecated-declarations]
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
^
In file included from ../src/cld.cc:4:0:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:324:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)’
NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
^
../node_modules/nan/nan.h:319:17: error: ‘template<class T> v8::Handle<T> Nan::imp::NanEnsureHandleOrPersistent(v8::Handle<T>&)’ previously declared here
v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
^
../node_modules/nan/nan.h:344:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(v8::Handle<T>&)’
NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
^
../node_modules/nan/nan.h:334:27: error: ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(const v8::Local<T>&)’ previously declared here
NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
^
../node_modules/nan/nan.h: In function ‘bool NanIdleNotification(int)’:
../node_modules/nan/nan.h:374:71: warning: ‘bool v8::Isolate::IdleNotification(int)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:7481): use IdleNotificationDeadline() [-Wdeprecated-declarations]
return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
^
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:560:20: error: variable or field ‘NanAddGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback
^
../node_modules/nan/nan.h:560:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback
^
../node_modules/nan/nan.h:561:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../node_modules/nan/nan.h:566:20: error: variable or field ‘NanRemoveGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback) {
^
../node_modules/nan/nan.h:566:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback) {
^
../node_modules/nan/nan.h:571:20: error: variable or field ‘NanAddGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback
^
../node_modules/nan/nan.h:571:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback
^
../node_modules/nan/nan.h:572:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../node_modules/nan/nan.h:577:20: error: variable or field ‘NanRemoveGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback) {
^
../node_modules/nan/nan.h:577:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback) {
^
../node_modules/nan/nan.h:659:11: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a type
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
^
../node_modules/nan/nan.h:659:15: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
^
../node_modules/nan/nan.h:659:31: error: expected ‘,’ or ‘...’ before ‘<’ token
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
^
../node_modules/nan/nan.h: In function ‘void _NanWeakCallbackDispatcher(int)’:
../node_modules/nan/nan.h:660:42: error: ‘data’ was not declared in this scope
_NanWeakCallbackInfo<T, P> *info = data.GetParameter();
^
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:768:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../node_modules/nan/nan.h:25:0,
from ../src/cld.cc:4:
/home/user/.node-gyp/8.10.0/include/node/node_buffer.h:67:40: error: initializing argument 2 of ‘v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t)’ [-fpermissive]
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../src/cld.cc:4:0:
../node_modules/nan/nan.h:768:67: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((char*)data), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../node_modules/nan/nan.h:806:74: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:1423): Use maybe version [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>)’:
../node_modules/nan/nan.h:813:74: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/user/.node-gyp/8.10.0/include/node/v8.h:1423): Use maybe version [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
cat /proc/version
: Linux version 4.4.0-97-generic (buildd@lcy01-16) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) )node --version
: v8.10.0npm --version
: 5.7.1node-gyp --version
: v3.6.2cld
: 2.4.7I get the following build error when I run the command
npm i cld
: