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

Plans to support Node < 4? #28

Closed
ghost opened this issue Sep 23, 2015 · 0 comments
Closed

Plans to support Node < 4? #28

ghost opened this issue Sep 23, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 23, 2015

Changes made while updating nan broke support for older versions of node, are there any plans to fix?

Results trying to install with node-0.12.7:

npm WARN excluding symbolic link deps/ejs/node_modules/.bin/expresso -> ../expresso/bin/expresso
npm WARN excluding symbolic link deps/ejs/node_modules/.bin/node-jscoverage -> ../expresso/deps/jscoverage/node-jscoverage
npm WARN excluding symbolic link node_modules/.bin/tap -> ../tap/bin/tap.js
npm WARN excluding symbolic link node_modules/.bin/uglifyjs -> ../uglify-js/bin/uglifyjs
npm WARN excluding symbolic link node_modules/tap/node_modules/.bin/nopt -> ../nopt/bin/nopt.js
npm WARN excluding symbolic link node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin/uglifyjs -> ../uglify-js/bin/uglifyjs
npm WARN excluding symbolic link deps/ejs/node_modules/.bin/expresso -> ../expresso/bin/expresso
npm WARN excluding symbolic link deps/ejs/node_modules/.bin/node-jscoverage -> ../expresso/deps/jscoverage/node-jscoverage
npm WARN excluding symbolic link node_modules/.bin/tap -> ../tap/bin/tap.js
npm WARN excluding symbolic link node_modules/.bin/uglifyjs -> ../uglify-js/bin/uglifyjs
npm WARN excluding symbolic link node_modules/tap/node_modules/.bin/nopt -> ../nopt/bin/nopt.js
npm WARN excluding symbolic link node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin/uglifyjs -> ../uglify-js/bin/uglifyjs

> msgpack@1.0.0 install /Users/zjr/Projects/msgpack-node
> node-gyp rebuild

  CC(target) Release/obj.target/libmsgpack/deps/msgpack/objectc.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/unpack.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/vrefbuffer.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/zone.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/version.o
  LIBTOOL-STATIC Release/msgpack.a
  CXX(target) Release/obj.target/msgpackBinding/src/msgpack.o
../src/msgpack.cc:126:79: warning: use of enumeration in a nested name specifier is a C++11 extension
      [-Wc++11-extensions]
        mo->via.str.size = static_cast<uint32_t>(Nan::DecodeBytes(v8obj, Nan::Encoding::UTF8));
                                                                              ^
../src/msgpack.cc:129:80: warning: use of enumeration in a nested name specifier is a C++11 extension
      [-Wc++11-extensions]
        Nan::DecodeWrite((char*)mo->via.str.ptr, mo->via.str.size, v8obj, Nan::Encoding::UTF8);
                                                                               ^
../src/msgpack.cc:136:80: warning: use of enumeration in a nested name specifier is a C++11 extension
      [-Wc++11-extensions]
        mo->via.str.size = static_cast<uint32_t>(Nan::DecodeBytes(result, Nan::Encoding::UTF8));
                                                                               ^
../src/msgpack.cc:139:81: warning: use of enumeration in a nested name specifier is a C++11 extension
      [-Wc++11-extensions]
        Nan::DecodeWrite((char*)mo->via.str.ptr, mo->via.str.size, result, Nan::Encoding::UTF8);
                                                                                ^
../src/msgpack.cc:281:20: error: call to 'ThrowError' is ambiguous
            return Nan::ThrowError(e.getThrownException());
                   ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:639:3: note: candidate function
  X(Error)
  ^
../node_modules/nan/nan.h:633:21: note: expanded from macro 'X'
    NAN_INLINE void Throw ## NAME(v8::Local<v8::String> msg) {                 \
                    ^
