rtomayko/posix-spawn — Issue #24: Does not compile on OpenBSD
Author: worr
Created: 2012-01-09 08:26:10+00:00
State: open

Probably caused the lack of spawn.h in OpenBSD

``` [ will on charmeleon ] ( blog ) % gem install jekyll
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.

/home/will/.rvm/rubies/ruby-1.9.3-preview1/bin/ruby extconf.rb
creating Makefile

make
compiling posix-spawn.c
posix-spawn.c:9:19: error: spawn.h: No such file or directory
In file included from /home/will/.rvm/rubies/ruby-1.9.3-preview1/include/ruby-1.9.1/ruby/ruby.h:24,
from /home/will/.rvm/rubies/ruby-1.9.3-preview1/include/ruby-1.9.1/ruby.h:32,
from posix-spawn.c:14:
/home/will/.rvm/rubies/ruby-1.9.3-preview1/include/ruby-1.9.1/i386-openbsd5.0/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: expected declaration specifiers or '...' before 'posix_spawn_file_actions_t'
posix-spawn.c: In function 'posixspawn_file_actions_addclose':
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:113: error: (Each undeclared identifier is reported only once
posix-spawn.c:113: error: for each function it appears in.)
posix-spawn.c: At top level:
posix-spawn.c:129: error: expected declaration specifiers or '...' before 'posix_spawn_file_actions_t'
posix-spawn.c: In function 'posixspawn_file_actions_adddup2':
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: expected declaration specifiers or '...' before 'posix_spawn_file_actions_t'
posix-spawn.c: In function 'posixspawn_file_actions_addopen':
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: expected declaration specifiers or '...' before 'posix_spawn_file_actions_t'
posix-spawn.c: In function 'posixspawn_file_actions_operations_iter':
posix-spawn.c:190: error: 'fops' undeclared (first use in this function)
posix-spawn.c:190: error: too many arguments to function 'posixspawn_file_actions_addclose'
posix-spawn.c:193: error: too many arguments to function 'posixspawn_file_actions_adddup2'
posix-spawn.c:196: error: too many arguments to function 'posixspawn_file_actions_addopen'
posix-spawn.c: At top level:
posix-spawn.c:210: error: expected ')' before '*' token
posix-spawn.c:230: error: expected declaration specifiers or '...' before 'posix_spawnattr_t'
posix-spawn.c: In function 'posixspawn_set_pgroup':
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 'each_env_check_i':
posix-spawn.c:253: warning: unused parameter 'arg'
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: expected ';' before 'fops'
posix-spawn.c:331: error: 'posix_spawnattr_t' undeclared (first use in this function)
posix-spawn.c:331: error: expected ';' before 'attr'
posix-spawn.c:332: warning: ISO C90 forbids mixed declarations and code
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: warning: implicit declaration of function 'posixspawn_file_actions_init'
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:407: error: too many arguments to function 'posixspawn_set_pgroup'
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'
posix-spawn.c:320: warning: unused parameter 'self'
*** Error code 1

Stop in /home/will/.rvm/gems/ruby-1.9.3-preview1/gems/posix-spawn-0.3.6/ext (line 92 of /usr/share/mk/sys.mk).

Gem files will remain installed in /home/will/.rvm/gems/ruby-1.9.3-preview1/gems/posix-spawn-0.3.6 for inspection.
Results logged to /home/will/.rvm/gems/ruby-1.9.3-preview1/gems/posix-spawn-0.3.6/ext/gem_make.out
```