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

node-gyp rebuild error #2045

Closed
flynn1973 opened this issue Feb 11, 2020 · 9 comments
Closed

node-gyp rebuild error #2045

flynn1973 opened this issue Feb 11, 2020 · 9 comments

Comments

@flynn1973
Copy link

flynn1973 commented Feb 11, 2020

  • Node Version: v12.15.0
  • Platform: Linux lpgaixmgmtlx01 3.10.0-1062.9.1.el7.ppc64le
  • Compiler: gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)
  • Module: deasync
Verbose output (from npm or node-gyp):
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/scratch/node-v12.15.0-linux-ppc64le/bin/node',
gyp verb cli   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose'
gyp verb cli ]
gyp info using node-gyp@5.0.5
gyp info using node@12.15.0 | linux | ppc64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - executable path is "/usr/bin/python"
gyp verb find Python - executing "/usr/bin/python" to get version
gyp verb find Python - version is "2.7.5"
gyp info find Python using Python version 2.7.5 found at "/usr/bin/python"
gyp verb get node dir no --target version specified, falling back to host node version: 12.15.0
gyp verb command install [ '12.15.0' ]
gyp verb install input version string "12.15.0"
gyp verb install installing version: 12.15.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 12.15.0
gyp verb build dir attempting to create "build" dir: /scratch/go/src/github.com/influxdata/chronograf/build
gyp verb build dir "build" dir needed to be created? /scratch/go/src/github.com/influxdata/chronograf/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /scratch/go/src/github.com/influxdata/chronograf/build/config.gypi
gyp verb config.gypi checking for gypi file: /scratch/go/src/github.com/influxdata/chronograf/config.gypi
gyp verb common.gypi checking for gypi file: /scratch/go/src/github.com/influxdata/chronograf/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/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   '/scratch/go/src/github.com/influxdata/chronograf/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/12.15.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=/root/.cache/node-gyp/12.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/12.15.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/scratch/go/src/github.com/influxdata/chronograf',
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: binding.gyp not found (cwd: /scratch/go/src/github.com/influxdata/chronograf) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 3.10.0-1062.9.1.el7.ppc64le
gyp ERR! command "/scratch/node-v12.15.0-linux-ppc64le/bin/node" "/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose"
gyp ERR! cwd /scratch/go/src/github.com/influxdata/chronograf
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok


root@lpgaixmgmtlx01:/scratch/go/src/github.com/influxdata/chronograf>make
cd ui && yarn --no-progress --no-emoji
yarn install v1.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments:
Directory: /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@12.15.0 | linux | ppc64
gyp info find Python using Python version 2.7.5 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/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   '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/12.15.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=/root/.cache/node-gyp/12.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/12.15.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync',
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[1]: Entering directory '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build'
....
gibberish removed
....
In file included from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.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>&)]’:
/root/.cache/node-gyp/12.15.0/include/node/node_object_wrap.h:84:78:   required from here
/root/.cache/node-gyp/12.15.0/include/node/v8.h:10004: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]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.15.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:66:61:   required from here
/root/.cache/node-gyp/12.15.0/include/node/v8.h:10004: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[1]: *** [deasync.target.mk:111: Release/obj.target/deasync/src/deasync.o] Error 1
make[1]: Leaving directory '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 3.10.0-1062.9.1.el7.ppc64le
gyp ERR! command "/scratch/node-v12.15.0-linux-ppc64le/bin/node" "/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
Build failed
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
make: *** [Makefile:91: .jsdep] Error 1
@cclauss
Copy link
Contributor

cclauss commented Feb 11, 2020

Using Python version 2.7.5 found at "/usr/bin/python"

I doubt this is the cause of your issue but Python < 2.7.9 is a security risk and Python 2 in general is EOL. Python 3.8.1 is current.

@flynn1973
Copy link
Author

Using Python version 2.7.5 found at "/usr/bin/python"

I doubt this is the cause of your issue but Python < 2.7.9 is a security risk and Python 2 in general is EOL. Python 3.8.1 is current.

yeah, but 2.7 is still the default on Redhat EL...

@richardlau
Copy link
Member

