问题更新Ruby on Mac与Xcode 4.3.1
我使用RVM安装它,它给我这个错误:
The provided compiler '/usr/bin/gcc' is LLVM based,it is not yet fully supported by ruby and gems,please read `rvm requirements`. 我在狮子10.7.3,我有Xcode 4.3.1。 解决方法
简短的答案是你可以抓取RVM主分支(不稳定)来构建它与LLVM(不是gcc,我最初错误的)。它具有适当的补丁,使1.9.3-p125默认运行(至少更好)Xcode 4.3.1。我提供了补丁。如果你已经安装了RVM,rvm get头会安装master分支。使用Xcode 4.3.1安装的命令行工具,可以成功安装Ruby 1.9.3-p125。
背景 这是由于Ruby 1.9.3-p125的简单配置问题,它不允许动态链接模块工作。如果您使用Xcode 4.3.x(Ruby Issue#6080),则会发生这种情况。 这个问题在change set r34840修正。 RVM具有提供每版本基础的补丁系统。此修补程序包含在RVM(现在的主分支)中,现在默认为p125配置步骤。 Xcode 4.3.x命令行工具 首先,使用Xcode 4.3.x,需要按照以下说明安装Xcode 4.3.x后安装命令行工具:1)启动Xcode,2)从菜单栏上的“Xcode”项中打开“首选项”。 3)选择“下载”选项卡(图标)。 4)点击“命令行工具”的“安装”按钮(从我朋友的网站here借来的指示) 如果Xcode 4.3.1安装正确,那么cc -version应该会发出: % cc --version Apple clang version 3.1 (tags/Apple/clang-318.0.54) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.3.0 Thread model: posix autoconf和automake 你需要autoconf和automake,因为Xcode 4.3.x没有它们。安装他们酿造或MacPorts。与MacPorts: sudo port install autoconf automake 推荐使用RVM安装步骤 然后,要安装RVM的特定分支,可以: REPO=wayneeseguin BRANCH=master # stable for the stable branch curl -s https://raw.github.com/${REPO}/rvm/${BRANCH}/binscripts/rvm-installer > /tmp/rvm-installer.sh bash /tmp/rvm-installer.sh --branch ${REPO}/${BRANCH} 或者如果已经安装了RVM: rvm get head # master branch,for stable branch "rvm get stable" 之后,使用rvm pkg命令安装openssl,iconv和readline,以获得最佳效果。我最近做了跟随。其中的一部分可能需要包含在RVM中 rvm pkg install openssl rvm pkg install readline # if you prefer GNU readline 然后,最后安装Ruby。 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 rvm pkg的帮助推荐不同的参数,帮助是坏的。所以现在使用以上。你需要tcl / tk参数,如果你有他们通过MacPorts(像我) 顺便说一句,可以安装旧的Xcode然后运行rvm导出CC =“gcc-4.2”rvm安装1.9.3-p125,但我个人认为cl(LLVM)是未来的方式,如果可能的话。 希望这可以帮助。 2012/3/31附注 iconv不需要安装,还添加了autoconf / automake要求进行说明。 2012/4/13附注 最新的stable不包括补丁需要动态链接才能正常工作。您需要在构建1.9.3-p125时添加–patch xcode-debugopt-fix-r34840.diff。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |