Bug#606078: ExtUtils::MakeMaker: generated makefile can't cope with perl upgrade

Niko Tyni ntyni at debian.org
Tue Dec 7 09:29:53 UTC 2010


On Mon, Dec 06, 2010 at 02:41:07AM -0600, Jonathan Nieder wrote:
> Package: perl-modules
> Version: 5.10.1-16
> Tags: upstream
> 
> Upgraded perl to 5.12.2-2 today.  Works very well, generally;
> thanks!  But:

>  $ cd ~/src/git
>  $ make -j2
>      SUBDIR git-gui
>      SUBDIR gitk-git
>  make[1]: Nothing to be done for `all'.
>      SUBDIR perl
>  make[2]: *** No rule to make target `/usr/lib/perl/5.10/Config.pm', needed by `perl.mak'.  Stop.

I've seen this with other projects of course, and it also happened with
the 5.8 -> 5.10 transition. However, I never thought of it as a bug.

The generated Makefile might generally depend on some specifics of the
current Perl installation, and if they change the Makefile should be
invalidated too. Hence the dependency on Config.pm.

This does break the automatic Makefile updating when the perl installation
prefix changes, which for us only happens with major version upgrades.

I don't think that requiring the user to re-run 'perl Makefile.PL'
after a major Perl version upgrade is very onerous, but I can see it
may not be quite as obvious if it's only a part of a bigger build system.

>  $(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
> 	$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
> 	$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
> 	-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
> 	-$(NOECHO) $(MV)   $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
> 	- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
> 	$(PERLRUN) Makefile.PL "PREFIX=/home/jrn" "INSTALL_BASE="
> 	$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
> 	$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command.  <=="
> 	$(FALSE)
> 
> Ah.  Should be fixable by adding a dummy
> 
>  $(CONFIGDEP) : ;

Yeah, that probably works. However, EU::MM upstream needs to be very
careful about portability issues and the like. Looking at the FORCE
target, I suspect

$(CONFIGDEP) :
	$(NOECHO) $(NOOP)

is the right way to do this.

I'm generally not very enthusiastic about changing ExtUtils::MakeMaker;
getting things upstreamed properly needs more portability care and
testing than I'm comfortable with, and the Debian changes I've inherited
(debian/patches/debian/extutils_hacks.diff) don't help.

As I said I don't see this as a huge issue (and I think the severity
should possibly be just 'minor'). If you want to push this upstream
yourself, please make sure to test with a pristine ExtUtils::MakeMaker
version first.

See also
 http://cpansearch.perl.org/src/MSCHWERN/ExtUtils-MakeMaker-6.57_01/PATCHING

Thanks,
-- 
Niko Tyni   ntyni at debian.org






More information about the Perl-maintainers mailing list