pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/34859: ruby with native pthread broken



>Number:         34859
>Category:       pkg
>Synopsis:       ruby with native pthread broken
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 19 08:55:00 +0000 2006
>Originator:     Takayoshi Kochi
>Release:        3.1_RC4 with 3.0 userland
>Organization:
>Environment:
NetBSD 3.1_RC4 on i386
>Description:
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'
        from /home/kochi/bin/bsfilter:3412

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.

>How-To-Repeat:
included in the full description above.
>Fix:
A workaround is to add RUBY_USE_PTHREAD=no in /etc/mk.conf and
build the ruby package without native pthread library.




Home | Main Index | Thread Index | Old Index