简体   繁体   English

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

[英]ruby1.9.2 install from source -> installation heisenbug

I wanted to install ruby1.9.2 from source, and as the README suggested I ran make test . 我想从源代码安装ruby1.9.2,并且如自述文件所述,我进行了make test

At first run it failed with this: 第一次运行时,它失败了:

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

Then I ran it second time, now test.rb:gc passed, but failed here: 然后我第二次运行它,现在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

For the third time, the previous errors didn't show up, but this: 第三次没有出现先前的错误,但这是:

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

Seeing the installation gradually 'heal', I continued running make test , and for the 6th time: 看到安装逐渐“修复”,我继续运行make test ,这是第六次:

PASS all 934 tests

I'm on a Virtualboxed Ubuntu 10.10. 我正在使用Virtualboxed Ubuntu 10.10。

Does anyone know what is happening under the hood? 有人知道引擎盖下发生了什么吗?

I am presuming you ran configure then ran make. 我想您先配置然后再运行make。 I am also presuming you have Bison or something similar installed. 我还假定您安装了Bison或类似的东西。 The last edge build I did was 1.9.2p94 since somewhere in their they fixed a bug with TCPSocket compared to 1.9.2p0 我做的最后一个边缘构建是1.9.2p94,因为相比于1.9.2p0,他们修复了TCPSocket的错误

If you missed one of the above steps, I would guess that make test is building the dependencies for the test one at a time slowly getting further before needing to build more dependencies. 如果您错过了上述步骤之一,那么我猜想make test在一次构建make test的依赖关系时,需要逐步建立更多的依赖关系,然后才需要构建更多的依赖关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM