A parallel make of the disttest target fails with MakeMaker.

For my empty distribution created with h2xs -n Moo

$ make -j2  disttest
rm -rf Moo-0.01
/home/nicholas/Sandpit/snap5.9.x-26488/bin/perl5.9.3 
"-MExtUtils::Manifest=manicopy,maniread"  -e "manicopy(maniread(),'Moo-0.01', 
'best');"
mkdir Moo-0.01
mkdir Moo-0.01/lib
mkdir Moo-0.01/t
mkdir Moo-0.01/fallback
Generating META.yml
cd Moo-0.01 && /home/nicholas/Sandpit/snap5.9.x-26488/bin/perl5.9.3 Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Moo
cd Moo-0.01 && make LIBPERL_A="libperl.a" LINKTYPE="dynamic" OPTIMIZE="-Os" 
PREFIX="/home/nicholas/Sandpit/snap5.9.x-26488" PASTHRU_DEFINE="" PASTHRU_INC=""
cd: can't cd to Moo-0.01
cd Moo-0.01 && make test LIBPERL_A="libperl.a" LINKTYPE="dynamic" 
OPTIMIZE="-Os" PREFIX="/home/nicholas/Sandpit/snap5.9.x-26488" 
PASTHRU_DEFINE="" PASTHRU_INC=""
cd: can't cd to Moo-0.01
*** Error code 2
1 error


(make disttest passes if I don't use -j)

The disttest target is:

disttest : distdir
        cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL 
        cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
        cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)

If I change those last two by adding 'pwd &&' at the start, I see:

pwd && cd Moo-0.01 && make LIBPERL_A="libperl.a" LINKTYPE="dynamic" 
OPTIMIZE="-Os" PREFIX="/home/nicholas/Sandpit/snap5.9.x-26488" 
PASTHRU_DEFINE="" PASTHRU_INC=""
/home/nicholas/Perl/Moo/Moo-0.01
cd: can't cd to Moo-0.01
pwd && cd Moo-0.01 && make test LIBPERL_A="libperl.a" LINKTYPE="dynamic" 
OPTIMIZE="-Os" PREFIX="/home/nicholas/Sandpit/snap5.9.x-26488" 
PASTHRU_DEFINE="" PASTHRU_INC=""
/home/nicholas/Perl/Moo/Moo-0.01
cd: can't cd to Moo-0.01


Which explains why it's failing, but not why a parallel make does this, nor
how to tweak things to stop it.

$ExtUtils::MakeMaker::VERSION is 6.30

This seems to be the only thing standing in the way of a 100% passing
parallel make on FreeBSD 6.0

Nicholas Clark

Reply via email to