Skip to content

Building Node on Windows Cygwin

piscisaureus edited this page Aug 6, 2010 · 15 revisions
  1. Install Cygwin and use setup.exe in the cygwin folder for the following substeps
    • Install devel → openssl
    • Install devel → g++-gcc
    • Install devel → make
    • Install python → python
    • Install devel → git
  2. Run the following commands to clone the repo and build node (open the cygwin command line with Start > Cygwin > Cygwin Bash Shell)
git clone git://github.com/ry/node.git
cd node
./configure
make
make test

(There will be some test failures in windows)

Build problems:

C:\Program Files\Python27\python.exe: can’t open file ‘/cygdrive/c/node/tools/waf-light’: [Errno 2] No such file or directory

This is not an issue with node. You are using the Windows version of python in Cygwin (and it doesn’t know how to process Cygwin style pathnames). You need to remove the Windows version (or make sure is not in the path) and install the Cygwin version of python.

fatal error – unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as parent: 0×360000 != 0×3E0000

This is not an issue with node either; the problem is that your Cygwin installation is not in c:\cygwin. To resolve this issue, use the Cygwin installer to install → rebase, then run ‘rebaseall’; it will tell you what to do further.

Know issues:

domain name resolution

Cygwin internally uses Windows for DNS queries. Node.js uses the c-ares library that relies on /etc/resolv.conf. Cygwin ships with an empty /etc/resolv.conf. In order to enabled networking add a domain name server to the file:

# add the IP of a valid name server
nameserver 8.8.8.8

Help! I’ve done EVERYTHING above and I’m still having trouble!

If you’ve tried all of the above steps, and you still need some help, pop into the #node.js chat channel on irc.freenode.net.