Can you post the gibberish removed? The warnings you left in the verbose output shouldn't normally cause the build to error out.

@flynn1973
Copy link
Author

complete output

root@lpgaixmgmtlx01:/scratch/go/src/github.com/influxdata/chronograf>make
cd ui && yarn --no-progress --no-emoji
yarn install v1.22.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments:
Directory: /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@12.15.0 | linux | ppc64
gyp info find Python using Python version 2.7.5 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/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   '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/12.15.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=/root/.cache/node-gyp/12.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/12.15.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync',
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[1]: Entering directory '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build'
  CXX(target) Release/obj.target/deasync/src/deasync.o
In file included from ../../nan/nan_converters.h:67,
                 from ../../nan/nan.h:221,
                 from ../src/deasync.cc:3:
../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’:
../../nan/nan_converters_43_inl.h:18:51: warning: ‘v8::MaybeLocal<v8::Boolean> v8::Value::ToBoolean(v8::Local<v8::Context>) const’ is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
       val->To ## TYPE(isolate->GetCurrentContext())                            \
                                                   ^
../../nan/nan_converters_43_inl.h:22:1: note: in expansion of macro ‘X’
 X(Boolean)
 ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:2568:59: note: declared here
                 V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
                                                           ^~~~~~~~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../../nan/nan_converters.h:67,
                 from ../../nan/nan.h:221,
                 from ../src/deasync.cc:3:
../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)’:
../../nan/nan_converters_43_inl.h:37:57: warning: ‘v8::Maybe<bool> v8::Value::BooleanValue(v8::Local<v8::Context>) const’ is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
   return val->NAME ## Value(isolate->GetCurrentContext());                     \
                                                         ^
../../nan/nan_converters_43_inl.h:40:1: note: in expansion of macro ‘X’
 X(bool, Boolean)
 ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:2606:51: note: declared here
                 V8_WARN_UNUSED_RESULT Maybe<bool> BooleanValue(
                                                   ^~~~~~~~~~~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../../nan/nan_new.h:189,
                 from ../../nan/nan.h:222,
                 from ../src/deasync.cc:3:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
../../nan/nan_implementation_12_inl.h:105:32: error: no matching function for call to ‘v8::Function::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Object>&)’
                           , obj));
                                ^
In file included from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:4170:31: note: candidate: ‘static v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>, v8::FunctionCallback, v8::Local<v8::Value>, int, v8::ConstructorBehavior, v8::SideEffectType)’
   static MaybeLocal<Function> New(
                               ^~~
/root/.cache/node-gyp/12.15.0/include/node/v8.h:4170:31: note:   no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Local<v8::Context>’
In file included from ../src/deasync.cc:3:
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                              ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:2588:31: note: declared here
                 Local<String> ToString(Isolate* isolate) const);
                               ^~~~~~~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/deasync.cc:3:
../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
../../nan/nan.h:1855:64: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
                                                                ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:3403:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/deasync.cc:3:
../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’:
../../nan/nan.h:1861:42: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     New(persistentHandle)->Set(key, value);
                                          ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:3403:22: note: declared here
                 bool Set(Local<Value> key, Local<Value> value));
                      ^~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/deasync.cc:3:
../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(uint32_t, const v8::Local<v8::Value>&)’:
../../nan/nan.h:1867:44: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     New(persistentHandle)->Set(index, value);
                                            ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:3412:22: note: declared here
                 bool Set(uint32_t index, Local<Value> value));
                      ^~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/deasync.cc:3:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
../../nan/nan.h:1873:61: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
         New(persistentHandle)->Get(New(key).ToLocalChecked()));
                                                             ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:3457:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
                                                   ^~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/deasync.cc:3:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const v8::Local<v8::String>&) const’:
../../nan/nan.h:1879:55: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     return scope.Escape(New(persistentHandle)->Get(key));
                                                       ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:3457:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
                                                   ^~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/deasync.cc:3:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(uint32_t) const’:
../../nan/nan.h:1884:57: warning: ‘v8::Local<v8::Value> v8::Object::Get(uint32_t)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     return scope.Escape(New(persistentHandle)->Get(index));
                                                         ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:3461:51: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
                                                   ^~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from ../src/deasync.cc:3:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2208: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]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
