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

conversion code fails to build #14

Open
dsclassen opened this issue Jun 27, 2018 · 0 comments
Open

conversion code fails to build #14

dsclassen opened this issue Jun 27, 2018 · 0 comments

Comments

@dsclassen
Copy link

I'm working my way through the book and trying to run the demos as they become relevant. Today I was unable to build the conversion demos on my CentOS7 machine.

Configure works:

[11:06]the_dood@graphics1:conversions[1027]$ cd strict
[11:06]the_dood@graphics1:strict[1028]$ node-gyp configure
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/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   '/home/the_dood/nodecpp-demo/conversions/strict/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/the_dood/.node-gyp/10.5.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=/home/the_dood/.node-gyp/10.5.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/the_dood/.node-gyp/10.5.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/the_dood/nodecpp-demo/conversions/strict',
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 ok

But building fails with a " error: no matching function for call to 'v8::Array::Has(unsigned int&)'"

[11:06]the_dood@graphics1:strict[1029]$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/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   '/home/the_dood/nodecpp-demo/conversions/strict/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/the_dood/.node-gyp/10.5.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=/home/the_dood/.node-gyp/10.5.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/the_dood/.node-gyp/10.5.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/the_dood/nodecpp-demo/conversions/strict',
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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/the_dood/nodecpp-demo/conversions/strict/build'
  CXX(target) Release/obj.target/strict_type_demo/strict_type_demo.o
../strict_type_demo.cpp: In function �void PassString(const v8::FunctionCallbackInfo<v8::Value>&)�:
../strict_type_demo.cpp:83:36: warning: �v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)� is deprecated (declared at /home/the_dood/.node-gyp/10.5.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations]
     v8::String::Utf8Value s(args[0]);
                                    ^
../strict_type_demo.cpp: In function �void PassArray(const v8::FunctionCallbackInfo<v8::Value>&)�:
../strict_type_demo.cpp:124:23: error: no matching function for call to �v8::Array::Has(unsigned int&)�
       if (array->Has(i)) {
                       ^
../strict_type_demo.cpp:124:23: note: candidates are:
In file included from /home/the_dood/.node-gyp/10.5.0/include/node/v8.h:26:0,
                 from /home/the_dood/.node-gyp/10.5.0/include/node/node.h:63,
                 from ../strict_type_demo.cpp:1:
/home/the_dood/.node-gyp/10.5.0/include/node/v8.h:3235:47: note: bool v8::Object::Has(v8::Local<v8::Value>)
   V8_DEPRECATE_SOON("Use maybe version", bool Has(Local<Value> key));
                                               ^
/home/the_dood/.node-gyp/10.5.0/include/node/v8config.h:346:48: note: in definition of macro �V8_DEPRECATE_SOON�
 #define V8_DEPRECATE_SOON(message, declarator) declarator
                                                ^
/home/the_dood/.node-gyp/10.5.0/include/node/v8.h:3235:47: note:   no known conversion for argument 1 from �unsigned int� to �v8::Local<v8::Value>�
   V8_DEPRECATE_SOON("Use maybe version", bool Has(Local<Value> key));
                                               ^
/home/the_dood/.node-gyp/10.5.0/include/node/v8config.h:346:48: note: in definition of macro �V8_DEPRECATE_SOON�
 #define V8_DEPRECATE_SOON(message, declarator) declarator
                                                ^
In file included from /home/the_dood/.node-gyp/10.5.0/include/node/node.h:63:0,
                 from ../strict_type_demo.cpp:1:
/home/the_dood/.node-gyp/10.5.0/include/node/v8.h:3251:37: note: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context,
                                     ^
/home/the_dood/.node-gyp/10.5.0/include/node/v8.h:3251:37: note:   candidate expects 2 arguments, 1 provided
/home/the_dood/.node-gyp/10.5.0/include/node/v8.h:3258:37: note: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t)
   V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index);
                                     ^
/home/the_dood/.node-gyp/10.5.0/include/node/v8.h:3258:37: note:   candidate expects 2 arguments, 1 provided
make: *** [Release/obj.target/strict_type_demo/strict_type_demo.o] Error 1
make: Leaving directory `/home/the_dood/nodecpp-demo/conversions/strict/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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.4.138-1.el7.elrepo.x86_64
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/the_dood/nodecpp-demo/conversions/strict
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
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

1 participant