e$B$3$s$P$s$O!#e(B
DragonFly BSDe$B>e$Ge(BRuby 1.8.6
p110e$B$r!"$=$N$^$^:n@.$7$h$&$H$9$k$H!"e(B
% sh configure --enable-pthread --enable-shared
…
% make
ar rcu libruby-static.a array.o bignum.o class.o compar.o dir.o
dln.o enum.o error.o eval.o file.o gc.o hash.o inits.o io.o
marshal.o math.o numeric.o object.o pack.o parse.o process.o
prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o
st.o string.o struct.o time.o util.o variable.o version.o isnan.o
isinf.o dmyext.o
gcc -g -O2 -fPIC -DRUBY_EXPORT -I. -I. -c main.c
gcc -g -O2 -fPIC -DRUBY_EXPORT -L. -rdynamic main.o
libruby-static.a -lcrypt -lm -o miniruby
libruby-static.a(eval.o)(.text+0x15002): In function
rb_thread_start_0': /var/tmp/ruby-1.8.6-p110/eval.c:11945: undefined reference to
pthread_create’
libruby-static.a(eval.o)(.text+0x1501e):/var/tmp/ruby-1.8.6-p110/eval.c:11947:
undefined reference to `pthread_atfork’
*** Error code 1
Stop in /var/tmp/ruby-1.8.6-p110.
e$B$H!"$J$j$^$9!#e(Bpthreade$B$J%i%$%V%i%j$Oe(Blibc_r.{a,so}e$B$K4^$^$l$F$$$k$h$&$G$9!#e(B
e$B0lJ}!“e(Bpkgsrce$B$JOHAH$_$NCf$G$O!”>e5-$NLdBj$OLLE]8+$F$/$l$F$$$k$N$G$9$,!"e(B
e$B:#EY$Oe(Bminirubye$B$N%j%s%/;~$K!"e(Bpthread_atfork()e$B$,L$Dj5A$H$J$j$^$9!#e(B
pthread_atfork()e$B$Oe(B /usr/lib/libthread_xu.so
e$B$H$$$C$?$“$?$j$K$”$k$h$&$G!"e(B
e$B:G=E$K$Oe(Blibc_r.soe$B$rCV$-49$($k$h$&$J0LCVIU$1$N%i%$%V%i%j$N$h$&$G$9!#e(B
(e$B$7$+$7!"e(B1.10.1e$B$H$$$C$?:G?7$N%j%j!<%90J30$G$O!"40A4$G$O$J$$$h$&$G$9!#e(B)
pkgsrce$B$Oe(B 2007Q3 e$B$N%V%i%s%A$,6a$$$?$a!"e(B
$NetBSD: patch-ad,v 1.7 2007/10/02 15:59:23 taca Exp $
— eval.c.orig 2007-09-23 09:01:50.000000000 +0900
+++ eval.c
@@ -11944,7 +11944,9 @@ rb_thread_start_0(fn, arg, th)
#ifdef _THREAD_SAFE
pthread_create(&time_thread, 0, thread_timer, 0);
time_thread_alive_p = 1;
+#ifndef DragonFly
pthread_atfork(0, 0, rb_child_atfork);
+#endif
#else
rb_thread_start_timer();
#endif
e$B$H!"$$$C$?%Q%C%A$G$*Cc$rBy$7$F$$$^$9!#e(B
[ruby-dev:31253]
In message [email protected]
on Wed, 18 Jul 2007 21:49:39 +0900,
“Vincent I.” [email protected] wrote:
e$B$3$N%a!<%k$K>.$5$$!Je(Bpthread_atforke$B$r;H$C$F$k!K%Q%C%A$rE:IU$7$?$s$G$9!#e(B
e$B$G$b$3$N%Q%C%A$OK\Ev$K@5$7$$D>$7J}$G$“$k$+$I$&$+!D$o$+$i$J$$$G$9!#e(B
e$B$*$=$i$/e(Bpthread_atfork()e$B$,MQ0U$5$l$F$$$J$$4D6-$b$”$k$H$$$&$3$H$G!#e(B
–
e$B?@8Me(B e$BN4Gne(B / Takahiro K.
P.S.
e$B;d<+?H$Oe(Bpkgsrce$B$NLLE]$r8+$F$kN)>l$G=q$$$F$$$^$9$,!“e(BDragonFly
BSDe$B$r>oF|:“e(B
e$B;HMQ$7$F$$$k$o$1$G$O$”$j$^$;$s$,!”$I$J$?$+F0:n3NG’$J$I$O$5$l$F$$$k$N$Ge(B
e$B$7$g$&$+e(B? (make
test-alle$B$H$+$9$k$H!"e(B3e$B$D$/$i$$0z$C3]$+$k$h$&$G$9!#e(B)