安装Ruby 1.9.3 Clang的麻烦 [英] Installing Ruby 1.9.3 Troubles with Clang

查看:530
本文介绍了安装Ruby 1.9.3 Clang的麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Mac OS X Lion上安装Ruby 1.9.3,我发现的方法与这里



基本上是:

  rvm install 1.9.3 --with-gcc = clang --with-readline-dir = $ rvm_path / usr 
- with-readline-dir 选项中抛出一个错误:

  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'

这是Clang的问题吗?



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

/ p>

  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 
从源代码安装Ruby到:/Users/andrewjl/.rvm/rubies/ruby-1.9.3-p125,这可能需要一段时间取决于你的cpu ...

ruby​​-1.9.3-p125 - #fetching
ruby​​-1.9.3-p125 - #downloading ruby​​-1.9.3-p125,这可能需要一段时间,具体取决于您的连接...
%总%接收%Xferd平均速度时间时间时间当前
载入上传总剩余速度
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
应用补丁'xcode-debugopt-fix-r34840.diff'(位于/Users/andrewjl/.rvm/patches/ruby/1.9.3/ p125 / xcode-debugopt-fix-r34840.diff)
ruby​​-1.9.3-p125 - #autoreconf
运行'autoreconf'时出错,请读取/Users/andrewjl/.rvm/log/ruby- 1.9.3-p125 / autoreconf.log
ruby​​-1.9.3-p125 - #configuring
运行'./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',请阅读/Users/andrewjl/.rvm/log/ruby-1.9.3-p125/configure.log
运行configure时出现错误。暂停安装。

这是日志文件错误:

  /usr/local/include/fuse/fuse_compat.h:69:10:fatal error:'sys / statfs.h'file not found 
#include< sys / statfs .h>
^
clang:错误:无法执行命令:Broken pipe:13
clang:error:clang frontend命令由于信号2失败(使用-v查看调用)
clang:note:diagnostic msg:请提交错误报告到http://developer.apple.com/bugreporter/,并包括命令行参数和所有诊断信息。
clang:note:diagnostic msg:生成预处理源时出错。

检查strip ... strip
检查外部符号的前缀... _
检查pthread.h可用性...是
检查pthread。 h presence ... yes
检查pthread.h ... yes
检查如果make是GNU make ... yes
检查nroff ... / usr / bin / nroff
.ext / include / x86_64-darwin11.4.0 / ruby​​ / config.h更新
ruby​​库版本= 1.9.1
配置:创建./config.status
config。状态:创建Makefile
configure:警告:无法识别的选项:--with-readline,--with-openssl,--with-tcl-lib,--with-tk-lib,--with-libyaml
在< built-in>中包含的文件中:
在<命令行>中包含的文件中:1:
在包含在/ usr / local / include / fuse / fuse中的文件中。 h:26:
/usr/local/include/fuse/fuse_common.h:32:2:error:#error请在您的编译标志中添加-D_FILE_OFFSET_BITS = 64。
#error请将-D_FILE_OFFSET_BITS = 64添加到您的编译标志!
^
在< built-in>中包含的文件中:143:
在<命令行>中包含的文件中:1:
在/ usr / local /include/fuse/fuse.h:857:
/usr/local/include/fuse/fuse_compat.h:69:10:致命错误:找不到'sys / statfs.h'文件
# include< sys / statfs.h>
^
clang:错误:无法执行命令:Broken pipe:13
clang:error:clang frontend命令由于信号2失败(使用-v查看调用)
clang:note:diagnostic msg:请提交错误报告到http://developer.apple.com/bugreporter/,并包括命令行参数和所有诊断信息。
clang:note:diagnostic msg:生成预处理源时出错。
configure:警告:无法识别的选项:--with-readline,--with-openssl,--with-tcl-lib,--with-tk-lib,--with-libyaml
config。状态:创建ruby-1.9.pc
./configure:line 18932:语法错误接近意外的标记`('
./configure:line 18932:`sed's / {\ $([ (){}] *)[^ {}] *} // g'$ {srcdir} /common.mk'


解决方案

请参阅回答。



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



(注意:我不得不接受编辑提议,然后编辑。 )


I am attempting to install Ruby 1.9.3 on Mac OS X Lion, same method as I discovered here:

Basically it's:

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

However, this time Clang throws an error on the --with-readline-dir option:

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'

Is this an issue with Clang? Does anybody know how to get around this?

EDIT

After trying Shigeya's answer I get this error:

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.

Here's the log file error:

/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'

解决方案

Refer to this answer.

Even though both ruby-1.9.3-p125 and ruby-1.9.3-p194 some support for clang, installing Ruby with clang is generally not recommended.

(Note: I had to accept edit proposal first, then edit. Thank you very much for contribution.)

这篇关于安装Ruby 1.9.3 Clang的麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