2009年5月16日(土) 火山の方に行ったら途中vogがすごかった [同日]
● [tDiary] この日誌をtdiary-2.3.2とruby-1.9.0にしようとした時のはまりどころ
オトナになったのでデバグは手元のマシンでやることにしました。ついでにruby-1.9.0 (Momonga 5のパッケージ版)でも走らせてみたら、下記のような作業が必要でした。
- index.rbと同じディレクトリのtdiary.confの143行目「ほげほげ日記」がinvalid multibyte charを受ける→#!にオプションをつけて「#!/usr/bin/ruby19 --encoding=utf-8」として解決した
- 「*** glibc detected *** /usr/bin/ruby19: free(): invalid next size (fast): 0x0000000000bdb950 ***」…むむ。
● [Ruby][memo] 最近のrubyを作る
http://svn.ruby-lang.org/repos/ruby/trunkをsvn upして下記の作 業をしたらrevision.hが無いと怒られた。
$ svn up $ autoconf $ mkdir ../ruby-trunk-x86_64 $ cd !$ $ ../ruby-trunk/configure --prefix=/opt/ruby-trunk <中略> In file included from conftest.c:3: ../ruby-trunk/version.h:30:23: error: revision.h: No such file or directory
これでもMakefileはできちゃうのだけれど、 s21g::Hello, world!を参考に、svn infoに表示されるRevisionを使って、下記のような内容のファイルを、 configureのあるディレクトリにrevision.hとして作成した。
#define RUBY_REVISON 23473
make testは下記のように失敗したがきっと既知なのだろう。
$ make test
<前略>
PASS all 937 tests
./miniruby -I../ruby-trunk/lib -I.ext/common -I./- -r../ruby-trunk/ext/purelib.rb "../ruby-trunk/bootstraptest/runner.rb" --ruby="ruby" ../ruby-trunk/KNOWNBUGS.rb
2009-05-16 19:40:14 -1000
Driver is ruby 1.9.2dev (2009-05-17 trunk 23473) [x86_64-linux]
Target is ruby 1.9.2dev (2009-05-17 trunk 23473) [x86_64-linux]
KNOWNBUGS.rb F
#1 KNOWNBUGS.rb:6:in `<top (required)>':
Process.setrlimit(:NPROC, 1)
fork {}
#=> killed by SIGABRT (signal 6)
| bootstraptest.tmp.rb:3: [BUG] rb_thread_create_timer_thread: return non-zero (11)
| ruby 1.9.2dev (2009-05-17 trunk 23473) [x86_64-linux]
|
| -- control frame ----------
| c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :fork
| c:0003 p:0048 s:0007 b:0006 l:000c98 d:001b38 EVAL bootstraptest.tmp.rb:3
| c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
| c:0001 p:0000 s:0002 b:0002 l:000c98 d:000c98 TOP
| ---------------------------
| bootstraptest.tmp.rb:3:in `<main>'
| bootstraptest.tmp.rb:3:in `fork'
|
| -- C level backtrace information -------------------------------------------
| 0x51cb72 /home/zunda/local/src/ruby-trunk-x86_64/ruby(rb_vm_bugreport+0xa2) [0x51cb72]
| 0x55a136 /home/zunda/local/src/ruby-trunk-x86_64/ruby [0x55a136]
| 0x55a2b1 /home/zunda/local/src/ruby-trunk-x86_64/ruby(rb_bug+0xb1) [0x55a2b1]
| 0x520b2d /home/zunda/local/src/ruby-trunk-x86_64/ruby [0x520b2d]
| 0x4766fa /home/zunda/local/src/ruby-trunk-x86_64/ruby(rb_fork_err+0x38a) [0x4766fa]
| 0x476aa4 /home/zunda/local/src/ruby-trunk-x86_64/ruby [0x476aa4]
| 0x519c9a /home/zunda/local/src/ruby-trunk-x86_64/ruby [0x519c9a]
| 0x50e699 /home/zunda/local/src/ruby-trunk-x86_64/ruby [0x50e699]
| 0x5132b8 /home/zunda/local/src/ruby-trunk-x86_64/ruby [0x5132b8]
| 0x51359a /home/zunda/local/src/ruby-trunk-x86_64/ruby(rb_iseq_eval_main+0x23a) [0x51359a]
| 0x416733 /home/zunda/local/src/ruby-trunk-x86_64/ruby(ruby_exec_node+0xb3) [0x416733]
| 0x4182a3 /home/zunda/local/src/ruby-trunk-x86_64/ruby(ruby_run_node+0x33) [0x4182a3]
| 0x41596d /home/zunda/local/src/ruby-trunk-x86_64/ruby(main+0x4d) [0x41596d]
| 0x3d86a1e316 /lib64/libc.so.6(__libc_start_main+0xe6) [0x3d86a1e316]
| 0x415859 /home/zunda/local/src/ruby-trunk-x86_64/ruby [0x415859]
|
| [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
|
[ruby-dev:37934]
FAIL 1/1 tests failed
make: *** [test-knownbug] エラー 1
make install後のmake test-allの結果は下記。
Finished in 383.238867 seconds. 1) Failure: test_sin(DL::TestDL) [/home/zunda/local/src/ruby-trunk/test/dl/test_dl2.rb:38]: <0.9092974268256817> expected but was <0.9999996829318346>. 2) Failure: test_core_03_notify(Rinda::TupleSpaceProxyTest) [/home/zunda/local/src/ruby-trunk/test/rinda/test_rinda.rb:387]: <10> expected but was <4>. 3) Failure: test_accumulate_dst1(TestEncodingConverter) [/home/zunda/local/src/ruby-trunk/test/ruby/test_econv.rb:8]: <["abc", "def", :destination_buffer_full]> expected but was <["abc", "\x81\x82def", :destination_buffer_full]>. 4) Failure: test_accumulate_dst2(TestEncodingConverter) [/home/zunda/local/src/ruby-trunk/test/ruby/test_econv.rb:8]: <["abc\xA4", "def", :destination_buffer_full]> expected but was <["abc\xE3", "\x82def", :destination_buffer_full]>. 5) Failure: test_invalid2(TestEncodingConverter) [/home/zunda/local/src/ruby-trunk/test/ruby/test_econv.rb:8]: <["abc", "def", :invalid_byte_sequence]> expected but was <["abc", "def", :destination_buffer_full]>. 6) Failure: test_sprintf_p(TestM17N) [/home/zunda/local/src/ruby-trunk/test/ruby/test_m17n.rb:773]: <#<Encoding:US-ASCII>> expected but was <#<Encoding:ASCII-8BIT>>. 7) Failure: test_assert_in_delta_triggered(TestMiniTestTestCase) [/home/zunda/local/src/ruby-trunk/test/minitest/test_mini_test.rb:474]: Expected /\AExpected 0\.0 - 0\.001 \(0\.001\) to be < (?:1\.0+\de-06|9\.9+\de-07).\z/ to match "Expected 0.0 - 0.001 (0.001) to be < 1.0e-06.". 8) Failure: test_handle_special_CROSSREF_no_underscore(TestRDocMarkupToHtmlCrossref) [/home/zunda/local/src/ruby-trunk/test/rdoc/test_rdoc_markup_to_html_crossref.rb:142]: Expected "<p> <a href=\"../files/home/zunda/local/src/ruby-trunk/test/rdoc/rdoc_markup_to_html_crossref_reference_rb.html\">/home/zunda/local/src/ruby-trunk/test/rdoc/rdoc_markup_to_html_crossref_reference.rb</a> </p> ", not "<p> /home/zunda/local/src/ruby-trunk/test/rdoc/rdoc_markup_to_html_crossref_reference.rb </p> ". /home/zunda/local/src/ruby-trunk/test/rdoc/test_rdoc_markup_to_html_crossref.rb:142:in `verify_file_crossref' /home/zunda/local/src/ruby-trunk/test/rdoc/test_rdoc_markup_to_html_crossref.rb:211:in `verify_invariant_crossrefs' /home/zunda/local/src/ruby-trunk/test/rdoc/test_rdoc_markup_to_html_crossref.rb:234:in `test_handle_special_CROSSREF_no_underscore' 9) Failure: test_indentation_check(TestRubyOptions) [/home/zunda/local/src/ruby-trunk/test/ruby/test_rubyoptions.rb:293]: Expected /:2: warning: mismatched indentations at 'end' with 'begin' at 1/ to match "". 10) Failure: test_encode_xmlschema(TestTimeExtention) [/home/zunda/local/src/ruby-trunk/test/test_time.rb:167]: <"1970-01-01T09:00:00.666+09:00"> expected but was <"1969-12-31T14:00:00.666-10:00">. 5069 tests, 2831407 assertions, 10 failures, 0 errors, 0 skips make: *** [test-all] エラー 1
えーと。yak shavingはここまでにして本筋にもどります。
追記: 10番目のFailureは安易な対処ができそうだったのでご報告しておきました→ [ruby-dev: 38492]
● [tDiary] 本日のリンク元もうちょっと強化プラグインがruby-1.8で動かない問題の修正
Yak shavingを何度かして、やっと尻尾をつかまえたと思ったら チケット一覧 を見られなくなっちゃいました。どうしたんだろう。 そろそろ時間切れなのでとりあえずこちらに書いておきます。
手元では、tdairy-2.3.2に下記のパッチを当てると期待通りの動作になって、 ruby-1.8.7-p72とruby-1.9.2dev(trunkのr.23473)でも問題なく動作することを確認しました。
--- misc/plugin/disp_referrer.rb.orig 2009-05-07 23:46:29.000000000 -1000 +++ misc/plugin/disp_referrer.rb 2009-05-16 20:57:29.000000000 -1000 @@ -294,7 +294,7 @@ # strips site:... portion (google), multiple spaces, and start/end spaces def self::normalize( str ) - str.sub( /\bsite:(\w+\.)*\w+\b/, '' ).gsub( /[ \s\n]+/, ' ' ).strip + str.sub( /\bsite:(\w+\.)*\w+\b/u, '' ).gsub( /[ \s\n]+/u, ' ' ).strip end # parse_query parses the not unescaped query in a URL
本日のツッコミ(全2件) [ツッコミを入れる]
最近のツッコまれどころ