Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
Michael G Schwern [EMAIL PROTECTED] wrote on 09/19/2005 08:15:51 PM: On Sun, Sep 18, 2005 at 11:52:20PM -0400, John E. Malmberg wrote: As there is no false command on VMS, this is causing rerunning a make to fail. Would adding the following line before the return $m be the fix for this? Or is something else needed to make sure only the last line is removed? $m =~ s/false\n// if $IsVMS; I see a number of uses of false in MM_Unix. Rather than throw in more VMS exceptions (blech) I'll make a $(FALSE) which can be something safe like perl -e 'exit 1' On VMS the construct shown is true since exit 1 is the way to say exit 0. I note the following behavior from the shell on Solaris 10: /home/user/pprymmer false /home/user/pprymmer echo $? 255 Hence you may want to use something like 44 on VMS (noting that a message will be generated): $ perl -e exit 44 %SYSTEM-F-ABORT, abort the non portability of exit values is discussed in perlport.pod. Peter Prymmer
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
Peter Prymmer wrote: Michael G Schwern [EMAIL PROTECTED] wrote on 09/19/2005 08:15:51 PM: On Sun, Sep 18, 2005 at 11:52:20PM -0400, John E. Malmberg wrote: As there is no false command on VMS, this is causing rerunning a make to fail. I see a number of uses of false in MM_Unix. Rather than throw in more VMS exceptions (blech) I'll make a $(FALSE) which can be something safe like perl -e 'exit 1' On VMS the construct shown is true since exit 1 is the way to say exit 0. I note the following behavior from the shell on Solaris 10: /home/user/pprymmer false /home/user/pprymmer echo $? 255 Hence you may want to use something like 44 on VMS (noting that a message will be generated): $ perl -e exit 44 %SYSTEM-F-ABORT, abort the non portability of exit values is discussed in perlport.pod. A VMS exit 44 will also cause MMS/MMK by default to abort the makefile with MMS/MMK also exiting with an error. If you want a VMS exit code that UNIX programs should interpret as an EXIT 1, then the following (mostly undocumented) hack will work. VMS status code = %x35a000 + (UNIX status * 8), and if this is a success status, add 1, otherwise VMS will interpret it as a warning. EAGLE exit %x35A000 + (1 * 8) + 1 EAGLE x = %x35A000 + (1 * 8) + 1 EAGLE show sym x X = 3514377 Hex = 0035A009 Octal = 00015320011 As of blead-perl, Perl is now automatically translating this code to the expected internal UNIXish status correctly. I think I will have to look at perlport.pod to make sure it is current. I suspect it is not. -John [EMAIL PROTECTED] Personal Opinion Only
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
On Tue, Sep 20, 2005 at 07:15:41AM -0400, Peter Prymmer wrote: perl -e 'exit 1' On VMS the construct shown is true since exit 1 is the way to say exit 0. I thought this only happens with use vmsish 'exit' on. I note the following behavior from the shell on Solaris 10: /home/user/pprymmer false /home/user/pprymmer echo $? 255 Solaris is Weird. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Don't try the paranormal until you know what's normal. -- Lords and Ladies by Terry Prachett
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
On Tue, Sep 20, 2005 at 08:09:56AM -0400, John E. Malmberg wrote: A VMS exit 44 will also cause MMS/MMK by default to abort the makefile with MMS/MMK also exiting with an error. I believe this is the desired behavior. If you want a VMS exit code that UNIX programs should interpret as an EXIT 1, then the following (mostly undocumented) hack will work. VMS status code = %x35a000 + (UNIX status * 8), and if this is a success status, add 1, otherwise VMS will interpret it as a warning. EAGLE exit %x35A000 + (1 * 8) + 1 EAGLE x = %x35A000 + (1 * 8) + 1 EAGLE show sym x X = 3514377 Hex = 0035A009 Octal = 00015320011 I have no idea what any of this means. Anyhow, I don't need to wedge together a single command line for both VMS and Unix. Its easy to have different commands for each. Unless you're talking about that wacky VMS with Unix semantics thing again. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern ...they shared one last kiss that left a bitter yet sweet taste in her mouth--kind of like throwing up after eating a junior mint. -- Dishonorable Mention, 2005 Bulwer-Lytton Fiction Contest by Tami Farmer
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
Michael G Schwern [EMAIL PROTECTED] wrote on 09/20/2005 01:12:51 PM: On Tue, Sep 20, 2005 at 07:15:41AM -0400, Peter Prymmer wrote: perl -e 'exit 1' On VMS the construct shown is true since exit 1 is the way to say exit 0. I thought this only happens with use vmsish 'exit' on. Oh yes. I am sorry. Cperl -e 'exit 1' on Unix and Cperl -e exit 1 on VMS may give you what you want (below I'll ask why you want it). I note the following behavior from the shell on Solaris 10: /home/user/pprymmer false /home/user/pprymmer echo $? 255 Solaris is Weird. Indeed. By the way, why is `false` desirable to have in a Makefile? Why does MakeMaker need to know how to do it? Thanks. Peter Prymmer
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
Michael G Schwern wrote: On Tue, Sep 20, 2005 at 08:09:56AM -0400, John E. Malmberg wrote: A VMS exit 44 will also cause MMS/MMK by default to abort the makefile with MMS/MMK also exiting with an error. I believe this is the desired behavior. I think I should test that out tonight by aliasing the false command to signal a 44 status and see what happens. Somehow I have a feeling that it will cause the entire cleanup operation to be aborted before it completes as the failure code gets signaled back through to the parent processes. Exit codes on VMS are signals, not just status conditions, and they can have side effects unless they are trapped or suppressed by the shell. Having the false command signal a SUCCESS status seems to be working in that the REALCLEAN target works. I have not tried the DISTCLEAN target. If you want a VMS exit code that UNIX programs should interpret as an EXIT 1, then the following (mostly undocumented) hack will work. VMS status code = %x35a000 + (UNIX status * 8), and if this is a success status, add 1, otherwise VMS will interpret it as a warning. EAGLE exit %x35A000 + (1 * 8) + 1 EAGLE x = %x35A000 + (1 * 8) + 1 EAGLE show sym x X = 3514377 Hex = 0035A009 Octal = 00015320011 I have no idea what any of this means. Neither would most VMS programmers, which is why their programs written in C sometimes have random weird side effects. Most of the time they get away with it, and many times the error handling in the DCL shell must be suppressed while those programs are running. The above is a bit ugly. And it is not properly documented either, which is why I probably need to look at what perlport.pod is saying about VMS exit values. Back when the C language was added to VMS, there were a few things that were mis-understood about mapping UNIX concepts to VMS concepts, and this is an example of one of them. -John [EMAIL PROTECTED] Personal Opinion Only
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
On Tue, Sep 20, 2005 at 02:02:24PM -0400, Peter Prymmer wrote: By the way, why is `false` desirable to have in a Makefile? Why does MakeMaker need to know how to do it? It appears it wants to make sure certain targets fail when the commands themselves don't necessarily exit with non-zero. Its the make equivalent of return 0. There's only three occurances of this. One is specific to OS/2. One is in MM_Unix-perldepend which appears to be unused. Only this one is actually used in day-to-day Makefiles but it only happens if the Makefile.PL is newer than the Makefile, so its not critical code. # --- MakeMaker makefile section: # We take a very conservative approach here, but it's worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. $(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 $(NOECHO) $(ECHO) == Your Makefile has been rebuilt. == $(NOECHO) $(ECHO) == Please rerun the $(MAKE) command. == false -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Insulting our readers is part of our business model. http://somethingpositive.net/sp07122005.shtml
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
On Tue, Sep 20, 2005 at 02:02:31PM -0700, Michael G Schwern wrote: One is in MM_Unix-perldepend which appears to be unused. I lied, its not unused. Its used when building perl and XS modules so that's probably important. But it only happens when config.h is out of date. And VMS has its own version which doesn't use false. However, MakeMaker using false is not new so I don't know why this is only now an issue. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Ahh email, my old friend. Do you know that revenge is a dish that is best served cold? And it is very cold on the Internet!
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
Michael G Schwern [EMAIL PROTECTED] wrote on 09/20/2005 05:02:31 PM in reply to my question: Why does MakeMaker need to know how to do it? Only this one is actually used in day-to-day Makefiles but it only happens if the Makefile.PL is newer than the Makefile, so its not critical code. # --- MakeMaker makefile section: # We take a very conservative approach here, but it's worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. $(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 $(NOECHO) $(ECHO) == Your Makefile has been rebuilt. == $(NOECHO) $(ECHO) == Please rerun the $(MAKE) command. == false OK then replacing that last line with: $(PERLRUN) -e exit 1 might do the trick for most unixes (I presume MacOS X) and VMS. I am not too sure about dmake or nmake on Windows (and cannot easily test it out here). I guess the docs recommend editing a Makefile.PL to solve problems, hence the dependency problem obtains even for folks who are not CPAN developers. BTW a descrip.mms generated by 6.17 has no command at that spot. If I run the moral eqivalent of the following: $ mmk $ (the return to the shell prompt indicates this directory is already built) $ touch makefile.pl $ mmk $ mmk Descrip.MMS out-of-date with respect to MAKEFILE.PL,PERL_ROOT:[LIB.VMS_AXP.5_8_1]CONFIG.PM,PERL_ROOT:[LIB.VMS_AXP.5_8_1.CORE]CONFIG.H Cleaning current config before rebuilding Descrip.MMS ... Rename/NoConfirm Descrip.MMS Descrip.MMS_old MMK /Descrip=Descrip.MMS_old clean MCR $dka300:[perl.perl-5_8_1_root]perl.exe -MExtUtils::Command -e rm_f *.Map *.Dmp *.Lis *.cpp *.exe *.obj *.olb *.Opt XPath.bso .MM_Tmp MCR $dka300:[perl.perl-5_8_1_root]perl.exe -MExtUtils::Command -e rm_rf pm_to_blib blib [.blib.arch.auto.XML.XPath]extralibs.all perlmain.c MCR $dka300:[perl.perl-5_8_1_root]perl.exe -MExtUtils::Command -e rm_rf pm_to_blib.ts Makeaperl.MMS [.blib.arch.auto.XML.XPath]extralibs.ld MCR $dka300:[perl.perl-5_8_1_root]perl.exe Makefile.PL Checking if your kit is complete... Looks good Writing Descrip.MMS for XML::XPath Descrip.MMS has been rebuilt. Please run MMK to build the extension. cp [.xpath]step.pm [.blib.lib.xml.xpath]step.pm cp [.xpath.node]attribute.pm [.blib.lib.xml.xpath.node]attribute.pm cp [.xpath]parser.pm [.blib.lib.xml.xpath]parser.pm cp [.xpath.node]element.pm [.blib.lib.xml.xpath.node]element.pm cp [.xpath]node.pm [.blib.lib.xml.xpath]node.pm cp [.xpath]variable.pm [.blib.lib.xml.xpath]variable.pm cp [.xpath]number.pm [.blib.lib.xml.xpath]number.pm cp [.xpath]perlsax.pm [.blib.lib.xml.xpath]perlsax.pm cp [.xpath]root.pm [.blib.lib.xml.xpath]root.pm cp [.xpath.node]namespace.pm [.blib.lib.xml.xpath.node]namespace.pm cp [.xpath]locationpath.pm [.blib.lib.xml.xpath]locationpath.pm cp [.xpath.node]pi.pm [.blib.lib.xml.xpath.node]pi.pm cp [.xpath]literal.pm [.blib.lib.xml.xpath]literal.pm cp [.xpath]builder.pm [.blib.lib.xml.xpath]builder.pm cp [.xpath.node]text.pm [.blib.lib.xml.xpath.node]text.pm cp [.xpath.node]comment.pm [.blib.lib.xml.xpath.node]comment.pm cp xpath.pm [.blib.lib.xml]xpath.pm cp [.xpath]boolean.pm [.blib.lib.xml.xpath]boolean.pm cp [.xpath]function.pm [.blib.lib.xml.xpath]function.pm cp [.xpath]expr.pm [.blib.lib.xml.xpath]expr.pm cp [.xpath]xmlparser.pm [.blib.lib.xml.xpath]xmlparser.pm cp [.xpath]nodeset.pm [.blib.lib.xml.xpath]nodeset.pm Copy/NoConfirm [.examples]xpath [.blib.script]xpath %COPY-S-COPIED, USER:[PPRYMMER.CPAN_MODULES.XML-XPATH-1_13.EXAMPLES]XPATH.;1 copied to USER:[PPRYMMER.CPAN_MODULES.XML-XPATH-1_13.BLIB.SCRIPT]XPATH.;1 (3 blocks) $ So it is falling through to the default all (build) target and running executing that section. It did not error out back to DCL with the admonishment to rerun MMK. By the way, touch is not a native VMS/DCL shell command. If I change the makefile section to have the C\t$(PERLRUN) -e exit 1 final command I see the following after I touch makefile.pl: $ mmk Descrip.MMS out-of-date with respect to MAKEFILE.PL,PERL_ROOT:[LIB.VMS_AXP.5_8_1]CONFIG.PM,PERL_ROOT:[LIB.VMS_AXP.5_8_1.CORE]CONFIG.H Cleaning current config before rebuilding Descrip.MMS ... Rename/NoConfirm Descrip.MMS Descrip.MMS_old MMK /Descrip=Descrip.MMS_old clean MCR $dka300:[perl.perl-5_8_1_root]perl.exe -MExtUtils::Command -e rm_f *.Map *.Dmp *.Lis *.cpp *.exe *.obj *.olb *.Opt XPath.bso .MM_Tmp MCR $dka300:[perl.perl-5_8_1_root]perl.exe -MExtUtils::Command -e rm_rf pm_to_blib [.blib.arch.auto.XML.XPath]extralibs.ld pm_to_blib.ts perlmain.c blib MCR $dka300:[perl.perl-5_8_1_root]perl.exe -MExtUtils::Command -e rm_rf [.blib.arch.auto.XML.XPath]extralibs.all Makeaperl.MMS MCR
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
Michael G Schwern wrote: On Tue, Sep 20, 2005 at 02:02:24PM -0400, Peter Prymmer wrote: By the way, why is `false` desirable to have in a Makefile? Why does MakeMaker need to know how to do it? It appears it wants to make sure certain targets fail when the commands themselves don't necessarily exit with non-zero. Its the make equivalent of return 0. There's only three occurances of this. One is specific to OS/2. One is in MM_Unix-perldepend which appears to be unused. Only this one is actually used in day-to-day Makefiles but it only happens if the Makefile.PL is newer than the Makefile, so its not critical code. # --- MakeMaker makefile section: # We take a very conservative approach here, but it's worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. $(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 $(NOECHO) $(ECHO) == Your Makefile has been rebuilt. == $(NOECHO) $(ECHO) == Please rerun the $(MAKE) command. == false According to the above, it is also triggered by $(CONFIGDEP) being newer than $(FIRST_MAKEFILE) which seems to happen on the VMS rebuilds I do quite a bit. I seem to also remember seeing it being triggered by using the REALCLEAN target on the main VMS DESCRIP.MMS, but maybe I am mistaken about that. If the false command causes MMK/MMS to abort, it kills the entire VMS rebuild. Having the false command not exist is good enough for that. If the false command returns a SUCCESS on VMS, then the VMS build procedure does re-run the $(MAKE) command and successfully builds. This only occurs on a rebuild and not on the initial build. As near as I can tell, the creation time of the PERLSHR.EXE or DBGPERLSHR.EXE or something created by their rebuild seems to trigger the make files for all the extensions to be rebuilt on VMS. Or it could be that the VMS build always rebuilds the makefiles, and until this false command tried to be executed, I did not notice. -John [EMAIL PROTECTED] Personal Opinion Only
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
John E. Malmberg [EMAIL PROTECTED] wrote on 09/20/2005 08:09:56 AM: A VMS exit 44 will also cause MMS/MMK by default to abort the makefile with MMS/MMK also exiting with an error. I think Michael mentioned explicitly that was what was wanted. If you want a VMS exit code that UNIX programs should interpret as an EXIT 1, then the following (mostly undocumented) hack will work. VMS status code = %x35a000 + (UNIX status * 8), and if this is a success status, add 1, otherwise VMS will interpret it as a warning. EAGLE exit %x35A000 + (1 * 8) + 1 EAGLE x = %x35A000 + (1 * 8) + 1 EAGLE show sym x X = 3514377 Hex = 0035A009 Octal = 00015320011 A specific $? shell status returned by a specific Unix vendor's implementation of the false command is not necessarily what is needed. Rather an indication of failure is what is asked for and Michael's proposed perl -e exit 1 will suit the task. Although the exit 44 I had suggested could also work on VMS, the exit 1 will work there too (despite the doubt I might have spread by my earlier statement). Peter Prymmer
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
Michael G Schwern wrote: On Tue, Sep 20, 2005 at 02:02:31PM -0700, Michael G Schwern wrote: One is in MM_Unix-perldepend which appears to be unused. I lied, its not unused. Its used when building perl and XS modules so that's probably important. But it only happens when config.h is out of date. And VMS has its own version which doesn't use false. However, MakeMaker using false is not new so I don't know why this is only now an issue. It only shows up on VMS in blead perl if you are rebuilding, not on the initial build. So unless you are modifying things on VMS after an initial build, it would not be an issue. When I started on blead on VMS there were so many things that were not working, this one got lost in the noise because I added a false command to work around it. I was kinda hoping that once I got the other issues resolved that this issue would have gone away. -John
Re: BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
On Sun, Sep 18, 2005 at 11:52:20PM -0400, John E. Malmberg wrote: As there is no false command on VMS, this is causing rerunning a make to fail. Would adding the following line before the return $m be the fix for this? Or is something else needed to make sure only the last line is removed? $m =~ s/false\n// if $IsVMS; I see a number of uses of false in MM_Unix. Rather than throw in more VMS exceptions (blech) I'll make a $(FALSE) which can be something safe like perl -e 'exit 1' -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Ahh email, my old friend. Do you know that revenge is a dish that is best served cold? And it is very cold on the Internet!
BUG: MAKEMAKER 6.30_01 and blead in MM_UNIX.pm for VMS
In sub makefile in module MM_UNIX.PM, the command false is being added to the DESCRIP.MMS as part of the MAKE_FRAG text block. As there is no false command on VMS, this is causing rerunning a make to fail. Would adding the following line before the return $m be the fix for this? Or is something else needed to make sure only the last line is removed? $m =~ s/false\n// if $IsVMS; -John