Xcode 3に同梱されているgccコンパイラを使ってMacにJekyll gemをインストールしましたが残念ながらXcode 4.1を持つ別のMacにはインストールできません。このMacはXcode 3を使用していましたが、コマンドsudo /Developer-3.2.5/Library/uninstall-devtools --mode=all
を使用してMacをアンインストールしました。Xcode 4.1にアップグレードしてからJekyll gemをインストールできない
sudo gem install jekyll
しようとしたとき、私は、以下に示すコンパイル・エラーが発生します:
Building native extensions. This could take a while... ERROR: Error installing jekyll: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb creating Makefile make gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin10.3.2 -I/usr/local/lib/ruby/1.8/i686-darwin10.3.2 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -fno-common -pipe -fno-common -c porter.c porter.c:31:44: error: stdlib.h: No such file or directory porter.c:32:47: error: string.h: No such file or directory porter.c: In function ‘create_stemmer’: porter.c:85: warning: incompatible implicit declaration of built-in function ‘malloc’ porter.c: In function ‘setto’: porter.c:199: warning: incompatible implicit declaration of built-in function ‘memmove’ make: *** [porter.o] Error 1 Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/fast-stemmer-1.0.0 for inspection. Results logged to /usr/local/lib/ruby/gems/1.8/gems/fast-stemmer-1.0.0/ext/gem_make.out
ここでかなり根本的な問題があるようです!これをどうすれば解決できますか?私はRuby 1.8.7とRubyGemsを使用しています
1.3.7
1.8.10。
ありがとうございます。あたりとしてexport CC=gcc-4.2
を入力gem install jekyll
試みを実行する前に
同じ問題が発生していた場合、Xcode 5 Developer Previewへのアップデートが役に立ちました。 – NVI