2012-03-15 4 views
3

Ruby 1.9.3을 설치하려고합니다.RVM을 사용하여 Ruby 1.9.3을 설치하는 중 오류가 발생했습니다.

나는 실행하고 있습니다 :

  • 엑스 코드 4.3.1
  • 내가 kennethreitz/OSX-GCC-설치

오류

ruby-1.9.3-p125 - #compiling 
Error running 'make ', please read /Users/zaikshev88/.rvm/log/ruby-1.9.3-p125/make.log 
There has been an error while running make. Halting the installation. 

Make.log

에서 GCC를 설치
[2012-03-16 06:59:48] make 
    CC = clang 
    LD = ld 
    LDSHARED = clang -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-darwin11.3.0 -I./include -I. 
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/zaikshev88/.rvm/rubies/ruby-1.9.3-p125/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 = 
linking miniruby 
<internal:prelude>:1: [BUG] Bus Error 
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] 

-- Control frame information ----------------------------------------------- 
c:0003 p:0002 s:0006 b:0006 l:000005 d:000005 TOP <internal:prelude>:1 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:0025d8 d:0025d8 TOP 

-- Ruby level backtrace information ---------------------------------------- 
<internal:prelude>:1:in `<compiled>' 

-- C level backtrace information ------------------------------------------- 

    See Crash Report log file under ~/Library/Logs/CrashReporter or 
    /Library/Logs/CrashReporter, for the more detail of. 

-- Other runtime information ----------------------------------------------- 

* Loaded script: ./miniruby 

* Loaded features: 

    0 enumerator.so 

[NOTE] 
You may have encountered a bug in the Ruby interpreter or extension libraries. 
Bug reports are welcome. 
For details: http://www.ruby-lang.org/bugreport.html 

make: *** [.rbconfig.time] Abort trap: 6 
+0

[내 질문에 대한 답변 'Mac에서 Ruby를 Xcode 4.3.1로 업데이트하는 중'] [SO] 단계를 시도해주세요. 나는 그 결과를 알고 싶다. 중요한 점은 iconv를 rvm과 함께 설치하는 것입니다. [SO] : http://stackoverflow.com/questions/9651670/issue-updating-ruby-on-mac-with-xcode-4-3-1/9651747#9651747 최근에는 다음과 같은 문제가 없습니다. 위의 단계를 사용하여 설치합니다. osx-gcc-installed도 시도했지만 제 경우에는 작동하지 않습니다. – shigeya

답변

1

Ruby 1.9.3은 실험적인 clang 기반 컴파일러를 지원합니다.하지만 최신 버전이 출시되면서 심각 해지고 있습니다. p125는 충돌을 처리해야한다고 생각하지만, 그 실패를 처음으로 보는 사람은 아닙니다.

대신 Macports apple-gcc-42 또는 brew apple-gcc-42과 같은 Apple GCC-without-LLVM을 설치 한 다음이를 사용하여 Ruby를 컴파일하는 것이 좋습니다. (이것은 또한 Ruby 1.9.2 이전 버전과 세분화되지 않은 써드 파티 보석에서도 효과가 있습니다.)

또한 osx-gcc-installer을 사용하여 비 -LVM gcc-4.2를 설치할 수도 있습니다. 여기에서 사용하십시오.

+0

osx-gcc-installer – mpapis

+0

osx-gcc-installer에는 실제로 GCC-without-LLVM이 포함되어 있다고 생각지 않습니다. IIRC에는 clang과 gcc-llvm-42가 있으며 둘 다 완벽하게 지원되지 않습니다. (Ruby의 문제는 백엔드 코드 생성기와 프론트 엔드가 아닌 LLVM과 Ruby 가정 사이의 비 호환성입니다.)'gcc --version'을 실행하고 LLVM이 전혀 포함되어 있는지 확인할 수 있습니다. 'i686-apple-darwin11-llvm-gcc-4.2'는이 목적에 적합하지 않습니다. –

+0

osx-gcc-installer에는 llvm을 포함하지 않는'gcc-4.2'가 포함되어 있습니다. RVM은 항상 osx에서'gcc'를 통해'gcc-4.2'를 선호합니다. 당신은 그것을 설치하기 위해 macports를 사용할 필요가 없습니다 ... 또한 전체 스택은 OSX 자체에 대한 바인딩을 제외하고 컴파일 작업을하기 때문에 homebrew에도 적합합니다. – mpapis

관련 문제