title: Installing Ruby 1.9.3 Troubles with Clang
body: <p>I am attempting to install Ruby 1.9.3 on Mac OS X Lion, same method as I discovered <a href="https://stackoverflow.com/questions/10343486/cannot-install-ruby-1-9-3-on-a-clean-lion-install">here</a>:</p>
  
  <p>Basically it's:</p>
  
  <pre><code>rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr
  </code></pre>
  
  <p>However, this time Clang throws an error on the <code>--with-readline-dir</code> option:</p>
  
  <pre><code>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'
  </code></pre>
  
  <p>Is this an issue with Clang? Does anybody know how to get around this?</p>
  
  <p>EDIT</p>
  
  <p>After trying Shigeya's answer I get this error:</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>Here's the log file error:</p>
  
  <pre><code>/usr/local/include/fuse/fuse_compat.h:69:10: fatal error: 'sys/statfs.h' file not found
  #include &lt;sys/statfs.h&gt;
           ^
  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 &lt;built-in&gt;:143:
  In file included from &lt;command line&gt;: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 &lt;built-in&gt;:143:
  In file included from &lt;command line&gt;: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 &lt;sys/statfs.h&gt;
           ^
  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'
  </code></pre>