[][][] mkconfig.rbで止まる

Mac OS Xでchkbuildを試していて、YARVも試してみたら

./miniruby ../yarv-r502/mkconfig.rb -timestamp=.rbconfig.time \
	-install_name=ruby \
	-so_name=ruby rbconfig.rb
timeout: 3600.0 seconds exceeds.
timeout: the process group is alive.
timeout: INT signal sent.
timeout: TERM signal sent.
timeout: KILL signal sent.


Mac-mini:~/build/yarv-r502 kazu$ gdb --args ./miniruby ./mkconfig.rb -timestamp=.rbconfig.time -install_name=ruby -so_name=ruby rbconfig.rb
GNU gdb 6.1-20040303 (Apple version gdb-384) (Mon Mar 21 00:05:26 GMT 2005)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...Reading symbols for shared libraries .... done

(gdb) r
Starting program: /Users/kazu/build/yarv-r502/miniruby ./mkconfig.rb -timestamp=.rbconfig.time -install_name=ruby -so_name=ruby rbconfig.rb
Reading symbols for shared libraries .. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000018
0x0006bd64 in APPEND_LIST (anc1=0xbfffed28, anc2=0xbfffec80) at compile.c:512
512             anc2->anchor.next->prev = anc1->last;
(gdb) bt
#0  0x0006bd64 in APPEND_LIST (anc1=0xbfffed28, anc2=0xbfffec80) at compile.c:512
#1  0x0006fce4 in iseq_compile_each (iseq=0x52caf0, ret=0xbfffed28, node=0x2cc8c4, poped=0) at compile.c:3485
#2  0x000742d0 in compile_array (iseq=0x52caf0, ret=0xbfffedc0, node_root=0x2cc8b0, opt_p=0) at compile.c:1948
#3  0x0006fcb0 in iseq_compile_each (iseq=0x52caf0, ret=0xbfffef38, node=0x2cc89c, poped=0) at compile.c:3476
#4  0x0006d414 in iseq_compile_each (iseq=0x52caf0, ret=0xbfffef38, node=0x2cc874, poped=0) at compile.c:2498
#5  0x00072b10 in iseq_compile (self=2934860, narg=2934840) at compile.c:175
#6  0x0000d75c in iseq_init (self=2919300, node=2934840, name=2919320, file_name=2919600, parent=0, type=5, opt=0) at yarvcore.c:462
#7  0x0005c098 in th_call0 (th=0x1802400, klass=3221220480, recv=2919300, id=1, oid=25194220, argc=6, argv=0xbffff1b8, body=0x2cec78, nosuper=0) at vm.c:490
#8  0x00005b10 in rb_call (klass=3221220648, recv=2919300, mid=2993, argc=6, argv=0xbffff1b8, scope=1) at eval.c:1658
#9  0x0001ee44 in rb_class_new_instance (argc=6, argv=0xbffff1b8, klass=0) at object.c:1435
#10 0x0006bf38 in new_child_iseq (iseq=0x52c910, node=0xbfffec80, name=0, parent=1, type=25194220, opt=9) at compile.c:723
#11 0x0007115c in iseq_compile_each (iseq=0x52c910, ret=0xbffff3c8, node=0x2cc824, poped=1) at compile.c:4037
#12 0x0006d414 in iseq_compile_each (iseq=0x52c910, ret=0xbffff3c8, node=0x2cc810, poped=0) at compile.c:2498
#13 0x00072d44 in iseq_compile (self=2919560, narg=2937660) at compile.c:238
#14 0x0000d75c in iseq_init (self=2919560, node=2937660, name=2919580, file_name=2919600, parent=0, type=3, opt=0) at yarvcore.c:462
#15 0x0005c098 in th_call0 (th=0x1802400, klass=3221220480, recv=2919560, id=1, oid=25194220, argc=6, argv=0xbffff648, body=0x2cec78, nosuper=0) at vm.c:490
#16 0x00005b10 in rb_call (klass=3221220648, recv=2919560, mid=2993, argc=6, argv=0xbffff648, scope=1) at eval.c:1658
#17 0x0001ee44 in rb_class_new_instance (argc=6, argv=0xbffff648, klass=0) at object.c:1435
#18 0x0000d0ac in yarv_new_iseqval (node=3221220648, name=3221220480, file=0, parent=1, type=25194220, opt=9) at yarvcore.c:285
#19 0x0000e080 in yarvcore_eval_parsed (node=16, file=0) at yarvcore.c:248
#20 0x00002fb4 in ruby_exec_internal () at eval.c:233
#21 0x00002ff0 in ruby_exec () at eval.c:247
#22 0x00008300 in ruby_run () at eval.c:267
#23 0x000022d8 in main (argc=6, argv=0xbffffbfc, envp=0x0) at main.c:46

