Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling node.js on Cygwin

I'm trying to build node.js on my Windows XP box (Yes, it IS painful, thanks.) using Cygwin following Ryans instructions here.

Sadly calling "./configure" from the node source directory barfs up this:

$ ./configure
/home/LWE/sources/node.js/wscript: error: Traceback (most recent call last):
  File "/home/LWE/sources/node.js/tools/wafadmin/Utils.py", line 274, in load_module
    exec(compile(code, file_path, 'exec'), module.__dict__)
  File "/home/LWE/sources/node.js/wscript", line 12, in <module>
    import js2c
  File "/home/LWE/sources/node.js/tools/js2c.py", line 35, in <module>
    import jsmin
  File "/home/LWE/sources/node.js/tools/jsmin.py", line 1
    ../deps/v8/tools/jsmin.py
    ^
SyntaxError: invalid syntax

I'm absolutely not into Python so I'm having a hard time figuring this out. Am I missing some dependency or what?

I'd expect that there is some simple little configuration switch that I have to turn, to make this work. I just don't know where/what/why/...

I compiled node.js on my Mac before from the very same sources and that worked like a charm. And I also can't imagine that the build script from the node repository itself is broken.

PS: It's a totally fresh and up to date Cygwin installation with Python 2.6.5.

like image 564
selfawaresoup Avatar asked Jul 17 '26 18:07

selfawaresoup


1 Answers

I also had a problem getting nodejs to compile using cygwin - also a Python issue. I eventually found a reference to having to rebase the cygwin DLL links to make everything work. Of course I couldn't find my original source for help. But I remembered enough to find similar help.

So from http://avalanche123.tumblr.com/post/855374337/nodejs-mongodb-tinyurl

I remembered that you can stop all cygwin processes, run ash (a minimal shell) that is typically found at C:\cygwin\bin\ash.exe and then, in this shell, run "/usr/bin/rebaseall"

Once I had run the rebaseall command I could, using the normal cygwin shell, successfully run the ./configure script for the nodejs source and proceed to "make" and "make install" nodejs.

like image 139
Stephen Perelson Avatar answered Jul 19 '26 06:07

Stephen Perelson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!