Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: App::perlbrew - Compiling Perl with thread support

by kcott (Abbot)
on Feb 15, 2012 at 21:10 UTC ( #954074=note: print w/ replies, xml ) Need Help??


in reply to Re: App::perlbrew - Compiling Perl with thread support
in thread App::perlbrew - Compiling Perl with thread support

Thanks for taking the time to respond.

I wrote "The steps I'm planning to follow are: ...". It looks like most, if not all, of your first paragraph is based on an assumption that I have completed (or at least attempted) these steps. I haven't performed any of the steps shown: the order of these steps and the details of any individual step may change based on responses to my post (in fact, thanks to your next point, one has changed already).

By the way, it's "-Dusethreads" (no "i").

Thanks for the correction. I've updated my post.

I found instances of useithreads in perlthrtut, perl -V output and Config.pm but I haven't seen usethreads anywhere. Could you point me to documentation where -D values are described?

By the way, I call my installs 5.14.2 and 5.14.2t. No need for the leading "perl-", no need for some long descriptor.

Thanks for the advice. The perl- prefix was based on usage throughout perlbrew. The suffixes are just a matter of personal preference.

-- Ken


Comment on Re^2: App::perlbrew - Compiling Perl with thread support
Select or Download Code
Re^3: App::perlbrew - Compiling Perl with thread support
by Anonymous Monk on Feb 15, 2012 at 21:33 UTC

      Thanks AM. Useful info.

      -- Ken

Re^3: App::perlbrew - Compiling Perl with thread support
by ikegami (Pope) on Feb 15, 2012 at 21:52 UTC

    It looks like most, if not all, of your first paragraph is based on an assumption that I have completed (or at least attempted) these steps.

    Oops yeah, thought you were listing the steps that lead to the "incorrect" output at the end. Aside from the "i" everything looks fine. (I've never created an alias before, so I'm just assuming there.)

    See the INSTALL file in the root directory of the Perl distribution for info on common configuration items. You can find the distributions on CPAN: perl. (The other monk gave a link to the very very latest version of the file, which might not be accurate for the version of Perl you are installing.)

    Some tweaks aren't documented, though. You'd only know it's even possible to change them by looking at the code itself, though. e.g. I use -DPERL_SUB_DEPTH_WARN=1000 to reduce the risk of warnings when dealing with deep trees.

    My perlbrew install wrapper:

    #!/usr/bin/env perl # install_perl 5.x.y # install_perl 5.x.yd Build with debug symbols (-g) # install_perl 5.x.yt Build with thread support # install_perl 5.x.ydt Build with debug symbols (-g) and thread supp +ort use strict; use warnings; ( my ($build) = @ARGV ) == 1 or die; my $ccache = $ENV{CCACHE} || ( `which ccache` ? 'ccache' + : '' ); my $perlbrew_root = $ENV{PERLBREW_ROOT} || "$ENV{HOME}/perl5/perlbrew" +; unlink("$perlbrew_root/build.log"); my $version = $build; my $threaded = $version =~ s/t\z//; my $debug = $version =~ s/d\z//; my @args; push @args, "-v"; push @args, $version; push @args, "--as=$build"; push @args, "-DPERL_SUB_DEPTH_WARN=1000"; push @args, "-Dcc=$ccache cc" if $ccache; push @args, "-Doptimize=-g" if $debug; push @args, "-Dusethreads" if $threaded; exec("perlbrew", "install", @args) or die $!;

    (ccache is probably of no benefit, but I got in the habit of using it when bisecting.)

      Thanks for the update.

      The INSTALL file on CPAN is also easier to read as a web link as it's in HTML format.

      I found some documentation for PERL_SUB_DEPTH_WARN in perldiag and perl5101delta. The default setting of 100 is fine for me; I can always use no warnings 'recursion'; on the rare occasions where I might exceed this.

      Thanks also for the script: I can see the rationale behind your naming convention.

      -- Ken

        I just learned that perlbrew use XXX will look for an install named perl-XXX if it doesn't find one named XXX, so omitting the leading perl- in the name isn't critical. (It's surely the same thing for perlbrew switch.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://954074]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2014-08-30 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls