Problems running under Cygwin

1,285 views
Skip to first unread message

adrians

unread,
Dec 2, 2010, 2:16:01 PM12/2/10
to nodejs
Hi all,

I'm trying to build under Cygwin and, after some time spent figuring
out what packages I needed to satisfy most of configure, I'm able to
run "make" and "make install" successfully (or so it seems according
to the build output). The problem is that when I run node (with no
args), I get a segmentation fault.

I'm running Win 7 64 bit with a clone of the master branch on GitHub.
The output of configure is:

$ ./configure
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for gcc : ok
Checking for library dl : yes
Checking for openssl : yes
Checking for library rt : yes
--- libeio ---
Checking for library pthread : yes
Checking for function pthread_create : yes
Checking for function pthread_atfork : yes
Checking for futimes(2) : yes
Checking for readahead(2) : no
Checking for fdatasync(2) : yes
Checking for pread(2) and pwrite(2) : yes
Checking for sendfile(2) : no
Checking for sync_file_range(2) : no
--- libev ---
Checking for header sys/inotify.h : not found
Checking for header sys/epoll.h : not found
Checking for header port.h : not found
Checking for header poll.h : yes
Checking for function poll : yes
Checking for header sys/event.h : not found
Checking for header sys/queue.h : yes
Checking for function kqueue : not found
Checking for header sys/select.h : yes
Checking for function select : yes
Checking for header sys/eventfd.h : not found
Checking for SYS_clock_gettime : no
Checking for library rt : yes
Checking for function clock_gettime : yes
Checking for function nanosleep : yes
Checking for function ceil : yes
Checking for fdatasync(2) with c++ : yes
'configure' finished successfully (21.451s)

Are the missing bits possibly causing a problem? How can I debug
what's wrong? The dump file I get when running node is not much help.
When I run "make test", all tests result in a crash as shown below:

$ make test
Waf: Entering directory `/cygdrive/c/dev/Projects-Open-Source/node/
build'
DEST_OS: cygwin
DEST_CPU: ia32
Parallel Jobs: 1
Product type: program
Waf: Leaving directory `/cygdrive/c/dev/Projects-Open-Source/node/
build'
'build' finished successfully (0.632s)
python tools/test.py --mode=release simple message
=== release test-assert ===
Path: simple/test-assert
Command: build/default/node /cygdrive/c/dev/Projects-Open-Source/node/
test/simple/test-assert.js
--- CRASHED ---
=== release test-buffer ===
Path: simple/test-buffer
Command: build/default/node /cygdrive/c/dev/Projects-Open-Source/node/
test/simple/test-buffer.js
--- CRASHED ---
=== release test-c-ares ===
Path: simple/test-c-ares
Command: build/default/node /cygdrive/c/dev/Projects-Open-Source/node/
test/simple/test-c-ares.js
--- CRASHED ---


Any help would be much appreciated!

mscdex

unread,
Dec 2, 2010, 4:09:34 PM12/2/10
to nodejs
On Dec 2, 2:16 pm, adrians <nman...@gmail.com> wrote:
> Hi all,
>
> I'm trying to build under Cygwin and, after some time spent figuring
> out what packages I needed to satisfy most of configure, I'm able to
> run "make" and "make install" successfully (or so it seems according
> to the build output). The problem is that when I run node (with no
> args), I get a segmentation fault.

What exactly does it say when it segfaults? What version of gcc did
you use to compile?

I just compiled the master branch on cygwin and 'make test' runs just
fine (it passes the first 149 tests and fails on the last 3). The REPL
doesn't seem to work for me though.

adrians

unread,
Dec 2, 2010, 5:15:22 PM12/2/10
to nodejs
Here's what I get:

$ node
Segmentation fault (core dumped)

Contents of stack dump:
Exception: STATUS_ACCESS_VIOLATION at eip=7CF5AB9C
eax=A13CEC83 ebx=00000001 ecx=00000001 edx=7CF99C25 esi=7CFA829D
edi=7CFAC13D
ebp=0028A754 esp=0028A74C program=C:\dev\cygwin\usr\local\bin
\node.exe, pid 1160, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0028A754 7CF5AB9C (A13CEC83, 7CFA8431, 7CFAC13D, 7CF609E1)
0028A774 7CF60A59 (00000000, 0028AA40, 00000000, 00000000)
0028A7A8 7CF51422 (7CF5AB80, 7CFAC13D, 7CFA8431, 00000001)
01274EE0 005F8CAF (7CFA8431, 7CFA8021, 7CF54C81, 7CF60B41)
End of stack trace

