2013-10-22 121 views
3

我已經安裝了XCode命令行開發者工具,並安裝了ruby-1.9.3-p448ruby-2.0.0-p247,沒有任何問題。在OS X上使用rvm安裝ruby-1.9.3-p194 10.8.5

然而,當我做rvm install ruby-1.9.3-p194我得到一個錯誤:

Error running '__rvm_make -j 1', 
please read /Users/michaelirey/.rvm/log/1382458979_ruby-1.9.3-p194/make.log 
There has been an error while running make. Halting the installation. 

下面是該文件的輸出:

[2013-10-22 09:23:22] __rvm_make 
__rvm_make() 
{ 
    \make "[email protected]" || return $? 
} 
current path: /Users/michaelirey/.rvm/src/ruby-1.9.3-p194 
command(3): __rvm_make -j 1 
    CC = gcc 
    LD = ld 
    LDSHARED = gcc -dynamiclib 
    CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe 
    XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT 
    CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin12.5.0 -I./include -I. 
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/michaelirey/.rvm/rubies/ruby-1.9.3-p194/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend 
    SOLIBS = 
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; 
    ~~~~~~ ~~~^~~~~~~~~~~ 
1 error generated. 
make: *** [regparse.o] Error 1 

我也有嘗試: rvm install ruby-1.9.3-p194 --with-gcc=clang

隨着相同的結果...

回答

2

是在您的環境CC=gcc有 - 這可以解釋這個問題 - 紅寶石1.9.3還沒有準備好建立與它(或clang),確保試之前來取消它:

rvm get stable    # always update rvm first in case of problems 
unset CC     # unset CC to allow autodetection to work 
rvm install ruby-1.9.3-p194 # do not add extra flags 

這應該允許RVM自動檢測如果它仍然失敗,則表示你仍然有一些防止自動檢測的環境,或者有一個錯誤 - 在這裏打開一個錯誤報告:https://github.com/wayneeseguin/rvm/issues

+0

仍然似乎是一個問題。我正在打開一個錯誤報告。 –