简体   繁体   English

无法安装ruby gem johnson

[英]Can't install ruby gem johnson

I am trying to install on ruby 1.8.7 the johnson 2.0.0pre3 gem and I am getting this compilation error: 我试图在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

What can cause this? 是什么导致这个? Thank you! 谢谢!

It's failing because the code configure is using to determine the size of the type is invalid. 它失败了,因为代码配置用于确定类型的大小是无效的。 It is the return without expression in line 7832 that makes configure fail. 第7832行中没有表达式的返回使配置失败。 See bug #579689 for details. 有关详细信息,请参阅错误#579689


./configure: 。/配置:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM