Install zmq nodejs module on windows 7

905 views
Skip to first unread message

hd nguyen

unread,
Jul 10, 2012, 6:04:07 AM7/10/12
to nod...@googlegroups.com

Hi,

I intend to create simple nodejs app using pub/sub features of ZeroMq, but cannot install zmq module on windows 7 64 bit.

I googled it and seem it's acceptable bug, now zmq module does not support windows.

Any suggestion to build this module on windows? Or if you have this node modules, please share me.

Thanks in advance.
--
Nguyen Hai Duy
Mobile : 0914 72 1900
Yahoo: nguyenhd_lucky

mscdex

unread,
Jul 10, 2012, 2:14:30 PM7/10/12
to nodejs
On Jul 10, 6:04 am, hd nguyen <nguyenhd2...@gmail.com> wrote:
> Any suggestion to build this module on windows? Or if you have this node
> modules, please share me.

Try this instead and let me know if it works for you: npm install
https://github.com/mscdex/zeromq.node/tarball/master

hd nguyen

unread,
Jul 10, 2012, 10:10:55 PM7/10/12
to nod...@googlegroups.com
It works great.

Thanks so much :)


--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

hd nguyen

unread,
Jul 28, 2012, 10:19:15 PM7/28/12
to nod...@googlegroups.com
As mscdex shared, it's: 
npm install https://github.com/mscdex/zeromq.node/tarball/master 

On Sun, Jul 29, 2012 at 5:58 AM, Danil Gazizov <danil....@gmail.com> wrote:
I'v tryed just.. nothing happens!
What should I do?
Can you share me this lib?


вторник, 10 июля 2012 г., 22:14:30 UTC+4 пользователь mscdex написал:

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Danil Gazizov

unread,
Jul 29, 2012, 4:53:32 AM7/29/12
to nod...@googlegroups.com
Ok.. my version of node was 0.6, just now I'd updated it to 0.84.
Then y've typed your command, and here are results:
http://piix.biz/di-YIRQ.png
WTF python error appears here? I'm stuck :)

воскресенье, 29 июля 2012 г., 6:19:15 UTC+4 пользователь hd nguyen написал:
As mscdex shared, it's: 
On Sun, Jul 29, 2012 at 5:58 AM, Danil Gazizov <danil....@gmail.com> wrote:
I'v tryed just.. nothing happens!
What should I do?
Can you share me this lib?


вторник, 10 июля 2012 г., 22:14:30 UTC+4 пользователь mscdex написал:
On Jul 10, 6:04 am, hd nguyen <nguyenhd2...@gmail.com> wrote:
> Any suggestion to build this module on windows? Or if you have this node
> modules, please share me.

Try this instead and let me know if it works for you: npm install
https://github.com/mscdex/zeromq.node/tarball/master 

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

mscdex

unread,
Jul 29, 2012, 5:39:26 AM7/29/12
to nodejs
On Jul 29, 4:53 am, Danil Gazizov <danil.gazi...@gmail.com> wrote:
> Ok.. my version of node was 0.6, just now I'd updated it to 0.84.
> Then y've typed your command, and here are results:http://piix.biz/di-YIRQ.png
> WTF python error appears here? I'm stuck :)

You need Python (2.6+ IIRC, but not 3.x) for building addons.

Danil Gazizov

unread,
Jul 29, 2012, 6:40:53 AM7/29/12
to nod...@googlegroups.com
Ok! I deed it.
The next trouble was of my Win7 64bit version node.js. I'd to reinstall it to 32bit.
Then it all become works.
While npm install there became a lot of warnings, here are they:


> z...@2.1.0 install C:\Program Files (x86)\nodejs\node_modules\zmq
> node-gyp rebuild


C:\Program Files (x86)\nodejs\node_modules\zmq>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
  binding.cc
c:\users\aser\.node-gyp\0.8.4\src\node_object_wrap.h(57): warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>' needs to have dll-interface to be used by clients of class 'node::ObjectWrap' [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
          with
          [
              T=v8::Object
          ]
C:\Users\aser\.node-gyp\0.8.4\src\node_buffer.h(71): warning C4251: 'node::Buffer::constructor_template' : class 'v8::Persistent<T>' needs to have dll-interface to be used by clients of class 'node::Buffer' [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
          with
          [
              T=v8::FunctionTemplate
          ]
..\binding.cc(281): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(413): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(418): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(420): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(422): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(428): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(455): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(460): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(464): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(468): warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(665): warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(765): warning C4244: '=' : conversion from 'int64_t' to 'int', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
..\binding.cc(359): warning C4244: 'argument' : conversion from 'uint64_t' to 'int32_t', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
          ..\binding.cc(413) : see reference to function template instantiation 'v8::Handle<T> zmq::Socket::GetSockOpt<uint64_t>(int)' being compiled
          with
          [
              T=v8::Value
          ]
..\binding.cc(359): warning C4244: 'argument' : conversion from 'int64_t' to 'int32_t', possible loss of data [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
          ..\binding.cc(418) : see reference to function template instantiation 'v8::Handle<T> zmq::Socket::GetSockOpt<int64_t>(int)' being compiled
          with
          [
              T=v8::Value
          ]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.node). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). [C:\Program Files (x86)\nodejs\node_modules\zmq\build\binding.vcxproj]
     Creating library C:\Program Files (x86)\nodejs\node_modules\zmq\build\Release\binding.lib and object C:\Program Files (x86)\nodejs\node_modules\zmq\build\Release\binding.exp
  Generating code
  Finished generating code
  binding.vcxproj -> C:\Program Files (x86)\nodejs\node_modules\zmq\build\Release\\binding.node
z...@2.1.0 node_modules\zmq


воскресенье, 29 июля 2012 г., 13:39:26 UTC+4 пользователь mscdex написал:

mscdex

unread,
Jul 29, 2012, 7:10:12 AM7/29/12
to nodejs
On Jul 29, 6:40 am, Danil Gazizov <danil.gazi...@gmail.com> wrote:
> While npm install there became a lot of warnings, here are they:

The warnings can (probably) be ignored. Does the addon work though?

Danil Gazizov

unread,
Jul 29, 2012, 8:51:23 AM7/29/12
to nod...@googlegroups.com
yes! all then works!
I must say, the reason was of my nodeJS win7 64bit version using. Now I'm using win32 nodeJS

воскресенье, 29 июля 2012 г., 15:10:12 UTC+4 пользователь mscdex написал:

mscdex

unread,
Jul 29, 2012, 10:26:06 AM7/29/12
to nodejs
On Jul 29, 8:51 am, Danil Gazizov <danil.gazi...@gmail.com> wrote:
> yes! all then works!
> I must say, the reason was of my nodeJS win7 64bit version using. Now I'm
> using win32 nodeJS

I'll provide a fix for 64-bit node users shortly.

mscdex

unread,
Jul 30, 2012, 1:32:02 AM7/30/12
to nodejs
Ok, so I have committed 64-bit compatibility. If you're on Windows 7
and have VS2010 Express + Windows 7.1 SDK, you'll have to make sure
you `npm install <url>` from within the Windows 7.1 SDK command prompt
(you can find in the start menu) in order for the addon to link
properly.

I currently have a commit/patch/fix for node-gyp to make this work in
any command prompt if you have the kind of environment I listed above,
but it's not merged upstream yet.
Reply all
Reply to author
Forward
0 new messages