gcc version:
gcc (GCC) 4.3.4 20090804 (release) 1

What version are you using?

Aaron Powell

unread,
Dec 2, 2010, 5:18:35 PM12/2/10
to nod...@googlegroups.com
I can confirm this on my machine as well (Win7 x64), gcc --version: 4.3.4

I downloaded the unstable package from the nodejs website and it does compile and run fine.
Aaron Powell
Umbraco Ninja

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com



--
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.


mscdex

unread,
Dec 2, 2010, 7:36:43 PM12/2/10
to nodejs
On Dec 2, 5:15 pm, adrians <nman...@gmail.com> wrote:
> gcc version:
> gcc (GCC) 4.3.4 20090804 (release) 1
>
> What version are you using?

I'm using gcc 4.4.3, which I built myself. This is on Win7 x64 also.

mscdex

unread,
Dec 2, 2010, 7:42:49 PM12/2/10
to nodejs
Also, what happens if you try compiling and running say node 0.2.5
instead of master? Does it segfault still? I know last month there was
a segfault issue in cygwin when v8 was upgraded to 2.5.6.

Aaron Powell

unread,
Dec 2, 2010, 7:46:13 PM12/2/10
to nod...@googlegroups.com
I get this:
$ ./configure
/cygdrive/c/_Projects/github/node/wscript: error: Traceback (most recent call last):
  File "/cygdrive/c/_Projects/github/node/tools/wafadmin/Utils.py", line 274, in load_module
    exec(compile(code, file_path, 'exec'), module.__dict__)
  File "/cygdrive/c/_Projects/github/node/wscript", line 12, in <module>
    import js2c
  File "/cygdrive/c/_Projects/github/node/tools/js2c.py", line 35, in <module>
    import jsmin
  File "/cygdrive/c/_Projects/github/node/tools/jsmin.py", line 1
    ../deps/v8/tools/jsmin.py
    ^
SyntaxError: invalid syntax

I can't get ./configure to work on anything but master. It's complaining about this file: https://github.com/ry/node/blob/v0.2.5/tools/jsmin.py
What's odd is in the packaged download that file is actually blank so it compiles just fine

Aaron Powell
Umbraco Ninja

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com



--

adrians

unread,
Dec 2, 2010, 9:54:04 PM12/2/10
to nodejs
I just tried with 0.2.5 and that compiles and runs fine. Does this
give you a clue?

Aaron Powell

unread,
Dec 2, 2010, 9:55:25 PM12/2/10
to nod...@googlegroups.com
what have you got installed in cygwin?

Aaron Powell
Umbraco Ninja

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


adrians

unread,
Dec 2, 2010, 10:18:27 PM12/2/10
to nodejs
On Dec 2, 9:55 pm, Aaron Powell <m...@aaron-powell.com> wrote:
> what have you got installed in cygwin?
> Aaron Powell
> Umbraco Ninja
>
> http://www.aaron-powell.com|http://twitter.com/slace| Skype:
> aaron.l.powell | MSN: aaz...@hotmail.com
>

A good number of packages - is there anything in particular that you
suspect? Is there a way to get a listing of installed packages from
Cygwin?

Aaron Powell

unread,
Dec 2, 2010, 10:21:31 PM12/2/10
to nod...@googlegroups.com
I just have the bare minimum package set listed here: http://codebetter.com/blogs/matthew.podwysocki/archive/2010/09/07/getting-started-with-node-js-on-windows.aspx as I don't need to do anything else with cygwin other than run nodejs at the moment.

But with this package set it crashes on ./configure (in all but master)

Aaron Powell
Umbraco Ninja

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com



--

mscdex

unread,
Dec 3, 2010, 6:29:33 AM12/3/10
to nodejs
The only packages I have installed are those that are required to
compile and run node, including openssl and its headers.

