+ -
当前位置:首页 → 问答吧 → 新人求教...Perl怎么编译能支持多线程,要加什么配置选项吗?

新人求教...Perl怎么编译能支持多线程,要加什么配置选项吗?

时间:2010-09-27

来源:互联网

我在fedora或者ubuntu下运行代码,用的分别是v5.10.1和v5.13.5

都出现:
This Perl not built to support threads
Compilation failed in require at rnclogcol.pl line 11.
BEGIN failed--compilation aborted at rnclogcol.pl line 11.

line 11是 use threads;

threads模块也从CPAN下载装好了,还是不行;去网上查了下,似乎说是我的perl不支持多线程,要重新编译,请问要怎么编译阿?
我现在是直接 sh Configure -de 默认的,然后直接make,make test,make install这么编译的。。。

作者: wooder20000   发布时间: 2010-09-27



QUOTE:
Remember at least Perl version 5.8.0 with ithreads support built-in. That means that it should report:

  % perl5.8.0 -V:useithreads -V:usemultiplicity
  useithreads='define';
  usemultiplicity='define';

If that's not what you see rebuild Perl with -Dusethreads.

作者: 兰花仙子   发布时间: 2010-09-27

请问-Dusethreads还是-Duseithreads 我查了下好像有中间有i。。。
5.8.9和5.8.0一样默认支持多线程吗。。

作者: wooder20000   发布时间: 2010-09-27