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

1.6 breaks more shit :) NaNEncode? #267

Closed
jonathanong opened this issue Jan 23, 2015 · 4 comments
Closed

1.6 breaks more shit :) NaNEncode? #267

jonathanong opened this issue Jan 23, 2015 · 4 comments

Comments

@jonathanong
Copy link

In file included from ../node_src/Shaheen.h:29:0,
                 from ../node_src/Shaheen.cc:2:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> NanEncode(const void*, std::size_t, Nan::Encoding)’:
../node_modules/nan/nan.h:1851:44: error: invalid conversion from ‘const void*’ to ‘const char*’ [-fpermissive]
     , static_cast<node::encoding>(encoding));
                                            ^
In file included from ../node_src/Shaheen.h:23:0,
                 from ../node_src/Shaheen.cc:2:
/home/vagrant/.node-gyp/1.0.3/src/node.h:251:34: error:   initializing argument 2 of ‘v8::Local<v8::Value> node::Encode(v8::Isolate*, const char*, size_t, node::encoding)’ [-fpermissive]
 NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
                                  ^
@thlorenz
Copy link

I ran into something similar when trying to make v8-profiler work with latest nan and iojs.
For now I upgraded nan there to 1.5.3 since the latest nan broke for io.js but works for node 0.10.35 and 0.11.15.

The stack trace is below and here is the related v8-profiler PR.

nan 1.6.1

➝  node-gyp rebuild --nodedir ../iojs/ && ../iojs/deps/npm/bin/npm-cli.js test
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@1.0.0 | darwin | x64
child_process: customFds option is deprecated, use stdio instead.
gyp info spawn python
gyp info spawn args [ '/Users/thlorenz/npm-global/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   '/Volumes/d/dev/v8-profiler/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/thlorenz/npm-global/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Volumes/d/dev/iojs/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=../iojs/',
gyp info spawn args   '-Dmodule_root_dir=/Volumes/d/dev/v8-profiler',
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' ]
  CXX(target) Release/obj.target/profiler/src/profiler.o
In file included from ../src/profiler.cc:2:
../node_modules/nan/nan.h:1848:10: error: no matching function for call to 'Encode'
  return node::Encode(
         ^~~~~~~~~~~~
../../iojs/src/node.h:251:34: note: candidate function not viable: cannot convert argument of incomplete type 'const void *' to 'const char *'
NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
                                 ^
../../iojs/src/node.h:257:34: note: candidate function not viable: requires 3 arguments, but 4 were provided
NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
                                 ^
../../iojs/src/node.h:262:45: note: candidate function not viable: requires at most 3 arguments, but 4 were provided
                inline v8::Local<v8::Value> Encode(
                                            ^
../../iojs/src/node.h:43:53: note: expanded from macro 'NODE_DEPRECATED'
#define NODE_DEPRECATED(msg, fn) V8_DEPRECATED(msg, fn)
                                                    ^
../../iojs/deps/v8/include/v8config.h:332:45: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message, declarator) declarator
                                            ^
1 error generated.
make: *** [Release/obj.target/profiler/src/profiler.o] Error 1

@mathiask88
Copy link
Contributor

#264

@mscdex
Copy link
Contributor

mscdex commented Jan 24, 2015

+1 I just ran into similar errors mentioning Encode with 1.6.

@XadillaX
Copy link

#265

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

6 participants