If you have a lot of free time, maybe try obtaining a newer version
(4.4.x) of gcc/g++ and see if that solves your issues. Like I said, I
ended up compiling it myself because 3.x was what came with cygwin. If
you go the compiling route, there's a nice little wiki article here
(http://cygwin.wikia.com/wiki/How_to_install_GCC_4.3.0) that can help
you with that. It should work for pretty much any version, not just
gcc 4.3.0. Also, I used v3.0.0 of mpfr and v5.0.1 of gmplib.

Bert Belder

unread,
Dec 3, 2010, 8:31:15 AM12/3/10
to nodejs
> > nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nodejs?hl=en.

You get this error because git on windows doesn't create symlinks;
instead it creates just a small file containing the symlink's target.
That's what python chokes on:
> File "/cygdrive/c/_Projects/github/node/tools/jsmin.py", line 1
> ../deps/v8/tools/jsmin.py

Try to use the cygwin version of git (it emulates symlinks), if that
doesn't work try adding the line `symlinks=on` to the core section of
your git config.

- Bert

adrians

unread,
Dec 3, 2010, 11:54:11 AM12/3/10
to nodejs
I guess I'll try installing a newer gcc. Before I do that, do you see
any package from the ones I have which could be a problem?

$ cygcheck -c
Cygwin Package Information
Package Version Status
_update-info-dir 00931-1 OK
alternatives 1.3.30c-10 OK
base-cygwin 3.0-1 OK
base-files 3.9-3 OK
base-passwd 3.1-2 OK
bash 3.2.51-24 OK
bash-completion 1.2-1 OK
binutils 2.20.51-2 OK
bzip2 1.0.5-10 OK
cmake 2.8.2-1 OK
colorgcc 1.3.2-2 OK
coreutils 8.5-2 OK
cpio 2.11-1 OK
crypt 1.1-1 OK
csih 0.9.2-1 OK
curl 7.20.1-1 OK
cvs 1.12.13-10 OK
cvsps 2.2b1-1 OK
cygrunsrv 1.34-1 OK
cygutils 1.4.4-1 OK
cygwin 1.7.7-1 OK
cygwin-doc 1.7-1 OK
dash 0.5.6.1-2 OK
diffutils 2.9-1 OK
editrights 1.01-2 OK
findutils 4.5.9-1 OK
gawk 3.1.8-1 OK
gcc-core 3.4.4-999 OK
gcc-g++ 3.4.4-999 OK
gcc-gdc 3.4.4-999 OK
gcc-mingw-core 20050522-1 OK
gcc-mingw-g++ 20050522-1 OK
gcc-mingw-gdc 20050522-1 OK
gcc-mingw-objc 20050522-1 OK
gcc-objc 3.4.4-999 OK
gcc4 4.3.4-3 OK
gcc4-core 4.3.4-3 OK
gcc4-g++ 4.3.4-3 OK
gcc4-objc 4.3.4-3 OK
gdb 6.8-2 OK
gettext 0.17-11 OK
git 1.7.2.3-1 OK
git-completion 1.7.2.3-1 OK
gnupg 1.4.9-2 OK
grep 2.6.3-1 OK
groff 1.20.1-2 OK
gzip 1.3.12-2 OK
ipc-utils 1.0-1 OK
less 436-1 OK
libattr1 2.4.43-1 OK
libbz2_1 1.0.5-10 OK
libcloog0 0.15.7-1 OK
libcurl4 7.20.1-1 OK
libdb4.5 4.5.20.2-2 OK
libedit0 20090923-1 OK
libexpat1 2.0.1-1 OK
libffi4 4.3.4-3 OK
libgcc1 4.3.4-3 OK
libgcrypt11 1.4.5-1 OK
libgdbm4 1.8.3-20 OK
libgmp3 4.3.1-3 OK
libgmpxx4 4.3.1-3 OK
libgnutls26 2.8.6-1 OK
libgomp1 4.3.4-3 OK
libgpg-error0 1.7-1 OK
libiconv2 1.13.1-1 OK
libidn11 1.18-1 OK
libintl3 0.14.5-1 OK
libintl8 0.17-11 OK
liblzma1 4.999.9beta-11 OK
liblzo2_2 2.03-10 OK
libmpc1 0.8-1 OK
libmpfr1 2.4.1-4 OK
libncurses10 5.7-18 OK
libncurses8 5.5-10 OK
libncurses9 5.7-16 OK
libncursesw10 5.7-18 OK
libobjc2 4.3.4-3 OK
libopenldap2_3_0 2.3.43-1 OK
libopenssl098 0.9.8p-1 OK
libpcre0 8.02-1 OK
libpopt0 1.6.4-4 OK
libppl 0.10.2-1 OK
libreadline6 5.2.14-12 OK
libreadline7 6.0.3-2 OK
libsasl2 2.1.23-1 OK
libsigsegv2 2.8-1 OK
libsqlite3_0 3.7.3-1 OK
libssh2_1 1.2.5-1 OK
libssp0 4.3.4-3 OK
libstdc++6 4.3.4-3 OK
libstdc++6-devel 4.3.4-3 OK
libtasn1_3 2.6-1 OK
libusb-win32 0.1.12.2-1 OK
libwrap0 7.6-21 OK
login 1.10-10 OK
make 3.81-2 OK
man 1.6f-1 OK
mingw-runtime 3.18-1 OK
minires 1.02-1 OK
netcat 1.10-2 OK
openssh 5.6p1-2 OK
openssl 0.9.8p-1 OK
openssl-devel 0.9.8p-1 OK
perl 5.10.1-4 OK
perl-Error 0.17016-1 OK
pkg-config 0.23b-10 OK
python 2.6.5-2 OK
rebase 3.0.1-1 OK
run 1.1.12-11 OK
sed 4.2.1-1 OK
tar 1.23-1 OK
tcltk 20080420-1 OK
terminfo 5.7_20091114-14 OK
terminfo0 5.5_20061104-12 OK
texinfo 4.13-3 OK
tzcode 2010j-1 OK
w32api 3.15-1 OK
wget 1.12-1 OK
which 2.20-2 OK
xz 4.999.9beta-11 OK
zlib 1.2.5-1 OK
zlib-devel 1.2.5-1 OK
zlib0 1.2.5-1 OK

mscdex

unread,
Dec 3, 2010, 5:39:06 PM12/3/10
to nodejs
On Dec 3, 11:54 am, adrians <nman...@gmail.com> wrote:
> I guess I'll try installing a newer gcc. Before I do that, do you see
> any package from the ones I have which could be a problem?

Hmm...I do see you have gcc 3.4.4 installed also. What does `/usr/bin/
gcc -v` give you, just to make sure?

adrians

unread,
Dec 3, 2010, 6:35:33 PM12/3/10
to nodejs
It's the 4.3.4 I mentioned earlier. Maybe I should try to uninstall
the 3.4.4. I'm currently trying to build the latest as per the link
you gave.

adrians

unread,
Dec 4, 2010, 4:17:43 PM12/4/10
to nodejs
OK, I've compiled gcc 4.5.1, and rebuilt node with this version. No
more segfault, but when I run with no args or with a simple hello
world server, nothing happens. There is no output from the executable
whatsoever.

When I do "make test", I get the following ouput:

$ make test
Waf: Entering directory `/cygdrive/c/dev/Projects-Open-Source/node/
build'
DEST_OS: cygwin
DEST_CPU: ia32
Parallel Jobs: 1
Product type: program
Waf: Leaving directory `/cygdrive/c/dev/Projects-Open-Source/node/
build'
'build' finished successfully (0.832s)
python tools/test.py --mode=release simple message
=== release 2100bytes ===
Path: message/2100bytes
Command: build/default/node /cygdrive/c/dev/Projects-Open-Source/node/
test/message/2100bytes.js
=== release hello_world ===
Path: message/hello_world
Command: build/default/node /cygdrive/c/dev/Projects-Open-Source/node/
test/message/hello_world.js
=== release undefined_reference_in_new_context ===
Path: message/undefined_reference_in_new_context
Command: build/default/node /cygdrive/c/dev/Projects-Open-Source/node/
test/message/undefined_reference_in_new_context.js
[02:45|% 100|+ 149|- 3]: Done
make: *** [test] Error 1

This was with the latest source pulled in from master. Is the current
state known to not be working? The error mentioned in the tests is
known? Where can I look to debug?

Thanks again

Luca Bastos

unread,
Dec 4, 2010, 5:12:44 PM12/4/10
to nodejs
After install cygwin and before ./configure on node dir, the following
steps are necessary:

cd /cygwin/bin
ash
rebaseall -v

exit

And then ./configure on node dir

adrians

unread,
Dec 4, 2010, 7:35:48 PM12/4/10
to nodejs
On Dec 4, 5:12 pm, Luca Bastos <lucabas...@gmail.com> wrote:
> After install cygwin and before ./configure on node dir, the following
> steps are necessary:
>
> cd /cygwin/bin
> ash
> rebaseall -v
>
> exit
>
> And then ./configure on node dir
>

I did this and still get the results I listed above. I'm returned to
the bash prompt right after executing node without any output
indicating what went wrong. Shouldn't there be something logged
somewhere?

mscdex

unread,
Dec 4, 2010, 8:09:43 PM12/4/10
to nodejs
On Dec 4, 4:17 pm, adrians <nman...@gmail.com> wrote:
> This was with the latest source pulled in from master. Is the current
> state known to not be working? The error mentioned in the tests is
> known? Where can I look to debug?

I get the same result. All of those tests passing are false positives
I think.

I started a thread about this in the nodejs-dev list, but I'm not sure
if I'll be able to get to the root cause. It seems there is something
wonky going on with v8 and it only affects cygwin.
Reply all
Reply to author
Forward
0 new messages