Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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

by ikegami (Pope)
on Feb 15, 2012 at 21:52 UTC ( #954088=note: print w/replies, xml ) Need Help??

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

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 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.)

Replies are listed 'Best First'.
Re^4: App::perlbrew - Compiling Perl with thread support
by kcott (Chancellor) on Feb 16, 2012 at 00:52 UTC

    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.)

        I had a very brief look at the App::perlbrew code. The perl- prefix relates to CPAN URLs, e.g. I haven't dug any deeper than this but probably will do next week: there's still a few outstanding question marks.

        I've successfully compiled 5.14.2 with threads and tested my frequently used apps. I skipped the alias step: it isn't strictly necessary and I want to find out a bit more about it anyway (e.g. I still don't know what the -f option does).

        Thanks again for all your help with this.

        -- Ken

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://954088]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2018-06-22 08:07 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (122 votes). Check out past polls.