neeraj has asked for the wisdom of the Perl Monks concerning the following question:

I have perl 5.8.5 installation on hpux11 box. It was installed by my sys admin. but whenever i run some code which use threds it gives the fooloowing errors:-
$ /usr/local/bin/perl closure closure line 6: This Perl hasn't been configured and built properly for the threads module to work. (The 'useithreads' configuration option hasn't been u +sed.) Having threads support requires all of Perl and all of the XS modules +in the Perl installation to be rebuilt, it is not just a question of addi +ng the threads module. (In other words, threaded and non-threaded Perls are binary incompatible.) If you want to the use the threads module, please contact the people who built your Perl. Cannot continue, aborting. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.3/PA-RIS +C2.0/threads.pm line 28. Compilation failed in require at closure line 6. BEGIN failed--compilation aborted at closure line 6.
My question is , how can i rebuild the perl with threading enabled. will i have to install everythng from the very beggining. Or is there some simple workaround. can someone of u outline the steps involved.
Rgds, Neeraj.

Replies are listed 'Best First'.
Re: Rebuilding perl with threads option
by eyepopslikeamosquito (Archbishop) on Nov 22, 2004 at 06:41 UTC

    You have to rebuild from sources. I did this yesterday on Linux and took all the default answers from Configure except I answered y to this question:

    Build a threading Perl? [n]

    In summary, (as described in Perl's INSTALL file) to build perl from sources:

    rm -f config.sh Policy.sh sh Configure make make test make install

    For the installation directory, I normally choose something under my home directory, so I don't interfere with anyone else and so I don't need root permissions.