2013-02-24 84 views
1

我試圖安裝這種方式安裝ruby2:錯誤而與RVM

brew install autoconf brew install automake brew install libyaml rvm install ruby-head

我嘗試安裝與RVM ruby​​2但我得到這個錯誤:

ruby-head - #compiling Error running 'make ', please read /Users/boti/.rvm/log/ruby-head/make.log There has been an error while running make. Halting the installation. Ruby 'ruby-head' was build using clang - but it's not (fully) supported, expect errors.

這是我的編譯日誌:

compiling ./missing/setproctitle.c compiling dmyext.c linking miniruby /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:111: [BUG] Stack consistency error (sp: 38, bp: 36) ruby 2.0.0dev (2013-02-25) [x86_64-darwin12.2.0]

-- Crash Report log information -------------------------------------------- See Crash Report log file under the one of following: * ~/Library/Logs/CrashReporter * /Library/Logs/CrashReporter * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports the more detail of.

-- Control frame information ----------------------------------------------- c:0006 p:0038 s:0038 e:000037 CLASS /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:111 c:0005 p:0035 s:0034 e:000033 CLASS /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:107 c:0004 p:0009 s:0032 e:000031 TOP
/Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:85 [FINISH] c:0003 p:---- s:0030 e:000029 CFUNC :require c:0002 p:0098 s:0026 E:000f88 EVAL ./tool/mkconfig.rb:11 [FINISH] c:0001 p:0000 s:0002 E:0017a8 TOP [FINISH]

./tool/mkconfig.rb:11:in <main>' ./tool/mkconfig.rb:11:in require' /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:85:in <top (required)>' /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:107:in ' /Users/boti/.rvm/src/ruby-head/lib/fileutils.rb:111:in `'

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

  • Loaded script: ./tool/mkconfig.rb

  • 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

這是我的編譯日誌的開頭:

[2013-02-24 20:58:47] make CC = /usr/bin/gcc-4.2 LD = ld LDSHARED = /usr/bin/gcc-4.2 -dynamiclib CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -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 -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin12.2.0 -I./include -I. DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -install_name /Users/boti/.rvm/rubies/ruby-head/lib/libruby.2.0.0.dylib -current_version 2.0.0 -compatibility_version 2.0.0 -fstack-protector -Wl,-u,_objc_msgSend -fstack-protector -Wl,-u,_objc_msgSend SOLIBS =

我希望得到任何幫助......

+0

是否已安裝的Xcode的最新版本,命令行工具的最新版本? – michaelmichael 2013-02-24 19:10:06

+0

Uff ...不,我現在正在做。謝謝... – Boti 2013-02-24 19:14:59

+0

NP,只是我看到的第一件事情,如果我得到編譯器錯誤。另外,請用結果更新問題。@mpapis(RVM發佈經理)的答案表明RVM知道這個問題。 – michaelmichael 2013-02-24 19:29:46

回答

6

試試這個:

CC=clang rvm reinstall 2.0.0-p0 

將編譯,但可能會導致其他錯誤後(我正在尋找是什麼原因導致原來的問題) 。

+0

CC =鏗鏘rvm重新安裝「2.0.0-p0」 版本'2.0.0'是混淆選擇紅寶石解釋器。 無法刪除未知軟件包'' 版本'2.0.0'會令人困惑,選擇紅寶石解釋器。 – Boti 2013-02-24 19:52:10

+0

這工作「CC =鏗rvm重新安裝紅寶石頭」 – Boti 2013-02-24 20:00:46

+0

做'rvm穩定'後,這也會工作... – Boti 2013-02-24 20:02:19

0

我在Mac OS X 10.8.2用的XCode 4.6和BREW運行到周圍miniruby生成錯誤也是如此。

如果只是想經營 「RVM安裝2.0.0」 的結果是這樣的:

https://gist.github.com/polarapfel/5080946

當試圖設置CC到/ usr/bin中/鐺,結果如下:

https://gist.github.com/polarapfel/5081054

無論哪種方式,其結果對我來說是一樣的。

下面是關於它的有趣的事情:沒有問題,我可以建立頭。我認爲2.0.0p0在Mac OS X上不是一個乾淨的版本,需要更多的工作來解決這些問題。

-

OK,這爲我做:只需運行「RVM獲得穩定的」擺脫了構建問題。

0

確保您使用鐺3.0鐺-v。
否則,如果你使用的是舊版本的鏗鏘使用編譯2.0.0-P0用gcc 4.2:

rvm install ruby --with-gcc=gcc-4.2 

我會先刪除舊的紅寶石嘗試:

rvm remove 2.0.0-p0 

還要確保你已經有了RVM頭(不穩定):

rvm get head --autolibs=3 

如果這應該解決miniruby/ENC編譯問題,然後2.0.0-P0是一個乾淨的構建,但你使用過時的編譯器。安裝最新的Xcode不一定包含最新的叮噹聲版本。