In file included from /opt/rh/devtoolset-8/root/usr/include/c++/8/cassert:44,
                 from /root/.cache/node-gyp/12.15.0/include/node/node_object_wrap.h:26,
                 from ../../nan/nan.h:54,
                 from ../src/deasync.cc:3:
../../nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
../../nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
     assert(persistent().IsNearDeath());
                         ^~~~~~~~~~~
In file included from ../../nan/nan.h:2698,
                 from ../src/deasync.cc:3:
../../nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::MakeWeak()’:
../../nan/nan_object_wrap.h:67:34: warning: ‘void v8::PersistentBase<T>::MarkIndependent() [with T = v8::Object]’ is deprecated: Weak objects are always considered independent. Use TracedGlobal when trying to use EmbedderHeapTracer. Use a strong handle when trying to keep an object alive. [-Wdeprecated-declarations]
     persistent().MarkIndependent();
                                  ^
In file included from /root/.cache/node-gyp/12.15.0/include/node/v8-internal.h:14,
                 from /root/.cache/node-gyp/12.15.0/include/node/v8.h:25,
                 from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.0/include/node/v8.h:567:22: note: declared here
       V8_INLINE void MarkIndependent());
                      ^~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.15.0/include/node/v8config.h:311:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
In file included from /opt/rh/devtoolset-8/root/usr/include/c++/8/cassert:44,
                 from /root/.cache/node-gyp/12.15.0/include/node/node_object_wrap.h:26,
                 from ../../nan/nan.h:54,
                 from ../src/deasync.cc:3:
../../nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’:
../../nan/nan_object_wrap.h:124:26: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
     assert(wrap->handle_.IsNearDeath());
                          ^~~~~~~~~~~
In file included from ../../nan/nan.h:52,
                 from ../src/deasync.cc:3:
../src/deasync.cc: At global scope:
/root/.cache/node-gyp/12.15.0/include/node/node.h:560:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/root/.cache/node-gyp/12.15.0/include/node/node.h:594:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/deasync.cc:17:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(deasync, init)
 ^~~~~~~~~~~
In file included from ../src/deasync.cc:2:
/root/.cache/node-gyp/12.15.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>&)]’:
/root/.cache/node-gyp/12.15.0/include/node/node_object_wrap.h:84:78:   required from here
/root/.cache/node-gyp/12.15.0/include/node/v8.h:10004: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]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/12.15.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:66:61:   required from here
/root/.cache/node-gyp/12.15.0/include/node/v8.h:10004: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[1]: *** [deasync.target.mk:111: Release/obj.target/deasync/src/deasync.o] Error 1
make[1]: Leaving directory '/scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 3.10.0-1062.9.1.el7.ppc64le
gyp ERR! command "/scratch/node-v12.15.0-linux-ppc64le/bin/node" "/scratch/node-v12.15.0-linux-ppc64le/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /scratch/go/src/github.com/influxdata/chronograf/ui/node_modules/deasync
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
Build failed
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
make: *** [Makefile:91: .jsdep] Error 1

@richardlau
Copy link
Member

In file included from ../../nan/nan_new.h:189,
                 from ../../nan/nan.h:222,
                 from ../src/deasync.cc:3:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
../../nan/nan_implementation_12_inl.h:105:32: error: no matching function for call to ‘v8::Function::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Object>&)’
                           , obj));
                                ^
...
In file included from /opt/rh/devtoolset-8/root/usr/include/c++/8/cassert:44,
                 from /root/.cache/node-gyp/12.15.0/include/node/node_object_wrap.h:26,
                 from ../../nan/nan.h:54,
                 from ../src/deasync.cc:3:
../../nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
../../nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
     assert(persistent().IsNearDeath());
                         ^~~~~~~~~~~

