安装perl多线程版本

安装perl多线程版本

安装perl多线程版本遇到问题:

1.在http://mirrors.develooper.com/hpux/downloads.html网址上下载了安装包perl-5.8.8-dor-11.11.sd.bz,
2.ftp到hp unix上,
3.用网页提供的工具bzip2-1.0.2-pa2.0解压成perl-5.8.8-dor-11.11.sd
4.安装:
  swinstall -s /home/ppnms/tools/perl-5.8.8-dor-11.11.sd perl
5.查看状态:perl -V

rp5470-/home/ppnms/tools> perl -V
Summary of my perl5 (revision 5 version 8 subversion 8 patch 27029) configuration:
  Platform:
    osname=hpux, osvers=11.11, archname=PA-RISC2.0
    uname='hp-ux r3 b.11.11 u 9000800 1909236376 unlimited-user license '
    config_args='-Dcc=gcc -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef

可见仍旧是不支持多线程的版本,请问,类似这样编译好的安装包,如何安装才能支持多线程呢?或者说这样的包本来就不支持多线程?请大哥们提供安装多线程perl环境的方法和包,谢谢.
据说包含多线程特性的perl性能没有不包含多线程的好, 除非你非要用到多线程
我不管,我就是要装多线程的啊.不管啦,谁教教我.
down load source code
use manual compile...
我在http://www.cpan.org/src/README.html下载了perl-5.8.8.tar.gz,
然后根据http://blog.chinaunix.net/u1/58547/showart_482092.html的安装步骤进行,
进行到:
3. 下面是配置 perl 源码
    ./Configure -des -Dprefix=/usr/local/perl -Dusethreads -Uinstalluserbinperl
时,屏幕打印错误如下:

I used the command:

        gcc -o try +O2 +Onolimit -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -L/usr/local/lib try.c -lnsl -lnm -lndbm -lmalloc -ldld -lm -lcrypt -lsec -lpthread -lc
         ./try

and I got the following output:

gcc: +O2: No such file or directory
gcc: +Onolimit: No such file or directory
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]  
Ok.  Stopping Configure.

似乎是+O2 +Onolimit 这两个参数有问题,请问如何解决呢?谢谢.


QUOTE:
原帖由 apile 于 2008-4-28 21:27 发表
down load source code
use manual compile...

我还是把安装过程中的所有日志都列在下面吧.希望有高手抽空帮我看看,先行谢过了.

/usr/local/perl>>./Configure -des -Dprefix=/usr/local/perl -Dusethreads -Uinstalluserbinperl
(I see you are using the Korn shell.  Some ksh's blow up on Configure,
mainly on older exotic systems.  If yours does, try the Bourne shell instead.)
First let's make sure your kit is complete.  Checking...
Locating common programs...
Checking compatibility between /usr/bin/echo and builtin echo (if any)...
Symbolic links are supported.
Checking how to test for symbolic links...
You can test for symbolic links with 'test -h'.
Good, your tr supports [:lower:] and [:upper:] to convert case.
Using [:upper:] and [:lower:] to convert case.
3b1             dcosx           hpux            mips            posix-bc        svr4   
aix             dec_osf         i386            mpc             powerux         svr5   
aix_3           dgux            interix         mpeix           qnx             ti1500   
aix_4           dos_djgpp       irix_4          ncr_tower       rhapsody        titanos   
altos486        dynix           irix_5          netbsd          sco             ultrix_4   
amigaos         dynixptx        irix_6          newsos4         sco_2_3_0       umips   
apollo          epix            irix_6_0        next_3          sco_2_3_1       unicos   
atheos          esix4           irix_6_1        next_3_0        sco_2_3_2       unicosmk   
aux_3           fps             isc             next_4          sco_2_3_3       unisysdynix   
beos            freebsd         isc_2           nonstopux       sco_2_3_4       utekv   
bsdos           genix           linux           openbsd         solaris_2       uts   
convexos        gnu             lynxos          opus            stellar         uwin   
cxux            gnukfreebsd     machten         os2             sunos_4_0       vmesa   
cygwin          gnuknetbsd      machten_2       os390           sunos_4_1       vos   
darwin          greenhills      mint            os400           super-ux   
Which of these apply, if any? [hpux]  
/usr/ccs/bin/cc:
        HP92453-01 A.11.01.21 HP C (Bundled) Compiler
         $   Sep  8 2000 23:13:51 $
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
Operating system name? [hpux]  
Operating system version? [11.11]  
Build Perl for SOCKS? [n]  
Use the PerlIO abstraction layer? [y]  
Build a threading Perl? [y]  
Use the newer interpreter-based ithreads? [y]  
Use which C compiler? [cc]  
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: "try.c", line 1: error 1705: Function prototypes are an ANSI feature.
Uh-oh, the C compiler 'cc' doesn't seem to be working.
You seem to have a working gcc, though.
Would you like to use it? [y]  
*** However, any setting of the C compiler flags (e.g. for thread support)
*** has been lost.  It may be necessary to pass -Dcc=gcc to Configure
*** (together with e.g. -Dusethreads).
Checking for GNU cc in disguise and/or its version number...
Now, how can we feed standard input to your C preprocessor...
Directories to use for library searches? [/usr/local/lib /lib /usr/lib /usr/ccs/lib]  
What is the file extension used for shared libraries? [sl]  
Try to use long doubles if available? [n]  
Checking for optional libraries...
What libraries to use? [-lnsl -lnm -lndbm -lmalloc -ldld -lm -lcrypt -lsec -lpthread -lc]  
What optimizer/debugger flag should be used? [+O2 +Onolimit]  
Any additional cc flags? [-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include]  
Let me guess what the preprocessor flags are...
Any additional ld flags (NOT including libraries)? [ -L/usr/local/lib]  
Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:
#include <stdio.h>
int main() { printf("Ok\n"); return(0); }
I used the command:
        gcc -o try +O2 +Onolimit -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -L/usr/local/lib try.c -lnsl -lnm -lndbm -lmalloc -ldld -lm -lcrypt -lsec -lpthread -lc
         ./try
and I got the following output:
gcc: +O2: No such file or directory
gcc: +Onolimit: No such file or directory
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]  
Ok.  Stopping Configure.
/usr/local/perl>>
刚刚注意到回显中有下面的提示:

*** However, any setting of the C compiler flags (e.g. for thread support)
*** has been lost.  It may be necessary to pass -Dcc=gcc to Configure
*** (together with e.g. -Dusethreads).

所以我将安装命令改成了:
./Configure -des -Dprefix=/usr/local/perl -Dusethreads -Uinstalluserbinperl -Dcc=gcc


运行成功:
Updating makefile...
Now you must run 'make'.

If you compile perl5 on a different machine or from a different object
directory, copy the Policy.sh file from this object directory to the
new one before you run Configure -- this will help you with most of
the policy defaults.