117,118c117,118
< cc -c -DPERL_CORE -DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -std=c89 -O2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -DPIC -fPIC perlmain.c
< cc -o perl -Wl,-E -fstack-protector-strong -Wl,-R/usr/libdata/perl5/amd64-openbsd/CORE perlmain.o -L. -lperl `cat ext.libs` -lm -lc
---
> cc -c -DPERL_CORE -pthread -DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -std=c89 -O2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -Wthread-safety -DPIC -fPIC perlmain.c
> cc -o perl -pthread -Wl,-E -fstack-protector-strong -Wl,-R/usr/libdata/perl5/amd64-openbsd/CORE perlmain.o -L. -lperl `cat ext.libs` -lpthread -lm -lc
279c279
< t/re/pat_advanced_thr ......................................... skipped
---
> t/re/pat_advanced_thr ......................................... ok
281c281
< t/re/pat_psycho_thr ........................................... skipped
---
> t/re/pat_psycho_thr ........................................... ok
283c283
< t/re/pat_re_eval_thr .......................................... skipped
---
> t/re/pat_re_eval_thr .......................................... ok
285c285
< t/re/pat_rt_report_thr ........................................ skipped
---
> t/re/pat_rt_report_thr ........................................ ok
287,288c287,288
< t/re/pat_special_cc_thr ....................................... skipped
< t/re/pat_thr .................................................. skipped
---
> t/re/pat_special_cc_thr ....................................... ok
> t/re/pat_thr .................................................. ok
297c297
< t/re/reg_email_thr ............................................ skipped
---
> t/re/reg_email_thr ............................................ ok
314c314
< t/re/regexp_qr_embed_thr ...................................... skipped
---
> t/re/regexp_qr_embed_thr ...................................... ok
317c317
< t/re/regexp_unicode_prop_thr .................................. skipped
---
> t/re/regexp_unicode_prop_thr .................................. ok
321c321
< t/re/speed_thr ................................................ skipped
---
> t/re/speed_thr ................................................ ok
393c393
< t/op/getpid ................................................... skipped
---
> t/op/getpid ................................................... ok
416c416
< t/op/index_thr ................................................ skipped
---
> t/op/index_thr ................................................ ok
503c503
< t/op/substr_thr ............................................... skipped
---
> t/op/substr_thr ............................................... ok
509,510c509,510
< t/op/threads-dirh ............................................. skipped
< t/op/threads .................................................. skipped
---
> t/op/threads-dirh ............................................. ok
> t/op/threads .................................................. ok
3664c3664
< cpan/Digest-MD5/t/threads ..................................... skipped
---
> cpan/Digest-MD5/t/threads ..................................... ok
4507c4507
< cpan/Test-Simple/t/subtest/threads ............................ skipped
---
> cpan/Test-Simple/t/subtest/threads ............................ ok
4520c4520
< cpan/Test-Simple/t/threads .................................... skipped
---
> cpan/Test-Simple/t/threads .................................... ok
4558c4558
< cpan/Tie-RefHash/t/threaded ................................... skipped
---
> cpan/Tie-RefHash/t/threaded ................................... ok
4948c4948
< dist/Storable/t/threads ....................................... skipped
---
> dist/Storable/t/threads ....................................... ok
4971,4973c4971,4973
< dist/Thread-Queue/t/01_basic .................................. skipped
< dist/Thread-Queue/t/02_refs ................................... skipped
< dist/Thread-Queue/t/03_peek ................................... skipped
---
> dist/Thread-Queue/t/01_basic .................................. ok
> dist/Thread-Queue/t/02_refs ................................... ok
> dist/Thread-Queue/t/03_peek ................................... ok
4975,4977c4975,4977
< dist/Thread-Queue/t/05_extract ................................ skipped
< dist/Thread-Queue/t/06_insert ................................. skipped
< dist/Thread-Queue/t/07_lock ................................... skipped
---
> dist/Thread-Queue/t/05_extract ................................ ok
> dist/Thread-Queue/t/06_insert ................................. ok
> dist/Thread-Queue/t/07_lock ................................... ok
4979,4982c4979,4982
< dist/Thread-Queue/t/09_ended .................................. skipped
< dist/Thread-Queue/t/10_timed .................................. skipped
< dist/Thread-Queue/t/11_limit .................................. skipped
< dist/Thread-Semaphore/t/01_basic .............................. skipped
---
> dist/Thread-Queue/t/09_ended .................................. ok
> dist/Thread-Queue/t/10_timed .................................. ok
> dist/Thread-Queue/t/11_limit .................................. ok
> dist/Thread-Semaphore/t/01_basic .............................. ok
4985,4986c4985,4986
< dist/Thread-Semaphore/t/04_nonblocking ........................ skipped
< dist/Thread-Semaphore/t/05_force .............................. skipped
---
> dist/Thread-Semaphore/t/04_nonblocking ........................ ok
> dist/Thread-Semaphore/t/05_force .............................. ok
4988,4992c4988,4992
< dist/threads-shared/t/av_refs ................................. skipped
< dist/threads-shared/t/av_simple ............................... skipped
< dist/threads-shared/t/blessed ................................. skipped
< dist/threads-shared/t/clone ................................... skipped
< dist/threads-shared/t/cond .................................... skipped
---
> dist/threads-shared/t/av_refs ................................. ok
> dist/threads-shared/t/av_simple ............................... ok
> dist/threads-shared/t/blessed ................................. ok
> dist/threads-shared/t/clone ................................... ok
> dist/threads-shared/t/cond .................................... ok
4994,5028c4994,5028
< dist/threads-shared/t/dualvar ................................. skipped
< dist/threads-shared/t/hv_refs ................................. skipped
< dist/threads-shared/t/hv_simple ............................... skipped
< dist/threads-shared/t/no_share ................................ skipped
< dist/threads-shared/t/object2 ................................. skipped
< dist/threads-shared/t/object .................................. skipped
< dist/threads-shared/t/shared_attr ............................. skipped
< dist/threads-shared/t/stress .................................. skipped
< dist/threads-shared/t/sv_refs ................................. skipped
< dist/threads-shared/t/sv_simple ............................... skipped
< dist/threads-shared/t/utf8 .................................... skipped
< dist/threads-shared/t/waithires ............................... skipped
< dist/threads-shared/t/wait .................................... skipped
< dist/threads/t/basic .......................................... skipped
< dist/threads/t/blocks ......................................... skipped
< dist/threads/t/context ........................................ skipped
< dist/threads/t/end ............................................ skipped
< dist/threads/t/err ............................................ skipped
< dist/threads/t/exit ........................................... skipped
< dist/threads/t/free2 .......................................... skipped
< dist/threads/t/free ........................................... skipped
< dist/threads/t/join ........................................... skipped
< dist/threads/t/kill2 .......................................... skipped
< dist/threads/t/kill ........................................... skipped
< dist/threads/t/libc ........................................... skipped
< dist/threads/t/list ........................................... skipped
< dist/threads/t/no_threads ..................................... ok
< dist/threads/t/problems ....................................... skipped
< dist/threads/t/stack_env ...................................... skipped
< dist/threads/t/stack .......................................... skipped
< dist/threads/t/state .......................................... skipped
< dist/threads/t/stress_cv ...................................... skipped
< dist/threads/t/stress_re ...................................... skipped
< dist/threads/t/stress_string .................................. skipped
< dist/threads/t/thread ......................................... skipped
---
> dist/threads-shared/t/dualvar ................................. ok
> dist/threads-shared/t/hv_refs ................................. ok
> dist/threads-shared/t/hv_simple ............................... ok
> dist/threads-shared/t/no_share ................................ ok
> dist/threads-shared/t/object2 ................................. ok
> dist/threads-shared/t/object .................................. ok
> dist/threads-shared/t/shared_attr ............................. ok
> dist/threads-shared/t/stress .................................. ok
> dist/threads-shared/t/sv_refs ................................. ok
> dist/threads-shared/t/sv_simple ............................... ok
> dist/threads-shared/t/utf8 .................................... ok
> dist/threads-shared/t/waithires ............................... ok
> dist/threads-shared/t/wait .................................... ok
> dist/threads/t/basic .......................................... ok
> dist/threads/t/blocks ......................................... ok
> dist/threads/t/context ........................................ ok
> dist/threads/t/end ............................................ ok
> dist/threads/t/err ............................................ ok
> dist/threads/t/exit ........................................... ok
> dist/threads/t/free2 .......................................... ok
> dist/threads/t/free ........................................... ok
> dist/threads/t/join ........................................... ok
> dist/threads/t/kill2 .......................................... ok
> dist/threads/t/kill ........................................... ok
> dist/threads/t/libc ........................................... ok
> dist/threads/t/list ........................................... ok
> dist/threads/t/no_threads ..................................... skipped
> dist/threads/t/problems ....................................... ok
> dist/threads/t/stack_env ...................................... ok
> dist/threads/t/stack .......................................... ok
> dist/threads/t/state .......................................... ok
> dist/threads/t/stress_cv ...................................... ok
> dist/threads/t/stress_re ...................................... ok
> dist/threads/t/stress_string .................................. ok
> dist/threads/t/thread ......................................... ok
5134c5134
< ext/File-Glob/t/threads ....................................... skipped
---
> ext/File-Glob/t/threads ....................................... ok
5153c5153
< ext/PerlIO-encoding/t/threads ................................. skipped
---
> ext/PerlIO-encoding/t/threads ................................. ok
5216c5216
< ext/XS-APItest/t/clone-with-stack ............................. skipped
---
> ext/XS-APItest/t/clone-with-stack ............................. ok
5219c5219
< ext/XS-APItest/t/copstash ..................................... skipped
---
> ext/XS-APItest/t/copstash ..................................... ok
5359c5359
< lib/Thread .................................................... skipped
---
> lib/Thread .................................................... ok
5380c5380
< Failed 11 tests out of 2240, 99.51% okay.
---
> Failed 11 tests out of 2315, 99.52% okay.
5405,5406c5405,5406
< Elapsed: 993 sec
< u=9.94 s=7.70 cu=541.51 cs=131.48 scripts=2240 tests=859275
---
> Elapsed: 1191 sec
> u=10.43 s=8.55 cu=642.20 cs=161.82 scripts=2315 tests=870096
Thank you very much gunther and Philip for your technical response to my
question.
Ok, thread support is not recommended officially, then I follow it.
I just watnted it, because Ubuntu linux support it etc., and I'd like to use
a perl script of 2chproxy.pl at github.com.
-------------
for a convenience, I include a diff file, which is made by the procedure
below:
make -f Makefile.bsd-wrapper
make test >file1 2>&1
--
Add -Dusethreads at the end of CONFIG_ARG parameter of Makefile.bsd-wrapper
make -f Makefile.bsd-wrapper
make test >file2 2>&1
(This tread support perl can do
use threads;
without error, after make install)
diff file1 file2 >ken.diff
Kenji
2018年11月27日(火) 2:26 Andrew Hewus Fresh <afresh1@openbsd.org>:
> On Sun, Nov 25, 2018 at 09:32:33PM -0800, Philip Guenther wrote:
> > On Sun, Nov 25, 2018 at 1:57 AM 岡本健二 <keoknj55@gmail.com> wrote:
> >
> > > I have to use thread on the perl5 of OpenBSD 6.4.
> > > However, it was disabled on the distribution.
> > >
> >
> > Hmm, is this something that worked in previous releases, or is something
> > that you've only tried in OpenBSD 6.4?
> >
> > Off-hand, it's still disabled by default in the Configure script that
> perl
> > people ship, and I don't see anything in the OpenBSD bits to override
> their
> > choice.
>
>
> One of the main reasons is that the "use of interpreter-based threads in
> perl is officially discouraged" and has been unofficially discouraged
> for a lot longer.
>
> http://perldoc.perl.org/threads.html#WARNING
>
> My understanding of the reason it is discouraged is that the threading
> mechanism in perl does not lend itself to correct code and you're
> probably better off doing something simpler and getting nearly as good
> results using another mechanism.
>
>
>
> > > I tried to make the thread active to recompile the perl5 with
> -Dusethreads,
> > > which led me to many test fails.
> > >
> >
> > Were there tests that failed with -Dusethreads that passed when that
> wasn't
> > used? If so, which, and what was their output?
>
> The perl test suite does not like to run in the OpenBSD source tree, I
> don't recall why off the top of my head, just that it doesn't. If you
> had failures that are different than you get without enabling threads,
> that might be interesting to diagnose.
>
>
> > To put it another way: if you're suggesting that we build the base perl
> > with -Dusethreads, what are the consequences of that? Test failures?
> > Bigger binary? pkg_add is slower?
>
> It does make perl anecdotally 10% slower overall (as I recall) for non
> threaded operations. Obviously that depends on the workload, but since
> we don't use them, making pkg_add and other things that use perl faster
> seems more useful.
>
> http://perldoc.perl.org/perlthrtut.html#Performance-considerations
>
>
>
>
> > Why the thread function was disabled in this release?
> > > Is it security reason?
> > >
> >
> > Upstream has it off by default, nothing so far has needed it, and it
> makes
> > things slower (or at least that's why upstream says). Why would we
> enable
> > it?
>
>
> See above for more reasoning and you might look at p5-Coro if you
> really need threads, I haven't had a need for them but have heard they
> work better than the core implementation.
>
> https://metacpan.org/pod/Coro
>
> l8rZ,
> --
> andrew - http://afresh1.com
>
> People who invent random theories which only defend the vendor must have
> been beaten as children. Beaten with sticks.
> At least, that's my theory.
> -- Theo De Raadt
>
No comments:
Post a Comment