These indicate the version of nan in use is too old to work with Node.js 12 (e.g. nodejs/nan#842). It could be that you're on (or a dependency you are using is on) an old version of deasync as they switched from nan to N-API in deasync@0.1.14.

@flynn1973
Copy link
Author

updated node-gyp, deasync and nan, but the error persists

root@lpgaixmgmtlx01:/scratch/go/src/github.com/influxdata/chronograf>npm explore npm -g -- npm install node-gyp@latest
npm notice created a lockfile as package-lock.json. You should commit this file.
+ node-gyp@6.1.0
added 1 package from 1 contributor, removed 2 packages, updated 2 packages and audited 12045 packages in 3.387s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
root@lpgaixmgmtlx01:/scratch/go/src/github.com/influxdata/chronograf>npm install deasync --unsafe-perm

> deasync@0.1.19 install /scratch/go/src/github.com/influxdata/chronograf/node_modules/deasync
> node ./build.js

make: Entering directory '/scratch/go/src/github.com/influxdata/chronograf/node_modules/deasync/build'
  CXX(target) Release/obj.target/deasync/src/deasync.o
  SOLINK_MODULE(target) Release/obj.target/deasync.node
  COPY Release/deasync.node
make: Leaving directory '/scratch/go/src/github.com/influxdata/chronograf/node_modules/deasync/build'
Installed in `/scratch/go/src/github.com/influxdata/chronograf/node_modules/deasync/bin/linux-ppc64-node-12/deasync.node`
npm WARN saveError ENOENT: no such file or directory, open '/scratch/go/src/github.com/influxdata/chronograf/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/scratch/go/src/github.com/influxdata/chronograf/package.json'
npm WARN chronograf No description
npm WARN chronograf No repository field.
npm WARN chronograf No README data
npm WARN chronograf No license field.

+ deasync@0.1.19
added 4 packages from 47 contributors and audited 4 packages in 1.803s
found 0 vulnerabilities
root@lpgaixmgmtlx01:/scratch/go/src/github.com/influxdata/chronograf>npm install nan --unsafe-perm
npm WARN saveError ENOENT: no such file or directory, open '/scratch/go/src/github.com/influxdata/chronograf/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/scratch/go/src/github.com/influxdata/chronograf/package.json'
npm WARN chronograf No description
npm WARN chronograf No repository field.
npm WARN chronograf No README data
npm WARN chronograf No license field.

+ nan@2.14.0
added 1 package from 8 contributors and audited 9 packages in 1.076s
found 0 vulnerabilities

@richardlau
Copy link
Member

root@lpgaixmgmtlx01:/scratch/go/src/github.com/influxdata/chronograf>npm install deasync --unsafe-perm

> deasync@0.1.19 install /scratch/go/src/github.com/influxdata/chronograf/node_modules/deasync
> node ./build.js

make: Entering directory '/scratch/go/src/github.com/influxdata/chronograf/node_modules/deasync/build'
  CXX(target) Release/obj.target/deasync/src/deasync.o
  SOLINK_MODULE(target) Release/obj.target/deasync.node
  COPY Release/deasync.node
make: Leaving directory '/scratch/go/src/github.com/influxdata/chronograf/node_modules/deasync/build'
Installed in `/scratch/go/src/github.com/influxdata/chronograf/node_modules/deasync/bin/linux-ppc64-node-12/deasync.node`
npm WARN saveError ENOENT: no such file or directory, open '/scratch/go/src/github.com/influxdata/chronograf/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/scratch/go/src/github.com/influxdata/chronograf/package.json'
npm WARN chronograf No description
npm WARN chronograf No repository field.
npm WARN chronograf No README data
npm WARN chronograf No license field.

+ deasync@0.1.19
added 4 packages from 47 contributors and audited 4 packages in 1.803s
found 0 vulnerabilities

This shows that the latest deasync successfully installs on your system so you'll need to track down what is requiring deasync and why it doesn't use the latest version. In any case this isn't an issue with node-gyp.

@just-be-weird
Copy link

just-be-weird commented Feb 18, 2020

In my-case it was failing on Linux-mint 19.2, for some reasons on run-time gcc++ was not accessible.
So by installing the build-essentials error was resolved.
PS:

build-essential package is a reference for all the packages needed to compile a Debian packages. It generally includes the GCC/g++ compilers and libraries and some other utilities. Informational for list of build-essential packages can be found on build-essentials

@flynn1973
Copy link
Author

this is already resolved...node version was to new

influxdata/chronograf#5361

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

4 participants