<scratch space>:41:1: note: expanded from here
ThrowError
^
../node_modules/nan/nan.h:647:19: note: candidate function
  NAN_INLINE void ThrowError(v8::Local<v8::Value> error) {
                  ^
../src/msgpack.cc:322:42: error: no matching member function for call to 'Set'
            return info.GetReturnValue().Set(msgpack_to_v8(&mo));
                   ~~~~~~~~~~~~~~~~~~~~~~^~~
../node_modules/nan/nan_callbacks_12_inl.h:46:15: note: candidate function not viable: no known conversion from
      'Handle<v8::Value>' to 'bool' for 1st argument
  inline void Set(bool value) {
              ^
../node_modules/nan/nan_callbacks_12_inl.h:51:15: note: candidate function not viable: no known conversion from
      'Handle<v8::Value>' to 'double' for 1st argument
  inline void Set(double i) {
              ^
../node_modules/nan/nan_callbacks_12_inl.h:56:15: note: candidate function not viable: no known conversion from
      'Handle<v8::Value>' to 'int32_t' (aka 'int') for 1st argument
  inline void Set(int32_t i) {
              ^
../node_modules/nan/nan_callbacks_12_inl.h:61:15: note: candidate function not viable: no known conversion from
      'Handle<v8::Value>' to 'uint32_t' (aka 'unsigned int') for 1st argument
  inline void Set(uint32_t i) {
              ^
../node_modules/nan/nan_callbacks_12_inl.h:27:37: note: candidate template ignored: could not match 'Local' against
      'Handle'
  template <typename S> inline void Set(const v8::Local<S> &handle) {
                                    ^
../node_modules/nan/nan_callbacks_12_inl.h:32:37: note: candidate template ignored: could not match 'Global' against
      'Handle'
  template <typename S> inline void Set(const Global<S> &handle) {
                                    ^
../node_modules/nan/nan_callbacks_12_inl.h:89:15: note: candidate template ignored: could not match 'S *' against
      'Handle<v8::Value>'
  inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); }
              ^
../src/msgpack.cc:324:20: error: call to 'ThrowError' is ambiguous
            return Nan::ThrowError(e.getThrownException());
                   ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:639:3: note: candidate function
  X(Error)
  ^
../node_modules/nan/nan.h:633:21: note: expanded from macro 'X'
    NAN_INLINE void Throw ## NAME(v8::Local<v8::String> msg) {                 \
                    ^
<scratch space>:41:1: note: expanded from here
ThrowError
^
../node_modules/nan/nan.h:647:19: note: candidate function
  NAN_INLINE void ThrowError(v8::Local<v8::Value> error) {
                  ^
4 warnings and 3 errors generated.
make: *** [Release/obj.target/msgpackBinding/src/msgpack.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/zjr/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "node" "/Users/zjr/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/zjr/Projects/msgpack-node
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok

npm WARN EPACKAGEJSON msgpack@1.0.0 No license field.
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/Users/zjr/.nvm/versions/node/v0.12.7/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm  v3.3.3
npm ERR! code ELIFECYCLE
npm ERR! msgpack@1.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the msgpack@1.0.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the msgpack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls msgpack
npm ERR! There is likely additional logging output above.
bombela added a commit to bombela/msgpack-node that referenced this issue Sep 25, 2015
This changes the minimal amount of code to get msgpack to build on node
0.12.7 (and still build on node 4.1.1).

 - Make sure to build using C++11 (This is the default with node 4.1.1).
 - Fixes few thing there and there to be Nan compliant.

The code could be cleaned up to be future proof with Nan, but this are
the minimal changes to get going.

Fixes msgpack#28
bombela added a commit to bombela/msgpack-node that referenced this issue Sep 25, 2015
This changes the minimal amount of code to get msgpack to build on node
0.12.7 (and still build on node 4.1.1).

 - Make sure to build using C++11 (This is the default with node 4.1.1).
 - Fixes few thing there and there to be Nan compliant.

The code could be cleaned up to be future proof with Nan, but this are
the minimal changes to get going.

Fixes msgpack#28
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

0 participants