使用./configure --with-gcc = clang在Xcode 4.2上基于Lion构建Ruby 1.9.3 [英] Building Ruby 1.9.3 on Lion with Xcode 4.2 using ./configure --with-gcc=clang

查看:101
本文介绍了使用./configure --with-gcc = clang在Xcode 4.2上基于Lion构建Ruby 1.9.3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的环境:带有Xcode 4.2.1的Mac OS X v10.7.2

My environment: Mac OS X v10.7.2 with Xcode 4.2.1

我正在尝试使用Xcode 4.2.1在Lion上构建ruby 1.9.3.我了解Xcode 4.2.1随附的基于llvm的gcc编译器存在问题.但是我正在尝试按照以下说明 http://goo.gl/Sc39g 来解决此问题.我可以走得更远,但是遇到了两个问题:

I am trying to build ruby 1.9.3 on Lion with Xcode 4.2.1. I understand there's an issue with the llvm-based gcc compiler that comes with Xcode 4.2.1. But I'm trying to work around it by following these instructions, http://goo.gl/Sc39g. I was able to get a little farther along, but then ran into these 2 problems:

  1. #error,请在您的编译标志中添加-D_FILE_OFFSET_BITS = 64!
  2. 严重错误:找不到"sys/statfs.h"文件

完整的配置输出在这里: http://cl.ly/2q2G3p3r3S133i0U1i1e (所有错误都是在底部)

The complete configure output is here: http://cl.ly/2q2G3p3r3S133i0U1i1e (the errors are all the way in the bottom)

请告知.预先感谢.

P.S.我已经阅读过类似/相关问题的列表,但似乎没有一个能解决这两个特定的错误,或者由于我为使此版本正常工作而遇到的所有事情都变得茫然不知所措,所以我错过了它们.如果已经回答了这个问题,请指出答案,并接受我的歉意.

P.S. I've read the list of similar/related questions, but none seem to address these 2 particular errors, or I missed them as my eyes are starting to glaze over from all the things I've tried to get this build to work. If this question has already been answered, please point me to the answer, and accept my apologies for the duplication.

推荐答案

您是否尝试添加标志?

$ make clean
$ ./configure --with-gcc=clang --prefix=$HOME/.rbenv/versions/1.9.2-p290 CFLAGS=-D_FILE_OFFSET_BITS=64

您安装了macfuse吗?如果是,此线程有用吗?

Did you install macfuse? If yes is this thread useful?

或者,如果您不介意安装gcc和brew,则应该更加幸运地使用rbenv或rvm编译ruby. 本文向您展示如何使用gcc和rbenv安装1.9.3.

Or if you don't mind installing gcc and brew, you should have more luck compiling ruby with rbenv or rvm. This article show you how to install 1.9.3 with gcc and rbenv.

这篇关于使用./configure --with-gcc = clang在Xcode 4.2上基于Lion构建Ruby 1.9.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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