2012-04-29

The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

Mac OS X Lion上でOctopressを試してみようとしたところrvm installが失敗していました。

nissuk% rvm install ruby-1.9.2-p320
Fetching yaml-0.1.4.tar.gz to /Users/nissuk/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/nissuk/.rvm/src
Configuring yaml in /Users/nissuk/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/nissuk/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/nissuk/.rvm/usr
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

GCCがXCodeのllvm-gccだとだめだそうで…

nissuk% gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Can’t install Ruby under Lion with RVM – GCC issues - Stack Overflow の回答を参考に--with-gcc=clangしたところ一応通りましたが clang: error: unsupported option '--with-libyaml' と言われていて全部は入っていないみたい…動くのかな?

nissuk% rvm install ruby-1.9.2-p320 --with-gcc=clang
Fetching yaml-0.1.4.tar.gz to /Users/nissuk/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/nissuk/.rvm/src
Configuring yaml in /Users/nissuk/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/nissuk/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/nissuk/.rvm/usr
clang: error: unsupported option '--with-libyaml'
Building 'ruby-1.9.2-p320' using clang - but it's not (fully) supported, expect errors.
Installing Ruby from source to: /Users/nissuk/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)...

ruby-1.9.2-p320 - #fetching 
ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, 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 8770k  100 8770k    0     0   718k      0  0:00:12  0:00:12 --:--:--  508k
ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /Users/nissuk/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #extracted to /Users/nissuk/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #configuring 
ruby-1.9.2-p320 - #compiling 
ruby-1.9.2-p320 - #installing 
Retrieving rubygems-1.8.24
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  371k  100  371k    0     0   551k      0 --:--:-- --:--:-- --:--:-- 1416k
Extracting rubygems-1.8.24 ...
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.2-p320 ...
Installation of rubygems completed successfully.
ruby-1.9.2-p320 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p320 - #importing default gemsets (/Users/nissuk/.rvm/gemsets/)
Install of ruby-1.9.2-p320 - #complete 
clang: error: unsupported option '--with-libyaml'
Ruby 'ruby-1.9.2-p320' was build using clang - but it's not (fully) supported, expect errors.