MacOSX Mountain Lion下使用rvm安装ruby 1.9.3

在MacOSX Mountain Lion with XCode 4.5.2/4.6下使用rvm安装ruby 1.9.3会出现compile错误:

Error running ‘make’, please read /Users/ivan/.rvm/log/ruby-1.9.3-p374/make.log
There has been an error while running make. Halting the installation.

make.log中的错误信息:

compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;</blockquote>

解决方法:

rvm install 1.9.3 --with-gcc=gcc

参考资料 :

0%