Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 82548
Status: rejected
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: occitan [...] esperanto.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: MM_Any breaks makepp, trivial to fix
Hi, I've picked up my attempts to compile perl (5.16.2) with http:// makepp.sf.net, now that makepp is more gmake compatible than ever. Dave Mitchell asked me (https://rt.perl.org/rt3//Public/Bug/Display.html? id=116312) to report this you directly: Last year makepp was aligned with gmake, in that statements have a higher parsing priority than rules. (This made statements like 'perl { ... A::B ... }' no longer look like a rule and mysteriously disappear, so this change was rather useful.) But now the following snippet found in many generated makefiles is seen as a statement (makepp is strongly signature based, rather than relying only on timestamps), trying to specify an unknown signature method named ':': # --- MakeMaker signature section: signature : cpansign -s This comes from cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm:1445: which should be changed (equivalently, as far as make is concerned) to 'signature:' without the space, since statements can't have ':' in their name. What completely baffles me is FALSE. You repeatedly use it in 2 ways, in an echo action, where the return code is ignored via initial '-', so that's completely useless. And in the rules that remake FIRST_MAKEFILE, which you thus force to fail. I have no idea why this works with make, but of course makepp will not reload a Makefile that failed to build. I worked around that with 'export FALSE=:' but that can't be the solution... regards -- Daniel
Subject: Re: [rt.cpan.org #82548] MM_Any breaks makepp, trivial to fix
Date: Mon, 07 Jan 2013 16:23:42 -0800
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: "Michael G. Schwern" <schwern [...] pobox.com>
On 1/7/13 1:19 PM, Daniel Pfeiffer via RT wrote: Show quoted text
> I've picked up my attempts to compile perl (5.16.2) with http:// > makepp.sf.net, now that makepp is more gmake compatible than ever. Dave > Mitchell asked me (https://rt.perl.org/rt3//Public/Bug/Display.html? > id=116312) to report this you directly:
Good to hear! Show quoted text
> Last year makepp was aligned with gmake, in that statements have a higher > parsing priority than rules. (This made statements like 'perl { ... A::B ... > }' no longer look like a rule and mysteriously disappear, so this change was > rather useful.) But now the following snippet found in many generated > makefiles is seen as a statement (makepp is strongly signature based, rather > than relying only on timestamps), trying to specify an unknown signature > method named ':': > # --- MakeMaker signature section: > signature : > cpansign -s > > This comes from cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm:1445: which > should be changed (equivalently, as far as make is concerned) to > 'signature:' without the space, since statements can't have ':' in their > name.
First thing you should know is I'm not a make expert, but I have come to learn what's portable and what isn't. I've also come to learn that nothing is simple. Unfortunately some make variants on VMS need that space. Just about every target in MakeMaker was normalized to be "target :". Every make variant MakeMaker supports (BSD, Solaris, GNU, MMK, nmake, dmake) works fine with that space, so I'd need so see some solid evidence otherwise. In fact, the GNU make docs explicitly use "target :". https://www.gnu.org/software/make/manual/make.html#Rule-Syntax Here's an example. https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/8d4c9962adb0142bfed60c6b5569c8424637df16 And another. https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/b255f0d39844ea5c6e105ba21921f67eb0ce737d Here's another fun VMS exception. https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/85e69d3d74e3307b2b73d913b5bc424860efac8a If you want to change that, you'd have to hammer that out with Craig Berry. Personally, I find it absurd that there might be a syntactic difference between "target:" and "target :". You may wish to consider dropping that distinction or bringing it in line with what everything else does. Reading the makepp docs <http://makepp.sourceforge.net/2.1/makepp_statements.html#signature_name> "A statement is any line beginning with a word which does not have a : in it." A simple, and much safer, fix would be to make an exception for whitespace between the word and the colon. "A statement is any line beginning with a word which does not have a : following it." I'd say you've found a bug/incompatibility in makepp's make extension syntax. I'd rather see it fixed in makepp than play whack-a-mole with whatever future collisions we have between make targets and makepp keywords. I'd patch the signature target to support existing versions of makepp, but that might play havoc with MMK. Show quoted text
> What completely baffles me is FALSE. You repeatedly use it in 2 ways, in an > echo action, where the return code is ignored via initial '-', so that's > completely useless.
Those all predate my involvement. I've found that most everything in MakeMaker has (or had) a reason, and changing it without understanding that reason leads to bizarre errors. I have to dig back into the perl 5 repo to figure out why they're there, but my research shows they're not useless. This illustrates the difference between "-cmd" and "-cmd; false". $ cat Makefile echo_bare : @echo "Foo"; echo_ignore : @-echo "Foo"; echo_false : @echo "Foo"; false; echo_ignore_false : @-echo "Foo"; false; $ make echo_bare Foo $ make echo_ignore Foo $ make echo_false Foo make: *** [echo_false] Error 1 $ make echo_ignore_false Foo make: [echo_ignore_false] Error 1 (ignored) Note that even though the error is ignored, the error is still produced. I guess somebody thought that was important. It appears to have been introduced here. http://perl5.git.perl.org/perl.git/commit/75f926282bd78abe2f394977be7dd4dc52cb21ba There may be more information about it in the MakeMaker historical branch between version 3.8 and 4.01. Either way, it probably doesn't matter. Also the whole handling of the config.h dependency is in need of an overhaul and is causing headaches. Show quoted text
> And in the rules that remake FIRST_MAKEFILE, which you thus force > to fail. I have no idea why this works with make, but of course > makepp will not reload a Makefile that failed to build. I worked
around that with 'export FALSE=:' but that can't be Show quoted text
> the solution...
That target is supposed to fail and stop. Then you manually re-run make. This feature predates me, but I presume it is there because MakeMaker does not run Makefile.PL with any arguments and so probably got it wrong. If makepp is remembering that the build of the Makefile failed between runs, this is an interesting feature but it is different from how every other make we support does it.
Subject: Re: [rt.cpan.org #82548] MM_Any breaks makepp, trivial to fix
Date: Mon, 07 Jan 2013 17:11:08 -0800
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: "Michael G. Schwern" <schwern [...] pobox.com>
In case it wasn't clear in all that detail, I'm happy to work with you on getting MakeMaker and makepp working together.
CC: occitan [...] esperanto.org
Subject: Re: [rt.cpan.org #82548] MM_Any breaks makepp, trivial to fix
Date: Tue, 08 Jan 2013 22:37:13 +0100
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Daniel Pfeiffer <occitan [...] t-online.de>
la 2013-01-08 01:23 Michael G Schwern via RT skribis: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=82548 > > > On 1/7/13 1:19 PM, Daniel Pfeiffer via RT wrote:
>> I've picked up my attempts to compile perl (5.16.2) with http:// >> makepp.sf.net, now that makepp is more gmake compatible than ever. Dave >> Mitchell asked me (https://rt.perl.org/rt3//Public/Bug/Display.html? >> id=116312) to report this you directly:
> Good to hear!
:-) Show quoted text
>> Last year makepp was aligned with gmake, in that statements have a higher >> parsing priority than rules. (This made statements like 'perl { ... A::B ... >> }' no longer look like a rule and mysteriously disappear, so this change was >> rather useful.) But now the following snippet found in many generated >> makefiles is seen as a statement (makepp is strongly signature based, rather >> than relying only on timestamps), trying to specify an unknown signature >> method named ':': >> # --- MakeMaker signature section: >> signature : >> cpansign -s >> >> This comes from cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm:1445: which >> should be changed (equivalently, as far as make is concerned) to >> 'signature:' without the space, since statements can't have ':' in their >> name.
> First thing you should know is I'm not a make expert, but I have come to > learn what's portable and what isn't. I've also come to learn that > nothing is simple. > > Unfortunately some make variants on VMS need that space.
The Perl Makefile.SH produces rules without this space, so it can't be so important. Show quoted text
> Just about > every target in MakeMaker was normalized to be "target :". Every make > variant MakeMaker supports (BSD, Solaris, GNU, MMK, nmake, dmake) works > fine with that space, so I'd need so see some solid evidence otherwise. > In fact, the GNU make docs explicitly use "target :".
In gmake this is a target with no dependencies: include: while this is a statement with an argument of ':': include : Makepp follows the same logic, only that it has many more statements than gmake. (And you can even define your own as a Perl function...) Show quoted text
> Personally, I find it absurd that there might be a syntactic difference > between "target:" and "target :". You may wish to consider dropping > that distinction or bringing it in line with what everything else does. > > Reading the makepp docs > <http://makepp.sourceforge.net/2.1/makepp_statements.html#signature_name> "A > statement is any line beginning with a word which does not have a : in > it." A simple, and much safer, fix would be to make an exception for > whitespace between the word and the colon. "A statement is any line > beginning with a word which does not have a : following it."
Thanks for spotting that inconsistency! Actually this lead to lots of headaches with statements like 'perl { ... A::B ... }' disappearing mysteriously. They were being seen as a rule (which was of course useless and getting silently ignored like any unneeded rule). There were other headaches, which made me align this with what I wrote above for gmake. Show quoted text
> I'd say you've found a bug/incompatibility in makepp's make extension > syntax. I'd rather see it fixed in makepp than play whack-a-mole with > whatever future collisions we have between make targets and makepp > keywords. I'd patch the signature target to support existing versions > of makepp, but that might play havoc with MMK.
If it really does matter, I suggest this work-around: ifdef MAKEPP_VERSION signature: else signature : endif Show quoted text
>> What completely baffles me is FALSE. You repeatedly use it in 2 ways, in an >> echo action, where the return code is ignored via initial '-', so that's >> completely useless.
> This illustrates the difference between "-cmd" and "-cmd; false". > > echo_ignore_false : > @-echo "Foo"; false; > > $ make echo_ignore_false > Foo > make: [echo_ignore_false] Error 1 (ignored)
Ok, fine, you get a warning... Anyway, this one only struck me as being useless, it works fine in makepp so I don't care. Show quoted text
>> And in the rules that remake FIRST_MAKEFILE, which you thus force >> to fail. I have no idea why this works with make, but of course >> makepp will not reload a Makefile that failed to build. I worked
> around that with 'export FALSE=:' but that can't be
>> the solution...
> That target is supposed to fail and stop. Then you manually re-run > make. This feature predates me, but I presume it is there because > MakeMaker does not run Makefile.PL with any arguments and so probably > got it wrong.
If it was originally wrong, it should be rebuilt in any make (though other makes ignore most dependencies, except explicit ones after the colon). And if it's rebuilt, why not use it immediately? Failing looks nasty and makes the user uncertain he's on the right track. Show quoted text
> If makepp is remembering that the build of the Makefile failed between > runs, this is an interesting feature but it is different from how every > other make we support does it.
That is probably so, because makepp is the only make that promises reliability. It achieves that by remembering everything about the targets it produces, and rebuilding them if any kind of dependency (including the architecture it built on, the command string and the executables it calls) changes. Therefore it will never include a file it knows to be broken, unless you force it to via --dont-build. And that's an option for bad tricks, not for a normal build. coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / lär dig / ucz się Esperanto: http://lernu.net / http://ikurso.net
Subject: Re: [rt.cpan.org #82548] MM_Any breaks makepp, trivial to fix
Date: Tue, 08 Jan 2013 15:15:09 -0800
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: "Michael G. Schwern" <schwern [...] pobox.com>
On 1/8/13 1:37 PM, Daniel Pfeiffer via RT wrote: Show quoted text
>> Unfortunately some make variants on VMS need that space.
> > The Perl Makefile.SH produces rules without this space, so it can't be so > important.
I don't believe VMS uses that. It has its own build system in vms/. I've personally patched a lot of MakeMaker to work on VMS and I trust Craig Berry's bug reports and patches. VMS is different. Show quoted text
>> Just about >> every target in MakeMaker was normalized to be "target :". Every make >> variant MakeMaker supports (BSD, Solaris, GNU, MMK, nmake, dmake) works >> fine with that space, so I'd need so see some solid evidence otherwise. >> In fact, the GNU make docs explicitly use "target :".
> > In gmake this is a target with no dependencies: > > include: > > while this is a statement with an argument of ':': > > include :
That seems academic, they both behave like a target with no dependencies in every make I have. And I have a lot. The GNU make docs are not canonical, but they're one of the better references. I've looked through the GNU make docs and don't see a clear definition of what a "statement" is and I can't find anything saying the space is significant. I'd need a citation to back your statement. The GNU docs are not careful about "target:" vs "target :" which you'd think they would be if they meant different things. Here's an example from https://www.gnu.org/software/make/manual/make.html#Simple-Makefile clean : rm edit main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o And here's them doing it without the space. https://www.gnu.org/software/make/manual/make.html#Phony-Targets clean: rm *.o temp And later in the same section, with the space. cleanobj : rm *.o cleandiff : rm *.diff Practically, its a very, very fine point which I doubt very few people, or make implementations, understand. While this is genuinely interesting to dig into make syntax details, its academic unless the VMS issue is addressed. And that cannot be wished away. Show quoted text
>> I'd say you've found a bug/incompatibility in makepp's make extension >> syntax. I'd rather see it fixed in makepp than play whack-a-mole with >> whatever future collisions we have between make targets and makepp >> keywords. I'd patch the signature target to support existing versions >> of makepp, but that might play havoc with MMK.
> > If it really does matter, I suggest this work-around: > > ifdef MAKEPP_VERSION > signature: > else > signature : > endif
It really does matter. We strive to support every environment and build system Perl supports. There's two issues with that work around. First, it leaves us playing whack-a-mole with future conflicts between MakeMaker targets and makepp keywords. This is mitigated if I know makepp will change its parsing to not treat "target :" as an empty statement. Second, and this is the hard requirement, ifdef is not portable. $ cat Makefile ifdef MAKEPP_VERSION signature: echo "Without space" else signature : echo "With space" endif $ bsdmake "Makefile", line 1: Need an operator "Makefile", line 4: Need an operator "Makefile", line 6: warning: duplicate script for target "signature" ignored "Makefile", line 7: Need an operator bsdmake: fatal errors encountered -- cannot continue The best we could do is guess what your make is while building the Makefile and write custom code. This is done from $Config{make} and $ENV{MAKE} but they are not very reliable (more on that in the next discussion). I like to avoid this as much as possible, both to avoid maintaining duplicate code and because it often guesses wrong, but its doable. Show quoted text
>>> And in the rules that remake FIRST_MAKEFILE, which you thus force >>> to fail. I have no idea why this works with make, but of course >>> makepp will not reload a Makefile that failed to build. I worked
>> around that with 'export FALSE=:' but that can't be
>>> the solution...
>> That target is supposed to fail and stop. Then you manually re-run >> make. This feature predates me, but I presume it is there because >> MakeMaker does not run Makefile.PL with any arguments and so probably >> got it wrong.
> > If it was originally wrong, it should be rebuilt in any make (though other > makes ignore most dependencies, except explicit ones after the colon). And if > it's rebuilt, why not use it immediately? Failing looks nasty and makes the > user uncertain he's on the right track.
I was incorrect, the Makefile will be rewritten using the correct Makefile.PL arguments. So it will be the correct Makefile and can probably be immediately used. As for why not use it immediately? That's a good question. I used to wonder it myself. Maybe that can be changed. I suspect the historical reason was because its difficult to portably determine what the correct way to invoke make is. Not everything defines MAKE, make isn't always in the PATH and it doesn't always contain a full path. We do our best to make up for that now by always defining MAKE, see ExtUtils::MM_Any->init_MAKE, but that has its own problems. Its consistent, but it can't predict what make you're really using. So it might answer with "MAKE = make" and blow over makepp's default MAKE. It doesn't know it shouldn't do that. If MAKE can be made more reliable then this, and a lot of other problems, go away. But the catch 22 where Makefile.PL doesn't know what make you're going to be using is a tough one. Show quoted text
>> If makepp is remembering that the build of the Makefile failed between >> runs, this is an interesting feature but it is different from how every >> other make we support does it.
> > That is probably so, because makepp is the only make that promises > reliability. It achieves that by remembering everything about the targets it > produces, and rebuilding them if any kind of dependency (including the > architecture it built on, the command string and the executables it calls) > changes. Therefore it will never include a file it knows to be broken, unless > you force it to via --dont-build. And that's an option for bad tricks, not > for a normal build.
As far as MakeMaker is concerned, portability is more important. Can "signature" be used to make it rely just on timestamps?
As I noted on p5p an hour ago, the following form ... nul= ${nul} signature : cpansign -s ... seems to work (and imply a target, not a statement) on both GNU make and makepp. No idea about other makes, sorry. (Of course, if it works, you may want to name that variable something more satisfying. ${placatemakepp} comes to mind ...)
Subject: Re: [rt.cpan.org #82548] MM_Any breaks makepp, trivial to fix
Date: Wed, 09 Jan 2013 22:57:37 +0100
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Daniel Pfeiffer <occitan [...] t-online.de>
la 2013-01-09 01:10 Eirik Berg Hanssen via RT skribis: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=82548 > > > As I noted on p5p an hour ago, the following form ... > > nul= > > ${nul} signature : > cpansign -s > > ... seems to work (and imply a target, not a statement) on both GNU make > and makepp. No idea about other makes, sorry. > > (Of course, if it works, you may want to name that variable something > more satisfying. ${placatemakepp} comes to mind ...) >
An alternative, up to you to decide which youprefer, would be signature=signature ${signature} : cpansign -s coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / lär dig / ucz się Esperanto: http://lernu.net / http://ikurso.net
Subject: Re: [rt.cpan.org #82548] MM_Any breaks makepp, trivial to fix
Date: Sun, 10 Mar 2013 09:14:01 +0100
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Daniel Pfeiffer <occitan [...] t-online.de>
According to meta::cpan this source is unchanged as of Dec 17, 2012, so nothing seems to have happened. Shall I submit a patch, and if so which of the last two solutions would you prefer? And would you rather have a comment before the assignment, or a variable name of placatemakepp or both? I guess it would take you as long to just do it yourself, as it would to answer my questions ;-) regards -- Daniel
Subject: Re: [rt.cpan.org #82548] AutoReply: MM_Any breaks makepp, trivial to fix
Date: Sun, 10 Mar 2013 12:05:34 +0100
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Daniel Pfeiffer <occitan [...] t-online.de>
A 3rd solution which works at least in gmake, Sun Solaris make, IBM AIX make and makepp is an empty substitution: $()signature : coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / lär dig / ucz się Esperanto: http://lernu.net / http://ikurso.net
I claim this is obsolete since it's a makepp problem which ought to be fixed in makepp, not EUMM.
Closing.