Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

io.js support #387

Closed
timoxley opened this issue Jan 16, 2015 · 14 comments
Closed

io.js support #387

timoxley opened this issue Jan 16, 2015 · 14 comments

Comments

@timoxley
Copy link

Updating the zeromq dependency on nan to 1.5.x introduces support for io.js, but seems some code changes are required to get this to successfully build on io.js 1.0.1.

> cd zeromq.node
> npm install nan@latest --save
npm http request GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
nan@1.5.1 node_modules/nan
> npm install

> zmq@2.9.0 install /Users/timoxley/Projects/libs/zeromq.node
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/zmq/binding.o
In file included from ../binding.cc:37:
In file included from ../node_modules/nan/nan.h:63:
../node_modules/nan/nan_new.h:184:10: error: call to 'New' is ambiguous
  return NanIntern::Factory<T>::New(arg0);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
../binding.cc:546:12: note: in instantiation of function template specialization 'NanNew<v8::Integer, long long>' requested here
    return NanNew<Integer>(value);
           ^
../binding.cc:601:30: note: in instantiation of function template specialization 'zmq::Socket::GetSockOpt<long long>' requested here
      NanReturnValue(socket->GetSockOpt<int64_t>(option));
                             ^
../node_modules/nan/nan.h:231:65: note: expanded from macro 'NanReturnValue'
# define NanReturnValue(value) return args.GetReturnValue().Set(value)
                                                                ^
../node_modules/nan/nan_new.h:86:26: note: candidate function
  static inline return_t New(int32_t value);
                         ^
../node_modules/nan/nan_new.h:87:26: note: candidate function
  static inline return_t New(uint32_t value);
                         ^
../node_modules/nan/nan_new.h:184:10: error: call to 'New' is ambiguous
  return NanIntern::Factory<T>::New(arg0);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
../binding.cc:546:12: note: in instantiation of function template specialization 'NanNew<v8::Integer, unsigned long long>' requested here
    return NanNew<Integer>(value);
           ^
../binding.cc:603:30: note: in instantiation of function template specialization 'zmq::Socket::GetSockOpt<unsigned long long>' requested here
      NanReturnValue(socket->GetSockOpt<uint64_t>(option));
                             ^
../node_modules/nan/nan.h:231:65: note: expanded from macro 'NanReturnValue'
# define NanReturnValue(value) return args.GetReturnValue().Set(value)
                                                                ^
../node_modules/nan/nan_new.h:86:26: note: candidate function
  static inline return_t New(int32_t value);
                         ^
../node_modules/nan/nan_new.h:87:26: note: candidate function
  static inline return_t New(uint32_t value);
                         ^
2 errors generated.
make: *** [Release/obj.target/zmq/binding.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/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1038:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/timoxley/Projects/libs/zeromq.node
gyp ERR! node -v v1.0.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok

npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v1.0.1
npm ERR! npm  v2.1.18
npm ERR! code ELIFECYCLE
npm ERR! zmq@2.9.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.9.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq 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 zmq
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/timoxley/Projects/libs/zeromq.node/npm-debug.log
@timoxley
Copy link
Author

nodejs/node#456

@kkoopa
Copy link
Contributor

kkoopa commented Jan 16, 2015

The problem is that it tries to use 64-bit integers. Will fix.

@timoxley timoxley changed the title Building with io.js io.js support Jan 16, 2015
@kkoopa kkoopa mentioned this issue Jan 17, 2015
@timoxley
Copy link
Author

@kkoopa is this fixed? confirmed working on io.js?

@kkoopa
Copy link
Contributor

kkoopa commented Jan 20, 2015

Fixed, yes. Confirmed, no. It ought to work.

On January 20, 2015 2:31:51 AM EET, Tim Oxley notifications@github.com wrote:

@kkoopa is this fixed? confirmed working on io.js?


Reply to this email directly or view it on GitHub:
#387 (comment)

@reqshark
Copy link
Contributor

Confirmed. works.

$ make test
./node_modules/.bin/mocha --expose-gc --slow 2000 --timeout 600000
child_process: customFds option is deprecated, use stdio instead.
# ...
  43 passing (3s)
$ node -v
v1.0.3

@ronkorving
Copy link
Collaborator

Cool, thanks :)
We'll deal with the customFds later, I guess (or mocha will?)

@nivthefox
Copy link

This still seems to be ongoing, now 7 months later.

@ronkorving
Copy link
Collaborator

Then I don't think you understand the nature of Node and V8 upgrades.

@nivthefox
Copy link

I'm not sure how my understanding has anything to do with me being unable to type npm install zmq on iojs.

@ronkorving
Copy link
Collaborator

Because during the past 7 months, multiple versions of io.js have been released many of which introduced breaking V8 API changes and thus needed a new version of NAN and code changes to adapt to the new API of NAN. Those have been happening. This is not one issue over the past 7 months, this is an ongoing challenge in keeping up-to-speed with io.js (and more importantly: V8) releases. Look at any NPM module with a native component and you'll see the exact same ongoing challenge in the issue tracker.

@kkoopa has been doing an amazing job at keeping node-zmq up to date as fast as possible after each new io.js release. What then follows is a node-zmq release. Please have a little patience, your prayers will be answered.

@reqshark
Copy link
Contributor

this issue was fixed a while back, but the fix for iojs3 hasn't been published at the time of this comment.

@ronkorving
Copy link
Collaborator

Oh by the way, you can always install the latest master of node-zmq straight from GitHub:

npm install JustinTulloss/zeromq.node

@reqshark
Copy link
Contributor

oh cool i didn't know that

can you put that in package.json or do we have to use the git link?

@ronkorving
Copy link
Collaborator

You can put that in package.json as the version of your dependency.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants