ruby1.9.2从源代码安装 - >安装heisenbug

时间:2010-12-28 22:23:11

标签: ruby install

我想从源代码安装ruby1.9.2,而自述文件建议我运行了make test

首次运行时失败了:

sample/test.rb:gc ....not ok system 9 -- /home/user/Downloads/ruby-1.9.2-p136/sample/test.rb:1950:in `<main>'
not ok/test: 900 failed 1
test failed

然后我第二次运行它,现在test.rb:gc通过了,但在这里失败了:

sample/test.rb:system ........unknown encoding name: euc-jp
/home/user/Downloads/ruby-1.9.2-p136/ext/tk/sample/demos-jp/anilabel.rb
unknown encoding name: euc-jp
/home/user/Downloads/ruby-1.9.2-p136/ext/tk/sample/demos-jp/aniwave.rb
unknown encoding name: euc-jp
/home/user/Downloads/ruby-1.9.2-p136/ext/tk/sample/demos-jp/arrow.rb
unknown encoding name: euc-jp
/home/user/Downloads/ruby-1.9.2-p136/ext/tk/sample/demos-jp/bind.rb
unknown encoding name: euc-jp
/home/user/Downloads/ruby-1.9.2-p136/ext/tk/sample/demos-jp/bitmap.rb
.....and a lot more

第三次,以前的错误没有出现,但是这个:

test_autoload.rb ........bootstraptest.tmp.rb:4:in `block in <main>': undefined method `ok' for ZZZ:Class (NoMethodError)
.
.
.
#11 test_autoload.rb:54:in `<top (required)>': 
     open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
     autoload :ZZZ, "./zzz.rb"
     t1 = Thread.new {ZZZ.ok}
     t2 = Thread.new {ZZZ.ok}
     [t1.value, t2.value].join
  #=> "" (expected "okok")  
FAIL 1/934 tests failed
make: *** [yes-btest-ruby] Error 1

逐渐看到装置'愈合',我继续跑make test,第6次:

PASS all 934 tests

我正在使用Virtualboxed Ubuntu 10.10。

有谁知道引擎盖下发生了什么?

1 个答案:

答案 0 :(得分:0)

我假设您运行configure然后运行make。我也假设你有野牛或类似的东西安装。我做的最后一个边缘构建是1.9.2p94,因为在他们的某个地方用TCPSocket修复了一个bug而不是1.9.2p0

如果您错过了上述步骤之一,我猜测make test正在为需要构建更多依赖项之前慢慢进一步构建测试的依赖项。