title: Clang version 1.6 cannot be updated
body: <p>I have a very strange issue with clang. I'm running OSX 10.10.1 and have installed XCode 6.1.1 from <a href="https://developer.apple.com/downloads/index.action" rel="nofollow noreferrer">here</a>. For another project, I wanted to update Ruby from 2.1.2 to 2.2.0 via <code>rbenv install 2.2.0</code>. The command prints the following error:</p>
  
  <pre><code>Downloading ruby-2.2.0.tar.gz...
  -&gt; http://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc
  Installing ruby-2.2.0...
  
  BUILD FAILED (OS X 10.10.1 using ruby-build 20141225)
  
  Inspect or clean up the working tree at /var/folders/4z/s4lwbd314_lg3hprgp72qsqr0000gn/T/ruby-build.20150112115924.6502
  Results logged to /var/folders/4z/s4lwbd314_lg3hprgp72qsqr0000gn/T/ruby-build.20150112115924.6502.log
  
  Last 10 log lines:
  Via: 1.1 2ce6276171358bf7d052aa190ed98f8d.cloudfront.net (CloudFront)
  X-Amz-Cf-Id: 42q6Sa73ORpGbCgaHIpsBwTRP8ycUAhsdTolikEbyxqMrn9uePtfCA==
  
  /var/folders/4z/s4lwbd314_lg3hprgp72qsqr0000gn/T/ruby-build.20150112115924.6502/ruby-2.2.0 /var/folders/4z/s4lwbd314_lg3hprgp72qsqr0000gn/T/ruby-build.20150112115924.6502 /usr/bin
  checking build system type... x86_64-apple-darwin14.0.0
  checking host system type... x86_64-apple-darwin14.0.0
  checking target system type... x86_64-apple-darwin14.0.0
  clang: error: invalid version number in '-mmacosx-version-min=10.10.0'
  configure: error: clang version 3.0 or later is required
  make: *** No targets specified and no makefile found.  Stop.
  </code></pre>
  
  <p>Googled for <code>invalid version number in '-mmacosx-version-min=10.10.0'</code> but I did not find any helpful information. By running <code>clang --version</code> it turns out that my clang executable is version 1.6 (!):</p>
  
  <pre><code>Apple clang version 1.6 (tags/Apple/clang-70)
  Target: x86_64-apple-darwin14
  Thread model: posix
  </code></pre>
  
  <p>This seems very weird, because <a href="https://gist.github.com/yamaya/2924292" rel="nofollow noreferrer">XCode is usually shipped with LLVM 6</a>. I tried to (re)install the Command Line Tools (in which clang should be located), but XCode doesn't offer me the option to download/update them: <img src="https://i.stack.imgur.com/S2RPm.png" alt="No Option to Download CLT"></p>
  
  <p>Trying to install them via xcode-select via the command line: <code>xcode-select --install</code> as suggested <a href="http://railsapps.github.io/xcode-command-line-tools.html" rel="nofollow noreferrer">here</a> results in showing the help message, indicating that the --install-command is unknown (xcode-select is version 895). I also tried to <a href="https://developer.apple.com/downloads/index.action" rel="nofollow noreferrer">download and install it manually</a> but it has absolutely no effect. The xcode-select-path is <code>/Applications/Xcode.app/Contents/Developer</code> but I also tried <code>/Applications/Xcode.app</code>.</p>
  
  <p>I also tried to <a href="http://catch-0x16.blogspot.de/2013/07/up-to-date-clang-with-homebrew-on-mac.html" rel="nofollow noreferrer">update clang via Homebrew</a>:</p>
  
  <pre><code>$ brew install llvm --with-clang --with-asan 
  [...]
  LLVM executables are installed in /usr/local/opt/llvm/bin.
  Extra tools are installed in /usr/local/opt/llvm/share/llvm.
  $ brew install llvm --with-clang --with-asan
  Warning: llvm-3.5.0_2 already installed
  </code></pre>
  
  <p>but in none of the two paths is a clang executable.</p>
  
  <p>So my question is: Is there a way to update clang? Or a workaround to install ruby 2.2.0 anyway? I'm stuck here for days, any help is greatly appreciated!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I found out that newer XCode versions (I think from 5.0 upwards) come with LLVM/Clang inside the XCode.app-folder. A few months ago, I installed XCode 4.something for testing purposes - these versions overwrite system tools like clang and xcode-select. Reinstalling XCode 6 will not update them.</p>
  
  <p>I fixed it by copying /usr/bin from another Mac, but there must be a way to fix it without this workaround.</p>