0rpc/zerorpc-node

Failed to install zerorpc under node js 1.20.0 with msgpack 0.1.8

crystaldust opened this issue · 6 comments

It seems like that msgpack@0.1.8 will not work in Node.js 1.20.0, will you considering updating msgpack to the latest version? Here is the whole output when installing zerorpc:

root@kuajie-MS-7693:~/repos/msgpack-test# npm install zerorpc

> msgpack@0.1.8 install /root/repos/msgpack-test/node_modules/zerorpc/node_modules/msgpack
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory `/root/repos/msgpack-test/node_modules/zerorpc/node_modules/msgpack/build'
  CXX(target) Release/obj.target/libmsgpack/deps/msgpack/object.o
In file included from ../deps/msgpack/msgpack/type/fixint.hpp:22:0,
                 from ../deps/msgpack/msgpack/type.hpp:3,
                 from ../deps/msgpack/msgpack/object.hpp:409,
                 from ../deps/msgpack/object.cpp:18:
../deps/msgpack/msgpack/type/int.hpp: In function ‘void msgpack::operator<<(msgpack::object&, signed char)’:
../deps/msgpack/msgpack/type/int.hpp:145:76: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v : o.type = type::POSITIVE_INTEGER, o.via.u64 = v; }
                                                                            ^
../deps/msgpack/msgpack/type/int.hpp: In function ‘void msgpack::operator<<(msgpack::object&, short int)’:
../deps/msgpack/msgpack/type/int.hpp:148:76: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v : o.type = type::POSITIVE_INTEGER, o.via.u64 = v; }
                                                                            ^
../deps/msgpack/msgpack/type/int.hpp: In function ‘void msgpack::operator<<(msgpack::object&, int)’:
../deps/msgpack/msgpack/type/int.hpp:151:76: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v : o.type = type::POSITIVE_INTEGER, o.via.u64 = v; }
                                                                            ^
../deps/msgpack/msgpack/type/int.hpp: In function ‘void msgpack::operator<<(msgpack::object&, long int)’:
../deps/msgpack/msgpack/type/int.hpp:154:76: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v : o.type = type::POSITIVE_INTEGER, o.via.u64 = v; }
                                                                            ^
../deps/msgpack/msgpack/type/int.hpp: In function ‘void msgpack::operator<<(msgpack::object&, long long int)’:
../deps/msgpack/msgpack/type/int.hpp:157:76: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v : o.type = type::POSITIVE_INTEGER, o.via.u64 = v; }
                                                                            ^
In file included from ../deps/msgpack/msgpack/type.hpp:3:0,
                 from ../deps/msgpack/msgpack/object.hpp:409,
                 from ../deps/msgpack/object.cpp:18:
../deps/msgpack/msgpack/type/fixint.hpp: In function ‘void msgpack::operator<<(msgpack::object&, msgpack::type::fix_int8)’:
../deps/msgpack/msgpack/type/fixint.hpp:118:88: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v.get() < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v.get() : o.type = type::POSITIVE_INTEGER, o.via.u64 = v.get(); }
                                                                                        ^
In file included from ../deps/msgpack/msgpack/type.hpp:3:0,
                 from ../deps/msgpack/msgpack/object.hpp:409,
                 from ../deps/msgpack/object.cpp:18:
../deps/msgpack/msgpack/type/fixint.hpp: In function ‘void msgpack::operator<<(msgpack::object&, msgpack::type::fix_int16)’:
../deps/msgpack/msgpack/type/fixint.hpp:121:88: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v.get() < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v.get() : o.type = type::POSITIVE_INTEGER, o.via.u64 = v.get(); }
                                                                                        ^
../deps/msgpack/msgpack/type/fixint.hpp: In function ‘void msgpack::operator<<(msgpack::object&, msgpack::type::fix_int32)’:
../deps/msgpack/msgpack/type/fixint.hpp:124:88: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v.get() < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v.get() : o.type = type::POSITIVE_INTEGER, o.via.u64 = v.get(); }
                                                                                        ^
../deps/msgpack/msgpack/type/fixint.hpp: In function ‘void msgpack::operator<<(msgpack::object&, msgpack::type::fix_int64)’:
../deps/msgpack/msgpack/type/fixint.hpp:127:88: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
  { v.get() < 0 ? o.type = type::NEGATIVE_INTEGER, o.via.i64 = v.get() : o.type = type::POSITIVE_INTEGER, o.via.u64 = v.get(); }
                                                                                        ^
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/objectc.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/unpack.o
../deps/msgpack/unpack.c: In function ‘template_callback_root’:
../deps/msgpack/unpack.c:59:1: warning: missing initializer for field ‘type’ of ‘msgpack_object’ [-Wmissing-field-initializers]
 { msgpack_object o = {}; return o; }
 ^
In file included from ../deps/msgpack/msgpack/unpack.h:22:0,
                 from ../deps/msgpack/unpack.c:18:
../deps/msgpack/msgpack/object.h:76:22: note: ‘type’ declared here
  msgpack_object_type type;
                      ^
  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
  AR(target) Release/obj.target/deps/msgpack/msgpack.a
  COPY Release/msgpack.a
  CXX(target) Release/obj.target/msgpackBinding/src/msgpack.o
../src/msgpack.cc: In constructor ‘MsgpackException::MsgpackException(const char*)’:
../src/msgpack.cc:19:17: error: ‘New’ is not a member of ‘v8::String’
             msg(String::New(str)) {
                 ^
../src/msgpack.cc: In function ‘void v8_to_msgpack(v8::Handle<v8::Value>, msgpack_object*, msgpack_zone*, MsgpackCycle*)’:
../src/msgpack.cc:180:66: error: ‘New’ is not a member of ‘v8::String’
         Handle<Function> func = Handle<Function>::Cast(date->Get(String::New("toISOString")));
                                                                  ^
../src/msgpack.cc: In function ‘v8::Handle<v8::Value> msgpack_to_v8(msgpack_object*)’:
../src/msgpack.cc:239:21: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Null(v8::Isolate*)’
         return Null();
                     ^
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:306:28: note: declared here
   friend Handle<Primitive> Null(Isolate* isolate);
                            ^
../src/msgpack.cc:243:18: error: too few arguments to function ‘v8::Handle<v8::Boolean> v8::True(v8::Isolate*)’
             True() :
                  ^
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:6624:17: note: declared here
 Handle<Boolean> True(Isolate* isolate) {
                 ^
../src/msgpack.cc:244:19: error: too few arguments to function ‘v8::Handle<v8::Boolean> v8::False(v8::Isolate*)’
             False();
                   ^
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:6633:17: note: declared here
 Handle<Boolean> False(Isolate* isolate) {
                 ^
../src/msgpack.cc:247:75: error: no matching function for call to ‘v8::Integer::NewFromUnsigned(uint32_t)’
         return Integer::NewFromUnsigned(static_cast<uint32_t>(mo->via.u64));
                                                                           ^
../src/msgpack.cc:247:75: note: candidate is:
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2013:25: note: static v8::Local<v8::Integer> v8::Integer::NewFromUnsigned(v8::Isolate*, uint32_t)
   static Local<Integer> NewFromUnsigned(Isolate* isolate, uint32_t value);
                         ^
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2013:25: note:   candidate expects 2 arguments, 1 provided
../src/msgpack.cc:250:62: error: no matching function for call to ‘v8::Integer::New(int32_t)’
         return Integer::New(static_cast<int32_t>(mo->via.i64));
                                                              ^
../src/msgpack.cc:250:62: note: candidate is:
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2012:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
   static Local<Integer> New(Isolate* isolate, int32_t value);
                         ^
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2012:25: note:   candidate expects 2 arguments, 1 provided
../src/msgpack.cc:253:39: error: no matching function for call to ‘v8::Number::New(double&)’
         return Number::New(mo->via.dec);
                                       ^
../src/msgpack.cc:253:39: note: candidate is:
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:1999:24: note: static v8::Local<v8::Number> v8::Number::New(v8::Isolate*, double)
   static Local<Number> New(Isolate* isolate, double value);
                        ^
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:1999:24: note:   candidate expects 2 arguments, 1 provided
../src/msgpack.cc:256:55: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘v8::Isolate*’ [-fpermissive]
         Local<Array> a = Array::New(mo->via.array.size);
                                                       ^
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2417:23: error:   initializing argument 1 of ‘static v8::Local<v8::Array> v8::Array::New(v8::Isolate*, int)’ [-fpermissive]
   static Local<Array> New(Isolate* isolate, int length = 0);
                       ^
../src/msgpack.cc:266:16: error: ‘New’ is not a member of ‘v8::String’
         return String::New(mo->via.raw.ptr, mo->via.raw.size);
                ^
../src/msgpack.cc:269:39: error: no matching function for call to ‘v8::Object::New()’
         Local<Object> o = Object::New();
                                       ^
../src/msgpack.cc:269:39: note: candidate is:
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2388:24: note: static v8::Local<v8::Object> v8::Object::New(v8::Isolate*)
   static Local<Object> New(Isolate* isolate);
                        ^
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2388:24: note:   candidate expects 1 argument, 0 provided
../src/msgpack.cc: At global scope:
../src/msgpack.cc:295:12: error: ‘Arguments’ does not name a type
 pack(const Arguments &args) {
            ^
../src/msgpack.cc:295:23: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
 pack(const Arguments &args) {
                       ^
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> pack(const int&)’:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/msgpack.cc:296:17: error: within this context
     HandleScope scope;
                 ^
../src/msgpack.cc:305:30: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
     for (int i = 0; i < args.Length(); i++) {
                              ^
../src/msgpack.cc:309:33: error: invalid types ‘const int[int]’ for array subscript
             v8_to_msgpack(args[i], &mo, &mz._mz, &mc);
                                 ^
../src/msgpack.cc:311:57: error: ‘ThrowException’ was not declared in this scope
             return ThrowException(e.getThrownException());
                                                         ^
../src/msgpack.cc:316:17: error: ‘New’ is not a member of ‘v8::String’
                 String::New("Error serializaing object")));
                 ^
../src/msgpack.cc:316:58: error: ‘ThrowException’ was not declared in this scope
                 String::New("Error serializaing object")));
                                                          ^
../src/msgpack.cc:320:12: error: expected primary-expression before ‘*’ token
     Buffer *bp = Buffer::New(sb._sbuf.size);
            ^
../src/msgpack.cc:320:13: error: ‘bp’ was not declared in this scope
     Buffer *bp = Buffer::New(sb._sbuf.size);
             ^
../src/msgpack.cc:323:18: error: ‘class v8::HandleScope’ has no member named ‘Close’
     return scope.Close(bp->handle_);
                  ^
../src/msgpack.cc: At global scope:
../src/msgpack.cc:332:14: error: ‘Arguments’ does not name a type
 unpack(const Arguments &args) {
              ^
../src/msgpack.cc:332:25: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
 unpack(const Arguments &args) {
                         ^
../src/msgpack.cc: In function ‘v8::Handle<v8::Value> unpack(const int&)’:
../src/msgpack.cc:334:39: error: ‘NODE_PSYMBOL’ was not declared in this scope
         NODE_PSYMBOL("bytes_remaining");
                                       ^
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/msgpack.cc:336:17: error: within this context
     HandleScope scope;
                 ^
../src/msgpack.cc:338:14: error: request for member ‘Length’ in ‘args’, which is of non-class type ‘const int’
     if (args.Length() < 0 || !Buffer::HasInstance(args[0])) {
              ^
../src/msgpack.cc:338:57: error: invalid types ‘const int[int]’ for array subscript
     if (args.Length() < 0 || !Buffer::HasInstance(args[0])) {
                                                         ^
../src/msgpack.cc:340:13: error: ‘New’ is not a member of ‘v8::String’
             String::New("First argument must be a Buffer")));
             ^
../src/msgpack.cc:340:60: error: ‘ThrowException’ was not declared in this scope
             String::New("First argument must be a Buffer")));
                                                            ^
../src/msgpack.cc:343:31: error: invalid types ‘const int[int]’ for array subscript
     Local<Object> buf = args[0]->ToObject();
                               ^
../src/msgpack.cc:353:36: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::FunctionTemplate>’
             msgpack_unpack_template->GetFunction()->Set(
                                    ^
../src/msgpack.cc:355:77: error: no matching function for call to ‘v8::Integer::New(int32_t)’
                 Integer::New(static_cast<int32_t>(Buffer::Length(buf) - off))
                                                                             ^
../src/msgpack.cc:355:77: note: candidate is:
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2012:25: note: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
   static Local<Integer> New(Isolate* isolate, int32_t value);
                         ^
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:2012:25: note:   candidate expects 2 arguments, 1 provided
../src/msgpack.cc:357:26: error: ‘class v8::HandleScope’ has no member named ‘Close’
             return scope.Close(msgpack_to_v8(&mo));
                          ^
../src/msgpack.cc:359:57: error: ‘ThrowException’ was not declared in this scope
             return ThrowException(e.getThrownException());
                                                         ^
../src/msgpack.cc:363:22: error: ‘class v8::HandleScope’ has no member named ‘Close’
         return scope.Close(Undefined());
                      ^
../src/msgpack.cc:363:38: error: too few arguments to function ‘v8::Handle<v8::Primitive> v8::Undefined(v8::Isolate*)’
         return scope.Close(Undefined());
                                      ^
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:305:28: note: declared here
   friend Handle<Primitive> Undefined(Isolate* isolate);
                            ^
../src/msgpack.cc:367:13: error: ‘New’ is not a member of ‘v8::String’
             String::New("Error de-serializing object")));
             ^
../src/msgpack.cc:367:56: error: ‘ThrowException’ was not declared in this scope
             String::New("Error de-serializing object")));
                                                        ^
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h: In function ‘void init(v8::Handle<v8::Object>)’:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/msgpack.cc:373:17: error: within this context
     HandleScope scope;
                 ^
../src/msgpack.cc:375:41: error: no matching function for call to ‘NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [5], v8::Handle<v8::Value> (&)(const int&))’
     NODE_SET_METHOD(target, "pack", pack);
                                         ^
../src/msgpack.cc:375:41: note: candidate is:
In file included from ../src/msgpack.cc:4:0:
/root/.node-gyp/0.12.0/src/node.h:228:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
 inline void NODE_SET_METHOD(const TypeName& recv,
             ^
/root/.node-gyp/0.12.0/src/node.h:228:13: note:   template argument deduction/substitution failed:
../src/msgpack.cc:375:41: note:   cannot convert ‘pack’ (type ‘v8::Handle<v8::Value>(const int&)’) to type ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’
     NODE_SET_METHOD(target, "pack", pack);
                                         ^
../src/msgpack.cc:380:37: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
         FunctionTemplate::New(unpack)
                                     ^
../src/msgpack.cc:380:37: note: candidate is:
In file included from ../src/msgpack.cc:3:0:
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:3455:34: note: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/root/.node-gyp/0.12.0/deps/v8/include/v8.h:3455:34: note:   no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&)’ to ‘v8::Isolate*’
../src/msgpack.cc:383:9: error: ‘NewSymbol’ is not a member of ‘v8::String’
         String::NewSymbol("unpack"),
         ^
../src/msgpack.cc:384:32: error: base operand of ‘->’ has non-pointer type ‘v8::Persistent<v8::FunctionTemplate>’
         msgpack_unpack_template->GetFunction()
                                ^
make: *** [Release/obj.target/msgpackBinding/src/msgpack.o] Error 1
make: Leaving directory `/root/repos/msgpack-test/node_modules/zerorpc/node_modules/msgpack/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/repos/msgpack-test/node_modules/zerorpc/node_modules/msgpack
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
|
> zmq@2.10.0 install /root/repos/msgpack-test/node_modules/zerorpc/node_modules/zmq
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory `/root/repos/msgpack-test/node_modules/zerorpc/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
  SOLINK_MODULE(target) Release/obj.target/zmq.node
  SOLINK_MODULE(target) Release/obj.target/zmq.node: Finished
  COPY Release/zmq.node
make: Leaving directory `/root/repos/msgpack-test/node_modules/zerorpc/node_modules/zmq/build'
npm ERR! Linux 3.13.0-32-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "zerorpc"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! msgpack@0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the msgpack@0.1.8 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.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/repos/msgpack-test/npm-debug.log

When I switch back to Node.js v0.10.22, everything works great.

+1 I can't go back to 0.10..

+1

Having same problem here

I forked the repo and used the latest version of msgpack in order to get it to work.

everything is now up-to-date. latest package now on npm (v0.9.5).