Subject: pkg/34859: ruby with native pthread broken
To: None <email@example.com, firstname.lastname@example.org,>
From: None <kochi@NetBSD.org>
Date: 10/19/2006 08:55:00
>Synopsis: ruby with native pthread broken
>Arrival-Date: Thu Oct 19 08:55:00 +0000 2006
>Originator: Takayoshi Kochi
>Release: 3.1_RC4 with 3.0 userland
NetBSD 3.1_RC4 on i386
Trying to use bsfilter (http://bsfilter.org/) with ruby built from
pkgsrc doesn't work correctly.
This PR might belong to both pkg and lib(pthread).
Here's a sample session to repeat this PR.
% bsfilter --add-spam [some spam'ish e-mails]
% bsfilter --add-clean [some non-spam e-mails]
% bsfilter --update
/home/kochi/bin/bsfilter:261:in `min': comparison of Fixnum with Float failed (ArgumentError)
from /home/kochi/bin/bsfilter:1761:in `each'
from /home/kochi/bin/bsfilter:1761:in `min'
from /home/kochi/bin/bsfilter:1761:in `update_probability'
from /home/kochi/bin/bsfilter:1759:in `each'
from /home/kochi/bin/bsfilter:1759:in `update_probability'
from /home/kochi/bin/bsfilter:3348:in `run'
from /home/kochi/bin/bsfilter:3345:in `each'
from /home/kochi/bin/bsfilter:3345:in `run'
The error message above complains that `min' method took two arguments,
one of which is Fixnum (small integer) and the other is Float.
This message seems bogus because "[1, 0.1].min" works correctly
(and of course should work correctly) with the same ruby binary.
I have only tested this on i386 and have no idea about other archs.
To workaround, put RUBY_USE_PTHREAD=no in /etc/mk.conf and
build the ruby package without native pthread. This version of
ruby seem to work correctly with bsfilter.
included in the full description above.
A workaround is to add RUBY_USE_PTHREAD=no in /etc/mk.conf and
build the ruby package without native pthread library.