Skip to content

Instantly share code, notes, and snippets.

@timlinquist
Created February 11, 2011 22:27
Show Gist options
  • Save timlinquist/823174 to your computer and use it in GitHub Desktop.
Save timlinquist/823174 to your computer and use it in GitHub Desktop.
#fail
Installing kgio (2.3.0) with native extensions /Users/tim/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/tim/.rvm/rubies/ruby-1.8.7-p299/bin/ruby extconf.rb
checking for poll() in poll.h... yes
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... yes
checking for getnameinfo() in sys/socket.h,netdb.h... yes
checking for struct sockaddr_storage in sys/types.h,sys/socket.h... yes
checking for accept4() in sys/socket.h... no
checking for ruby/io.h... no
checking for OpenFile in ruby.h,rubyio.h... yes
checking for OpenFile.f in ruby.h,rubyio.h... yes
checking for OpenFile.f2 in ruby.h,rubyio.h... yes
checking for OpenFile.mode in ruby.h,rubyio.h... yes
checking for rb_fdopen()... yes
checking for struct RFile in ruby.h,rubyio.h... yes
checking size of struct RFile in ruby.h,rubyio.h... 12
checking for struct RObject... no
checking size of int... 4
checking for rb_io_ascii8bit_binmode()... no
checking for rb_thread_blocking_region()... no
checking for rb_str_set_len()... yes
creating Makefile
make
gcc -I. -I. -I/Users/tim/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/i686-darwin9.8.0 -I. -DHAVE_POLL -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DHAVE_TYPE_STRUCT_SOCKADDR_STORAGE -DHAVE_TYPE_OPENFILE -DHAVE_ST_F -DHAVE_ST_F2 -DHAVE_ST_MODE -DHAVE_RB_FDOPEN -DHAVE_TYPE_STRUCT_RFILE -DSIZEOF_STRUCT_RFILE=12 -DSIZEOF_INT=4 -DHAVE_RB_STR_SET_LEN -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_GNU_SOURCE -DPOSIX_C_SOURCE=1 -fno-common -g -O2 -fno-common -pipe -fno-common -c accept.c
gcc -I. -I. -I/Users/tim/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/i686-darwin9.8.0 -I. -DHAVE_POLL -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DHAVE_TYPE_STRUCT_SOCKADDR_STORAGE -DHAVE_TYPE_OPENFILE -DHAVE_ST_F -DHAVE_ST_F2 -DHAVE_ST_MODE -DHAVE_RB_FDOPEN -DHAVE_TYPE_STRUCT_RFILE -DSIZEOF_STRUCT_RFILE=12 -DSIZEOF_INT=4 -DHAVE_RB_STR_SET_LEN -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_GNU_SOURCE -DPOSIX_C_SOURCE=1 -fno-common -g -O2 -fno-common -pipe -fno-common -c autopush.c
gcc -I. -I. -I/Users/tim/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/i686-darwin9.8.0 -I. -DHAVE_POLL -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DHAVE_TYPE_STRUCT_SOCKADDR_STORAGE -DHAVE_TYPE_OPENFILE -DHAVE_ST_F -DHAVE_ST_F2 -DHAVE_ST_MODE -DHAVE_RB_FDOPEN -DHAVE_TYPE_STRUCT_RFILE -DSIZEOF_STRUCT_RFILE=12 -DSIZEOF_INT=4 -DHAVE_RB_STR_SET_LEN -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_GNU_SOURCE -DPOSIX_C_SOURCE=1 -fno-common -g -O2 -fno-common -pipe -fno-common -c connect.c
connect.c: In function ‘tcp_connect’:
connect.c:76: error: ‘AI_NUMERICSERV’ undeclared (first use in this function)
connect.c:76: error: (Each undeclared identifier is reported only once
connect.c:76: error: for each function it appears in.)
make: *** [connect.o] Error 1
Gem files will remain installed in /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/kgio-2.3.0 for inspection.
Results logged to /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/kgio-2.3.0/ext/kgio/gem_make.out
from /Users/tim/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `each'
from /Users/tim/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `build_extensions'
from /Users/tim/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in `install'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/source.rb:100:in `install'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/installer.rb:55:in `run'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in `each'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in `each'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/installer.rb:44:in `run'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/installer.rb:8:in `install'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/cli.rb:221:in `install'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in `send'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/lib/bundler/vendor/thor/base.rb:389:in `start'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/gems/bundler-1.0.3/bin/bundle:13
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/bin/bundle:19:in `load'
from /Users/tim/.rvm/gems/ruby-1.8.7-p299@g5core/bin/bundle:19
@tispratik
Copy link

Do you know how to fix this? I am getting the same error on my mac while installing ruby 1.9.2

@timlinquist
Copy link
Author

Try this:

  1. uninstall kgio and unicorn (all versions)
  2. install kgio
  3. install unicorn

This should fix. You may also need to manually delete the kgio install dir under rvm or your gem dir if you're not using rvm.

@tispratik
Copy link

Oh ok. Thanks. But my problem is related to the xmlparser gem. I have freshly installed ruby 1.9.2 and trying to bundle install nokogiri (which uses xmlparser).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment