How / where to get a Perl that has threads?

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Mar 1 02:34:05 PST 2009


Oren Maurer wrote:
> Hello all.
> 
> As I'm new to this list - please forgive me for a newbie questions
> (but I promise to at least try to first Google and search this list
> archives).
> 
> In short:
> I have FreeBSD 7.1.
> 
> It seems to have Perl without threads . And I do need threads.
> How can I get it?

You have to re-install perl from ports and you have to select the config
option that says 'build a perl with threads'.  Note that if you're using
other applications that embed a perl interpreter (mod_perl, snmpd) they
may not work correctly with a threaded perl.  At minimum you'll have to
recompile them.  Similarly perl modules that use .xs to generate compiled
loadable objects may also need recompilation or may not work at all. 
Best to test this out thoroughly on a spare machine before you put it on
anything production.

    # cd /usr/ports/lang/perl5.8
    # make config
           Ensure the THREADS option is checked in the dialogue:
          [X] THREADS        Build threaded perl
    # portupgrade -f lang/perl5.8

To ensure *everything* is recompiled against the new threaded perl, you
can do:

    # portupgrade -fr lang/perl5.8

but be warned: that is basically going to recompile virtually every port
you've got installed which will take approximately forever and is really
overkill.  There's no reason to recompile ports whose only dependency on
perl is because they use automake at compile time.  Nor is there any reason
to reinstall pure-perl modules.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-perl/attachments/20090301/25118ebe/signature.pgp


More information about the freebsd-perl mailing list