无法安装ruby gem johnson

时间:2013-11-18 15:21:02

标签: ruby-on-rails ruby

我正在尝试在ruby 1.8.7上安装johnson 2.0.0pre3 gem并且我收到此编译错误:

(stable)$ gem install johnson -v '2.0.0pre3'
Building native extensions.  This could take a while...
ERROR:  Error installing johnson:
    ERROR: Failed to build gem native extension.

    /Users/aaa/.rvm/rubies/ruby-1.8.7-p374/bin/ruby extconf.rb
creating cache ./config.cache
checking host system type... x86_64-apple-darwin12.5.0
checking target system type... x86_64-apple-darwin12.5.0
checking build system type... x86_64-apple-darwin12.5.0
checking for mawk... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... c++
checking whether the C++ compiler (c++  ) works... yes
checking whether the C++ compiler (c++  ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for ranlib... ranlib
checking for as... /usr/bin/as
checking for ar... ar
checking for ld... ld
checking for strip... strip
checking for windres... no
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking how to run the C++ preprocessor... c++ -E
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for perl5... no
checking for perl... /usr/bin/perl
checking for minimum required perl version >= 5.006... 5.012004
checking for full perl installation... yes
checking for python... /usr/bin/python
checking for doxygen... :
checking for whoami... /usr/bin/whoami
checking for autoconf... /usr/local/bin/autoconf
checking for unzip... /usr/bin/unzip
checking for zip... /usr/bin/zip
checking for makedepend... /opt/X11/bin/makedepend
checking for xargs... /usr/bin/xargs
checking for pbbuild... no
checking for xcodebuild... /usr/bin/xcodebuild
./configure: line 3686: test: Xcode 5.0.2 Build version 5A3005: integer expression expected
checking for sdp... :
checking for gmake... no
checking for make... /usr/bin/make
checking for X... no
checking whether the compiler supports -Wno-invalid-offsetof... yes
checking whether the compiler supports -Wno-variadic-macros... yes
checking whether ld has archive extraction flags... no
checking that static assertion macros used in autoconf tests work... yes
checking for 64-bit OS... yes
checking for -dead_strip option to ld... yes
checking for ANSI C header files... yes
checking for working const... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for st_blksize in struct stat... yes
checking for siginfo_t... yes
checking for stdint.h... yes
checking for the size of void*... configure: error: No size found for void*
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/aaa/.rvm/rubies/ruby-1.8.7-p374/bin/ruby
extconf.rb:27: could not run configure (RuntimeError)
    from extconf.rb:23:in `chdir'
    from extconf.rb:23


Gem files will remain installed in /Users/aaa/.rvm/gems/ruby-1.8.7-p374/gems/johnson-2.0.0.pre3 for inspection.
Results logged to /Users/aaa/.rvm/gems/ruby-1.8.7-p374/gems/johnson-2.0.0.pre3/ext/tracemonkey/gem_make.out

这会导致什么? 谢谢!

1 个答案:

答案 0 :(得分:0)

它失败了,因为代码配置用于确定类型的大小无效。第7832行中没有表达式的返回使配置失败。有关详细信息,请参阅bug #579689

./配置:

nl