From: Alexey Verkhovsky Date: 2004-07-30T06:52:27+09:00 Subject: Re: Problem building Ruby 1.8.2-rc with pthread on HPUX On Sun, 2004-07-25 at 20:43, Alexey Verkhovsky wrote: > I was trying to build Ruby 1.8.2 on HPUX today. Simple "./configure; > make" works fine. However, when I try to make it with --enable-pthread, > bootstrap Ruby (make calls it "miniruby") throws SIGBUS. I still have no luck with this story. By now this list is my last hope, else I have to go back to Tcl :((( Some more details on the problem: 1. Ruby 1.8.1 behaves the same as 1.8.2-rc 2. Here is the stack trace at the time of SIGBUS: > gdb miniruby core HP gdb 3.1 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00. .. Core was generated by `miniruby'. Program terminated with signal 6, Aborted. (gdb) where #0 0xc020c718 in kill+0x10 () from /usr/lib/libc.2 #1 0xc01a6de4 in raise+0x24 () from /usr/lib/libc.2 #2 0xc01e7348 in abort_C+0x160 () from /usr/lib/libc.2 #3 0xc01e73a4 in abort+0x1c () from /usr/lib/libc.2 #4 0x5f4ec in rb_bug (fmt=0x149dc8 "Bus Error") at error.c:199 #5 0xd5180 in sigbus (sig=10) at signal.c:409 #6 #7 0x23080 in rb_eval (self=1074818488, n=0x40107328) at eval.c:2825 #8 0x21a00 in rb_eval (self=1761613200, n=0x2) at eval.c:2532 #9 0x2b464 in rb_yield_0 (val=6, self=1074818488, klass=0, flags=0, avalue=0) at eval.c:4337 #10 0x2b720 in rb_f_loop () at eval.c:4394 #11 0x2e174 in call_cfunc (func=0x400064b2 , recv=1074818488, len=0, argc=0, argv=0x0) at eval.c:4935 #12 0x2efcc in rb_call0 (klass=1074091120, recv=1074818488, id=3937, oid=3937, argc=0, argv=0x0, body=0x400533a0, nosuper=0) at eval.c:5066 #13 0x30134 in rb_call (klass=1074091120, recv=1074818488, mid=3937, argc=0, argv=0x0, scope=1) at eval.c:5287 #14 0x24ce4 in rb_eval (self=1074818488, n=0x40107118) at eval.c:3091 #15 0x22e5c in rb_eval (self=Cannot access memory at address 0xffffd9dc ) at eval.c:2796 Cannot access memory at address 0xffffd9ec (gdb) 3. Miniruby actually works (to some extent) > miniruby -e "puts 'aaa'" aaa 4. With a few debug prints added to the lib/shellwords.rb: > make Original input= ''--enable-shared' '--enable-pthread' Begin iteration. Line= ''--enable-shared' '--enable-pthread' Begin iteration. Line= ' '--enable-pthread' Just before SIGBUS line= ''--enable-pthread' {$HOME}/ruby-1.8.1/lib/shellwords.rb:53: [BUG] Bus Error ruby 1.8.1 (2003-12-25) [hppa2.0w-hpux11.11] sh: 5684 Abort(coredump) *** Error exit code 134 The SIGBUS happens when executing break statement immediately after puts "Just before SIGBUS" I've searched through ruby-talk archives and tried adding -Aa and/or -D_HPUX_SOURCES flags to CFLAGS. This doesn't help. If I configure without --enable-pthread, everything builds and works fine and dandy. SOS Best regards, Alexey Verkhovsky