develooper Front page | perl.perl5.porters | Postings from March 2014

PathTools hates blib (was Re: smoke-me/nicholas/fake-pm_to_blib onVMS)

Thread Previous
Nicholas Clark
March 2, 2014 20:18
PathTools hates blib (was Re: smoke-me/nicholas/fake-pm_to_blib onVMS)
Message ID:
On Sat, Mar 01, 2014 at 07:12:28PM -0600, Craig A. Berry wrote:

> It works for me too as long as I'm not building with a directory with
> "blib" in its name.  The smoker that failed at PathTools built its
> @INC for miniperl like so:

> But the Makefile.PL for PathTools has this line at the top:
> BEGIN { @INC = grep {!/blib/} @INC }
> which wipes out all of the entries in @INC that have fake-pm_to_blib
> in the name:
> $ perl -"Ilib" -e "require 'lib/'; @INC = grep
> {!/blib/} @INC; print join qq/\n/, @INC;"
> /perl_root/lib/site_perl/VMS_IA64
> /perl_root/lib/site_perl
> /perl_root/lib/VMS_IA64/5_16_1
> /perl_root/lib
> .
> So that's probably a bug in PathTools that only got exercised because
> my smokes make directory names based on branch names and you happened
> to make a branch name with "blib" in it.

Yes, I see that on Unix if I build in a directory called X-blib-X

Running Makefile.PL in dist/PathTools
../../miniperl -I../../lib Makefile.PL INSTALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none PERL_CORE=1 LIBPERL_A=libperl.a LINKTYPE=dynamic
Can't locate ExtUtils/ in @INC (you may need to install the ExtUtils::MakeMaker module) (@INC contains: .) at Makefile.PL line 5.
BEGIN failed--compilation aborted at Makefile.PL line 5.
512 from dist/PathTools's Makefile.PL at line 508.
Warning: No Makefile!
make[1]: Entering directory `/home/nick/Perl/X-blib-X/dist/PathTools'
make[1]: *** No rule to make target `config'.  Stop.
make[1]: Leaving directory `/home/nick/Perl/X-blib-X/dist/PathTools'
make config PERL_CORE=1 LIBPERL_A=libperl.a LINKTYPE=dynamic failed, continuing anyway...
Making all in dist/PathTools
make all PERL_CORE=1 LIBPERL_A=libperl.a LINKTYPE=dynamic
make[1]: Entering directory `/home/nick/Perl/X-blib-X/dist/PathTools'
make[1]: *** No rule to make target `all'.  Stop.
make[1]: Leaving directory `/home/nick/Perl/X-blib-X/dist/PathTools'
Unsuccessful make(dist/PathTools): code=512 at line 561.
make: *** [lib/auto/Cwd/] Error 2

I'm pretty sure that it's a bug. The code seems to date back to (at least)
2004 - it's in the Makefile.PL for PathTools 3.00, which seems to be the
earliest version, but not in the Makefile.PL for the last Cwd or the
last File-Spec. I can't find that idiom anywhere else on CPAN.

I've pushed a commit to remove it on the branch
We'll see if I missed anything.

With that, I can build and all but 1 test pass:

$ ./perl t/harness -v ../cpan/ExtUtils-MakeMaker/t/testlib.t

#   Failed test 'No blib dirs yet in @INC'
#   at t/testlib.t line 21.
#          got: '2'
#     expected: '0'
not ok 1 - No blib dirs yet in @INC
ok 2 - use ExtUtils::testlib;

#   Failed test 'ExtUtils::testlib added two @INC dirs!'
#   at t/testlib.t line 26.
not ok 3 - ExtUtils::testlib added two @INC dirs!
#          got: '4'
#     expected: '2'
ok 4 -   and theyre absolute
# Looks like you failed 2 tests of 5.
ok 5 - @INC is not tainted
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/5 subtests 

Test Summary Report
../cpan/ExtUtils-MakeMaker/t/testlib.t (Wstat: 512 Tests: 5 Failed: 2)
  Failed tests:  1, 3
  Non-zero exit status: 2
Files=1, Tests=5,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.06 cusr  0.00 csys =  0.09 CPU)
Result: FAIL

I guess that I should be good and figure out where to file a bug report for

> And now for the really good part: build time decreased by 39%.


I've merged it to blead.

I wonder if the (regular) toolchain should be doing something like this.
It argues strongly that having metadata to say "it's simple", and a
programmatic (not just command line) interface to the build system might
be able to speed things up a lot.

Nicholas Clark

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About