Build Ruby 1.9.3 on Lion with Xcode 4.2 using. / configure --with-gcc = clang

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

I am trying to create ruby ​​1.9.3 on Lion with Xcode 4.2.1. I understand that there is a problem with the gcc compiler based on llvm that comes with Xcode 4.2.1. But I'm trying to get around this by following these instructions, http://goo.gl/Sc39g . I was able to move a little further, but then ran into these two problems:

  • #error Add -D_FILE_OFFSET_BITS = 64 to your compilation flags!
  • fatal error: sys / statfs.h file not found.

The full output of configure is here: http://cl.ly/2q2G3p3r3S133i0U1i1e (errors at the very bottom below)

Please inform. Thanks in advance.

PS I read a list of similar / related questions, but no one seems to address these two specific errors, or I missed them, as my eyes begin to stroke out of all the things that I tried to make this assembly work. If this question has already been answered, indicate me the answer and accept my apologies for duplication.

0
ruby osx-lion rbenv llvm-gcc
source share
2 answers

Have you tried to add a flag?

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

Have you installed macfuse? If so, is this thread useful?

Or if you don't mind installing gcc and brew, you need more luck compiling ruby ​​with rbenv or rvm. This article shows how to install 1.9.3 using gcc and rbenv.

0
source share

clang will probably break your gems in a line. Try with gcc as follows:

 $ CC=/usr/bin/gcc-4.2 rbenv install 1.9.3-p0 
0
source share

All Articles