[][] Xcodeが古い?

Xcode 2.0ということでXcodeが古いのが原因という可能性が高いので、http://developer.apple.com/tools/download/ から2.2.1をダウンロードしてくることにした。


make testtest failedになるのもi686-linuxと同じなので問題ないとして、make test-allのexecErrno::EOPNOTSUPPになるのが謎。./miniruby -e'exec("/bin/ls")'でもErrno::EOPNOTSUPPになった。/usr/bin/rubyだと問題がないので、yarvの問題っぽい。

Mac-mini:~/build/yarv-r502 kazu$ gcc -v 2>&1 | tail -1
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
Mac-mini:~/build/yarv-r502 kazu$ gcc-3.3 -v 2>&1 | tail -1
gcc version 3.3 20030304 (Apple Computer, Inc. build 1809)
Mac-mini:~/build/yarv-r502 kazu$ ./configure --prefix=/tmp/yarv-r502 CC=gcc-3.3
Mac-mini:~/build/yarv-r502 kazu$ make
Mac-mini:~/build/yarv-r502 kazu$ make test
warning: out-of-scope variable - count
not ok assignment 107 -- ./sample/test.rb:157:in `block in <main>'
not ok assignment 118 -- ./sample/test.rb:169:in `block in <main>'
not ok assignment 142 -- ./sample/test.rb:196:in `block in <main>'
not ok assignment 208 -- ./sample/test.rb:272:in `block in <main>'
not ok assignment 217 -- ./sample/test.rb:288:in `<main>'
not ok assignment 218 -- ./sample/test.rb:289:in `<main>'
not ok assignment 219 -- ./sample/test.rb:290:in `<main>'
not ok assignment 220 -- ./sample/test.rb:291:in `<main>'
not ok assignment 221 -- ./sample/test.rb:292:in `<main>'
not ok iterator 16 -- ./sample/test.rb:956:in `<main>'
not ok iterator 17 -- ./sample/test.rb:958:in `<main>'
not ok iterator 47 -- ./sample/test.rb:1032:in `<main>'
not ok iterator 49 -- ./sample/test.rb:1034:in `<main>'
not ok iterator 50 -- ./sample/test.rb:1035:in `<main>'
not ok iterator 58 -- ./sample/test.rb:1049:in `<main>'
not ok iterator 60 -- ./sample/test.rb:1051:in `<main>'
not ok iterator 75 -- ./sample/test.rb:1109:in `<main>'
not ok iterator 80 -- ./sample/test.rb:1152:in `<main>'
not ok iterator 81 -- ./sample/test.rb:1159:in `<main>'
not ok iterator 86 -- ./sample/test.rb:1228:in `<main>'
not ok iterator 88 -- ./sample/test.rb:1246:in `<main>'
not ok iterator 91 -- ./sample/test.rb:1266:in `<main>'
not ok iterator 92 -- ./sample/test.rb:1267:in `<main>'
not ok system 9 -- ./sample/test.rb:1878:in `<main>'
test failed
make: *** [test] Error 1
Mac-mini:~/build/yarv-r502 kazu$ make test-all TESTS=-v
./miniruby ./runruby.rb --extout=.ext -- -C "./test" runner.rb --runner=console -v
"./ruby -C ./test runner.rb --runner=console -v"
./runruby.rb:62:in `exec': Operation not supported - ./ruby -C ./test runner.rb --runner=console -v (Errno::EOPNOTSUPP)
        from ./runruby.rb:62:in `<main>'
make: *** [test-all] Error 1
Mac-mini:~/build/yarv-r502 kazu$