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

Build failure: no matching member function for call to 'ToString' #3

Closed
yuxincs opened this issue Jul 3, 2019 · 1 comment · Fixed by #4
Closed

Build failure: no matching member function for call to 'ToString' #3

yuxincs opened this issue Jul 3, 2019 · 1 comment · Fixed by #4

Comments

@yuxincs
Copy link
Contributor

yuxincs commented Jul 3, 2019

Hi sebhildebrandt,

Thanks for this great project.

I'm trying to add osx-temperature-sensor as dependency on macos high sierra, however it seems that it fails to build due to an error.

Complete build log:

yarn add v1.17.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
error /Users/ryan/Desktop/taskmanager/node_modules/osx-temperature-sensor: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/ryan/Desktop/taskmanager/node_modules/osx-temperature-sensor
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/usr/local/Cellar/node/12.5.0/libexec/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   '/Users/ryan/Desktop/taskmanager/node_modules/osx-temperature-sensor/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/Cellar/node/12.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/ryan/.node-gyp/12.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=/Users/ryan/.node-gyp/12.5.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/Cellar/node/12.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/ryan/.node-gyp/12.5.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/ryan/Desktop/taskmanager/node_modules/osx-temperature-sensor',
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' ]
  SOLINK_MODULE(target) Release/none.node
  CXX(target) Release/obj.target/smc/lib/OSX/smc.o
../lib/OSX/smc.cc:196:17: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
        String::NewFromUtf8(isolate, "Expected string")));
                ^
/Users/ryan/.node-gyp/12.5.0/include/node/v8.h:2890:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
  static V8_DEPRECATED(
         ^
/Users/ryan/.node-gyp/12.5.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../lib/OSX/smc.cc:199:38: error: no matching member function for call to 'ToString'
    v8::String::Utf8Value k(args[0]->ToString());
                            ~~~~~~~~~^~~~~~~~
/Users/ryan/.node-gyp/12.5.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/ryan/.node-gyp/12.5.0/include/node/v8.h:2544:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
../lib/OSX/smc.cc:206:6: error: variable has incomplete type 'void'
void Init(v8::Handle<Object> exports) {
     ^
../lib/OSX/smc.cc:206:15: error: no member named 'Handle' in namespace 'v8'
void Init(v8::Handle<Object> exports) {
          ~~~~^
../lib/OSX/smc.cc:206:22: error: 'Object' does not refer to a value
void Init(v8::Handle<Object> exports) {
                     ^
/Users/ryan/.node-gyp/12.5.0/include/node/v8.h:3356:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../lib/OSX/smc.cc:206:30: error: use of undeclared identifier 'exports'
void Init(v8::Handle<Object> exports) {
                             ^
../lib/OSX/smc.cc:206:38: error: expected ';' after top level declarator
void Init(v8::Handle<Object> exports) {
                                     ^
                                     ;
1 warning and 6 errors generated.
make: *** [Release/obj.target/smc/lib/OSX/smc.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/12.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/12.5.0/bin/node" "/usr/local/Cellar/node/12.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ryan/Desktop/taskmanager/node_modules/osx-temperature-sensor
gyp ERR! node -v v12.5.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
@yuxincs yuxincs mentioned this issue Jul 11, 2019
4 tasks
sebhildebrandt added a commit that referenced this issue Aug 26, 2019
@sebhildebrandt
Copy link
Owner

@yxwangcs Merged your pull request and tested it, npm version 1.0.4 just released.
Thank you for your contribution!

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

Successfully merging a pull request may close this issue.

2 participants