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

serious problems building on node #518

Closed
ralphtheninja opened this issue Apr 19, 2016 · 5 comments
Closed

serious problems building on node #518

ralphtheninja opened this issue Apr 19, 2016 · 5 comments

Comments

@ralphtheninja
Copy link

ralphtheninja commented Apr 19, 2016

Hi!

I've followed these instructions to install libzmq but I just can't get this module to build.

With node 5.10.1 I get the following:

lms@nuc ~/src/justintullos/zeromq.node (master)                                                                         
$ npm i                                                                                                                 
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade 
npm WARN prefer global marked@0.3.5 should be installed with -g                                                     

> zmq@2.7.0 install /home/lms/src/justintullos/zeromq.node                                                              
> node-gyp rebuild                                                                                                      

make: Entering directory '/home/lms/src/justintullos/zeromq.node/build'
  CXX(target) Release/obj.target/zmq/binding.o                                                                          
In file included from ../binding.cc:36:0:
../node_modules/nan/nan.h: In function ‘v8::Handle<v8::Value> NanError(const char*)’:
../node_modules/nan/nan.h:319:38: error: ‘New’ is not a member of ‘v8::String’
 # define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))
                                      ^                                                                                 
../node_modules/nan/nan.h:339:13: note: in expansion of macro ‘_NAN_ERROR’
     return  _NAN_ERROR(v8::Exception::Error, errmsg);                                                                  
             ^
../node_modules/nan/nan.h: In function ‘void NanThrowError(const char*)’:
../node_modules/nan/nan.h:324:7: error: ‘ThrowException’ is not a member of ‘v8’
       v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \                                       
       ^                                                                                                                
../node_modules/nan/nan.h:343:5: note: in expansion of macro ‘_NAN_THROW_ERROR’
     _NAN_THROW_ERROR(v8::Exception::Error, errmsg);              
     ^                                                                                                                  
../node_modules/nan/nan.h:319:38: error: ‘New’ is not a member of ‘v8::String’  
 # define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))                                                          
                                      ^              
../node_modules/nan/nan.h:324:26: note: in expansion of macro ‘_NAN_ERROR’
       v8::ThrowException(_NAN_ERROR(fun, errmsg));                             \                                       
                          ^                                                                                             

I get the same problems with 4.4.3 and 0.12.13 but a different compile problem using 0.10.44

make: Entering directory '/home/lms/src/justintullos/zeromq.node/build'                                 
  CXX(target) Release/obj.target/zmq/binding.o                                                          
../binding.cc: In static member function ‘static void zmq::Socket::UV_MonitorCallback(uv_idle_t*, int)’:
../binding.cc:396:9: error: ‘zmq_event_t’ was not declared in this scope                                
         zmq_event_t event;                                                                             
         ^                                                                                              
../binding.cc:400:18: error: ‘event’ was not declared in this scope                                     
         memcpy (&event, zmq_msg_data (&msg1), sizeof (zmq_event_t));

I checked package.json and you're using nan 0.8 which is really old afaik. Any suggestions are most welcomed!

@ralphtheninja
Copy link
Author

Gonna check your travis script tomorrow. Apparently you can make it work on node so then I should I ;) I'll close this once I get it to work. Cheers.

@ralphtheninja
Copy link
Author

On a second thought. Have you considered creating prebuilt binaries? I could hack up a PR for prebuild if you like.

@ronkorving
Copy link
Collaborator

Has definitely been considered. I believe there's still an open PR for this that could use some help. Input really welcome. If possible I would like those prebuilt binaries not to come from us, but from a more official location if ghere is one. All help much appreciated!

@rgbkrk
Copy link

rgbkrk commented Apr 24, 2016

prebuild would be cool here. The PR mentioned was #486 which relied on node-pre-gyp. I've been experimenting with using prebuild over in zmq-prebuilt. We would be happy to bring the patches over if they're welcome. It would mean publishing binaries to GitHub releases. It's been great so far on Linux and OS X at the very least.

@ralphtheninja
Copy link
Author

prebuild would be cool here. The PR mentioned was #486 which relied on node-pre-gyp. I've been experimenting with using prebuild over in zmq-prebuilt. We would be happy to bring the patches over if they're welcome. It would mean publishing binaries to GitHub releases. It's been great so far on Linux and OS X at the very least.

Nice! It would be super awesome to get this module working "out of the box".

zmqallthethings

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

3 participants