我使用我在其他计算机上使用了一段时间的设置来运行bundle install
。我在macOS Sierra上更新了Ruby 2.3.0。大多数宝石安装得很好,但后来我用kgio gem得到了这个错误:
Installing kgio 2.10.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/Andrew/.rvm/gems/ruby-2.3.0/gems/kgio-2.10.0/ext/kgio
/Users/Andrew/.rvm/rubies/ruby-2.3.0/bin/ruby -r
./siteconf20161011-14436-15mix7m.rb extconf.rb
checking for CLOCK_MONOTONIC in time.h... no
checking for CLOCK_MONOTONIC() in time.h... no
checking for clockid_t in time.h... no
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
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/types.h,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 sys/select.h... yes
checking for writev() in sys/uio.h... yes
checking for ruby/io.h... yes
checking for rb_io_t.fd in ruby.h,ruby/io.h... yes
checking for rb_io_t.mode in ruby.h,ruby/io.h... yes
checking for rb_io_t.pathv in ruby.h,ruby/io.h... yes
checking for struct RFile in ruby.h,ruby/io.h... yes
checking size of struct RFile in ruby.h,ruby/io.h... 24
checking for struct RObject... yes
checking size of struct RObject... 40
checking size of int... 4
checking for rb_io_ascii8bit_binmode()... yes
checking for rb_update_max_fd()... yes
checking for rb_fd_fix_cloexec()... yes
checking for rb_cloexec_open()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_io_blocking_region()... yes
checking for rb_str_set_len()... yes
checking for rb_hash_clear() in ruby.h... yes
checking for rb_time_interval()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_str_subseq()... yes
checking for rb_ary_subseq()... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/Users/Andrew/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-16/2.3.0/kgio-2.10.0/mkmf.log
current directory: /Users/Andrew/.rvm/gems/ruby-2.3.0/gems/kgio-2.10.0/ext/kgio
make "DESTDIR=" clean
current directory: /Users/Andrew/.rvm/gems/ruby-2.3.0/gems/kgio-2.10.0/ext/kgio
make "DESTDIR="
compiling accept.c
compiling connect.c
In file included from connect.c:3:
./my_fileno.h:23:12: warning: unused function 'my_fileno' [-Wunused-function]
static int my_fileno(VALUE io)
^
1 warning generated.
compiling kgio_ext.c
kgio_ext.c:11:8: warning: unused variable 'mKgio' [-Wunused-variable]
VALUE mKgio = rb_define_module(
"Kgio");
^
1 warning generated.
compiling poll.c
In file included from poll.c:5:
./broken_system_compat.h:49:30: error: use of undeclared identifier
'CLOCK_REALTIME'
hopefully_CLOCK_MONOTONIC = CLOCK_MONOTONIC;
^
./broken_system_compat.h:34:29: note: expanded from macro 'CLOCK_MONOTONIC'
# define CLOCK_MONOTONIC CLOCK_REALTIME
^
./broken_system_compat.h:52:6: warning: implicit declaration of function
'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
if (clock_gettime(CLOCK_MONOTONIC, &now) == 0)
^
./broken_system_compat.h:52:20: error: use of undeclared identifier
'CLOCK_REALTIME'
if (clock_gettime(CLOCK_MONOTONIC, &now) == 0)
^
./broken_system_compat.h:34:29: note: expanded from macro 'CLOCK_MONOTONIC'
# define CLOCK_MONOTONIC CLOCK_REALTIME
^
./broken_system_compat.h:55:20: error: use of undeclared identifier
'CLOCK_REALTIME'
if (clock_gettime(CLOCK_REALTIME, &now) == 0) {
^
./broken_system_compat.h:56:31: error: use of undeclared identifier
'CLOCK_REALTIME'
hopefully_CLOCK_MONOTONIC = CLOCK_REALTIME;
^
1 warning and 4 errors generated.
make: *** [poll.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/Users/Andrew/.rvm/gems/ruby-2.3.0/gems/kgio-2.10.0 for inspection.
Results logged to
/Users/Andrew/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-16/2.3.0/kgio-2.10.0/gem_make.out
An error occurred while installing kgio (2.10.0), and Bundler cannot
continue.
Make sure that `gem install kgio -v '2.10.0'` succeeds before bundling.
编辑:它建议我检查一个日志文件。这是日志文件的内容:
https://gist.github.com/ProjectDent/9cec0a4f9fb4a7f53b9f304d87634f42