While writing Data::Postponed, I discovered that Test::Harness runs everything with the environment variable PERL_DL_NONLAZY=1 and that B will not load on 5.005.04 (and I assume other < 5.6.x) when that is set. It seems like I have to edit my Makefile to remove the references to PERL_DL_NONLAZY. This seems like a terrible hack on my part and I'd like to know what I have to do in order that B may be loaded with this variable set. I'd also like to know what I have to do to avoid editing my Makefile or would like some advice on a better way to edit it than this brute force approach.

My Makefile.PL work around and notes on the "bug".

if ( $] <= 5.6 ) { # I observed that 5.005.04 couldn't load B while PERL_DL_NONLAZY # was turned on. This is the default from Test::Harness. Since # this would normally cause all the tests to fail, I'm manually # editing the Makefile to remove the flag. # PERL_DL_NONLAZY=1 perl -MB -e1 # Can't load # '/home/josh/perl5.005_04/lib/5.00504/i686-linux/auto/B/B.so' for # module B: # /home/josh/perl5.005_04/lib/5.00504/i686-linux/auto/B/B.so: # undefined symbol: Perl_byterun at # /home/josh/perl5.005_04/lib/5.00504/i686-linux/DynaLoader.pm # line 169. # at -e line 0 # BEGIN failed--compilation aborted. open MAKE, "< Makefile" or die "Couldn't open Makefile for reading +: $!"; @make = <MAKE>; close MAKE or die "Couldn't close Makefile after reading: $!"; s/PERL_DL_NONLAZY=1// for @make; open MAKE, "> Makefile" or die "Couldn't open Makefile for writing +: $!"; print MAKE @make or die "Couldn't write to Makefile: $!";; close MAKE or die "Couldn't close Makefile and flush buffer: $!"; }

In reply to How to avoid having to remove PERL_DL_NONLAZY=1 from Makefile? by diotalevi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.