macにGCC-10.7-v2をインストールしたらgem installで以下のエラーが出るようになってしまった。
$ sudo gem install cocoapods (issue/6)
Password:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
/Users/kenjikinukawa/.rbenv/versions/2.0.0-p0/bin/ruby extconf.rb
checking for -std=c99 option to compiler... yes
checking for CoreFoundation... no
checking for main() in -lCoreFoundation... no
CoreFoundation is needed to build the Xcodeproj C extension.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/kenjikinukawa/.rbenv/versions/2.0.0-p0/bin/ruby
--with-CoreFoundationlib
--without-CoreFoundationlib
Gem files will remain installed in /Users/kenjikinukawa/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/xcodeproj-0.5.5 for inspection.
Results logged to /Users/kenjikinukawa/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/xcodeproj-0.5.5/ext/xcodeproj/gem_make.out
Xcodeのcommand line toolsをインストールすれば治るという情報が落ちていたが、すでにインストール済みだった。
エラーログを見ると、むしろcommand line toolsのあとにGCC-10.7-v2をインストールしたのが原因臭かったので、command line toolsを入れなおしたらなおった。