无法安装 Ruby Gem Johnson。

4

我试图在Ruby 1.8.7上安装Johnson 2.0.0pre3宝石,但我遇到了这个编译错误:

(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

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


./configure:

7829 int main() {
7830
7831                      int a[sizeof (void*) == $size ? 1 : -1];
7832                      return;
7833
7834 ; return 0; }
   ⋮

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接