2012-06-28 109 views
1

我试图在Mac OS X Lion的安装Ruby 1.9.3,同样的方法,我发现here安装Ruby 1.9.3故障铿锵

基本上它是:

rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr 

然而,这

Larson:~ andrewjl$ rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr 
clang: error: unsupported option '--with-readline' 
clang: error: unsupported option '--with-opt-dir=/Users/andrewjl/.rvm/usr' 

这是铿锵的问题:时间锵在--with-readline-dir选项抛出一个错误?有人知道如何解决这个问题吗?

编辑

试图Shigeya的回答后,我得到这个错误:

Larson:~ andrewjl$ rvm install 1.9.3-p125 --patch xcode-debugopt-fix-r34840.diff --with-readline-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr --with-tcl-lib=/usr --with-tk-lib=/usr 
Installing Ruby from source to: /Users/andrewjl/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)... 

ruby-1.9.3-p125 - #fetching 
ruby-1.9.3-p125 - #downloading ruby-1.9.3-p125, this may take a while depending on your connection... 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 9505k 100 9505k 0  0 52267  0 0:03:06 0:03:06 --:--:-- 50727 
ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to /Users/andrewjl/.rvm/src/ruby-1.9.3-p125 
ruby-1.9.3-p125 - #extracted to /Users/andrewjl/.rvm/src/ruby-1.9.3-p125 
Applying patch 'xcode-debugopt-fix-r34840.diff' (located at /Users/andrewjl/.rvm/patches/ruby/1.9.3/p125/xcode-debugopt-fix-r34840.diff) 
ruby-1.9.3-p125 - #autoreconf 
Error running 'autoreconf', please read /Users/andrewjl/.rvm/log/ruby-1.9.3-p125/autoreconf.log 
ruby-1.9.3-p125 - #configuring 
Error running ' ./configure --prefix=/Users/andrewjl/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-readline --with-opt-dir=/Users/andrewjl/.rvm/usr --with-openssl --with-tcl-lib=/usr --with-tk-lib=/usr --with-libyaml --with-gcc=clang ', please read /Users/andrewjl/.rvm/log/ruby-1.9.3-p125/configure.log 
There has been an error while running configure. Halting the installation. 

这里的日志文件错误:

/usr/local/include/fuse/fuse_compat.h:69:10: fatal error: 'sys/statfs.h' file not found 
#include <sys/statfs.h> 
     ^
clang: error: unable to execute command: Broken pipe: 13 
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation) 
clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information. 
clang: note: diagnostic msg: Error generating preprocessed source(s). 
yes 
checking for strip... strip 
checking for prefix of external symbols... _ 
checking pthread.h usability... yes 
checking pthread.h presence... yes 
checking for pthread.h... yes 
checking for if make is GNU make... yes 
checking for nroff... /usr/bin/nroff 
.ext/include/x86_64-darwin11.4.0/ruby/config.h updated 
ruby library version = 1.9.1 
configure: creating ./config.status 
config.status: creating Makefile 
configure: WARNING: unrecognized options: --with-readline, --with-openssl, --with-tcl-lib, --with-tk-lib, --with-libyaml 
In file included from <built-in>:143: 
In file included from <command line>:1: 
In file included from /usr/local/include/fuse/fuse.h:26: 
/usr/local/include/fuse/fuse_common.h:32:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! 
#error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! 
^ 
In file included from <built-in>:143: 
In file included from <command line>:1: 
In file included from /usr/local/include/fuse/fuse.h:857: 
/usr/local/include/fuse/fuse_compat.h:69:10: fatal error: 'sys/statfs.h' file not found 
#include <sys/statfs.h> 
     ^
clang: error: unable to execute command: Broken pipe: 13 
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation) 
clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information. 
clang: note: diagnostic msg: Error generating preprocessed source(s). 
configure: WARNING: unrecognized options: --with-readline, --with-openssl, --with-tcl-lib, --with-tk-lib, --with-libyaml 
config.status: creating ruby-1.9.pc 
./configure: line 18932: syntax error near unexpected token `(' 
./configure: line 18932: `  sed 's/{\$([^(){}]*)[^{}]*}//g' ${srcdir}/common.mk' 

回答

2

参考this答案。

即使ruby-1.9.3-p125和ruby-1.9.3-p194都支持clang,一般不推荐使用clang安装Ruby。

(注意:我必须先接受编辑建议,然后编辑。非常感谢您的贡献。)

+0

谢谢,请试试看。上次我试了一下,似乎一切正常,尤其是1.9.3-p125,不是铿锵声是官方支持的吗? –

+1

Ruby团队努力尝试,但不时出现新问题,不能随着叮当产品准备就绪,甚至在开发中它可能会给您带来难以调试的问题。 – mpapis

+0

有没有我可以去检查与叮当已知问题的任何地方?没有注意到ruby邮件主题上的任何内容,但这可能是由于发送的邮件数量所致。 –