diotalevi has asked for the wisdom of the Perl Monks concerning the following question:
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: $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to avoid having to remove PERL_DL_NONLAZY=1 from Makefile?
by tlm (Prior) on Mar 31, 2005 at 14:52 UTC | |
by diotalevi (Canon) on Mar 31, 2005 at 20:01 UTC | |
by tlm (Prior) on Mar 31, 2005 at 22:11 UTC | |
by diotalevi (Canon) on Mar 31, 2005 at 22:16 UTC | |
by tlm (Prior) on Mar 31, 2005 at 22:34 UTC |