rtomayko/posix-spawn — Issue #21: Posix-spawn won't compile under Cygwin w/ Ruby 1.9.3-p0
Author: muraii
Created: 2011-12-07 18:22:04+00:00
State: open

I hope this is the appropriate spot for this. I know Windows support is low on the pole, and it's understandable. If there is some part of the M I need to RTF, please let me know.

Below is the result of my invoking "gem install jekyll" with Ruby 1.9.2 installed in Cygwin on WinXP. I ran into this same issue when using the Cygwin-default Ruby 1.8.x, but even upon uninstalling this and compiling Ruby 1.9.3-p0 I get the same error. I mention this because in my research I came across some discussion pointing to a difference in how 1.8 and 1.9 handled posix-spawn.

This is the content of gem-make.out. Thank you for any help you can provide.

```/usr/local/bin/ruby.exe extconf.rb
creating Makefile

make
compiling posix-spawn.c
posix-spawn.c:9:19: spawn.h: No such file or directory
In file included from /usr/local/include/ruby-1.9.1/ruby/ruby.h:24,
from /usr/local/include/ruby-1.9.1/ruby.h:32,
from posix-spawn.c:14:
/usr/local/include/ruby-1.9.1/i386-cygwin/ruby/config.h:17:1: warning: "_GNU_SOURCE" redefined
posix-spawn.c:3:1: warning: this is the location of the previous definition
posix-spawn.c:103: error: parse error before "posix_spawn_file_actions_t"
posix-spawn.c: In function `posixspawn_file_actions_addclose':
posix-spawn.c:108: error: `val' undeclared (first use in this function)
posix-spawn.c:108: error: (Each undeclared identifier is reported only once
posix-spawn.c:108: error: for each function it appears in.)
posix-spawn.c:111: error: `key' undeclared (first use in this function)
posix-spawn.c:113: warning: implicit declaration of function `posix_spawn_file_actions_addclose'
posix-spawn.c:113: error: `fops' undeclared (first use in this function)
posix-spawn.c: At top level:
posix-spawn.c:129: error: parse error before "posix_spawn_file_actions_t"
posix-spawn.c: In function `posixspawn_file_actions_adddup2':
posix-spawn.c:133: error: `key' undeclared (first use in this function)
posix-spawn.c:137: error: `val' undeclared (first use in this function)
posix-spawn.c:141: warning: implicit declaration of function `posix_spawn_file_actions_adddup2'
posix-spawn.c:141: error: `fops' undeclared (first use in this function)
posix-spawn.c: At top level:
posix-spawn.c:155: error: parse error before "posix_spawn_file_actions_t"
posix-spawn.c: In function `posixspawn_file_actions_addopen':
posix-spawn.c:162: error: `key' undeclared (first use in this function)
posix-spawn.c:166: error: `val' undeclared (first use in this function)
posix-spawn.c:173: warning: implicit declaration of function `posix_spawn_file_actions_addopen'
posix-spawn.c:173: error: `fops' undeclared (first use in this function)
posix-spawn.c: At top level:
posix-spawn.c:186: error: parse error before "posix_spawn_file_actions_t"
posix-spawn.c: In function `posixspawn_file_actions_operations_iter':
posix-spawn.c:190: error: `key' undeclared (first use in this function)
posix-spawn.c:190: error: `val' undeclared (first use in this function)
posix-spawn.c:190: error: `fops' undeclared (first use in this function)
posix-spawn.c: At top level:
posix-spawn.c:210: error: parse error before '*' token
posix-spawn.c: In function `posixspawn_file_actions_init':
posix-spawn.c:212: warning: implicit declaration of function `posix_spawn_file_actions_init'
posix-spawn.c:212: error: `fops' undeclared (first use in this function)
posix-spawn.c:213: error: `options' undeclared (first use in this function)
posix-spawn.c: At top level:
posix-spawn.c:230: error: parse error before "posix_spawnattr_t"
posix-spawn.c: In function `posixspawn_set_pgroup':
posix-spawn.c:233: error: `options' undeclared (first use in this function)
posix-spawn.c:237: error: `pflags' undeclared (first use in this function)
posix-spawn.c:237: error: `POSIX_SPAWN_SETPGROUP' undeclared (first use in this function)
posix-spawn.c:238: warning: implicit declaration of function `posix_spawnattr_setpgroup'
posix-spawn.c:238: error: `pattr' undeclared (first use in this function)
posix-spawn.c: In function `rb_posixspawn_pspawn':
posix-spawn.c:330: error: `posix_spawn_file_actions_t' undeclared (first use in this function)
posix-spawn.c:330: error: parse error before "fops"
posix-spawn.c:331: error: `posix_spawnattr_t' undeclared (first use in this function)
posix-spawn.c:341: warning: ISO C90 forbids mixed declarations and code
posix-spawn.c:381: warning: ISO C90 forbids mixed declarations and code
posix-spawn.c:391: error: `fops' undeclared (first use in this function)
posix-spawn.c:392: warning: implicit declaration of function `posix_spawnattr_init'
posix-spawn.c:392: error: `attr' undeclared (first use in this function)
posix-spawn.c:395: error: `POSIX_SPAWN_SETSIGMASK' undeclared (first use in this function)
posix-spawn.c:397: warning: implicit declaration of function `posix_spawnattr_setsigmask'
posix-spawn.c:409: warning: implicit declaration of function `posix_spawnattr_setflags'
posix-spawn.c:418: warning: implicit declaration of function `posix_spawnp'
posix-spawn.c:427: warning: implicit declaration of function `posix_spawn_file_actions_destroy'
posix-spawn.c:428: warning: implicit declaration of function `posix_spawnattr_destroy'
Makefile:199: recipe for target `posix-spawn.o' failed
make: *** [posix-spawn.o] Error 1

```