Thread: Re: [Module::Build] ./Build on Win98 (Page 2)
Status: Beta
Brought to you by:
kwilliams
|
From: Dr B. <gr...@mo...> - 2006-02-24 14:45:38
|
On Wed, 22 Feb 2006, Randy W. Sims wrote: > >Build test hangs at the same point with the command.com shell as > >in my last message. > Is this a pre-existing problem? Could you please try one of the earlier > 0.27x developer snapshots: > <http://search.cpan.org/~kwilliams/Module-Build-0.27_07/> On a computer with ActiveState 5.8.7.815: Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t\install.t 2 512 34 2 5.88% 23 25 4 tests and 27 subtests skipped. Failed 1/20 test scripts, 95.00% okay. 2/566 subtests failed, 99.65% okay. In the failing subtests, Module/Build.pm cannot be found, and Simple.pm was expected to exist, but doesn't exist. compat.t was skipped. -- Dr Bean Teaching: leaving fingerprints over the tabula rasa. --Dr Bean |
|
From: Nick Ing-S. <ni...@in...> - 2006-02-22 21:11:46
|
Randy W. Sims <Ra...@Th...> writes: >> C:\cpanplus\5.8.2\build\Module-Build>Build realclean >> Deleting pod2htmd.tmp >> Deleting pod2htmi.tmp >> Deleting blib >> Deleting _build >> Deleting Build >>=20 >> Then there is an NLS message about the right way to call START. >> And Build.bat is still there. > >Ok, this looks like the source of at least some of the problem. I've=20 >uploaded a new tarball to the same location: > > <http://thepierianspring.org/perl/Module-Build.tar.gz> > >Could you try it again with the commands > > perl Build.PL > Build realclean > >Does it still outputs an error? Is the 'Build.bat' file still there? If=20 >so, I'll have to find the docs for the start command and for=20 >command.com. Could you post them? Build.bat cannot delete itself on Windows. You can't delete executing things. This is why Windows needs to=20 reboot after installing upgrades.=20 A running thing can ask for a delete on next reboot, but cannot delete=20 an open file. > > start /? > help.txt > command /? >> help.txt > >Also, the last line of Build.bat should say something like: > > start /min "%comspec%" /c del "Build.bat" > >This is the command we're trying to execute. It seems to have different=20 >syntax on different versions of Windows. > >If it does work, can you run the test suite again? > >Thanks for the help. > >Randy. > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log fil= es >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D= 121642 >_______________________________________________ >Module-build-general mailing list >Mod...@li... >https://lists.sourceforge.net/lists/listinfo/module-build-general |
|
From: Joshua b. J. <tw...@gm...> - 2006-02-22 21:38:43
|
On 2/22/06, Nick Ing-Simmons <ni...@in...> wrote: > Randy W. Sims <Ra...@Th...> writes: > Build.bat cannot delete itself on Windows. > You can't delete executing things. This is why Windows needs to > reboot after installing upgrades. > A running thing can ask for a delete on next reboot, but cannot delete > an open file. You can have it delete itself if you can manage to call the CreateFile Win32 API function with the FILE_FLAG_DELETE_ON_CLOSE flag. At least that's what demerphq told p5p about something similar when trying to get M::B to be able to install Cwd. http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/fileio/f= s/createfile.asp Josh |
|
From: Yitzchak Scott-T. <sth...@ef...> - 2006-02-23 02:46:08
|
On Wed, Feb 22, 2006 at 09:11:39PM +0000, Nick Ing-Simmons wrote: > Build.bat cannot delete itself on Windows. > You can't delete executing things. This is why Windows needs to > reboot after installing upgrades. AFAIK all versions of cmd & command execute .bat files doing an open/seek/close for each line, so it should be possible. |
|
From: demerphq <dem...@gm...> - 2006-02-23 10:40:48
|
On 2/22/06, Nick Ing-Simmons <ni...@in...> wrote: > Randy W. Sims <Ra...@Th...> writes: > >> C:\cpanplus\5.8.2\build\Module-Build>Build realclean > >> Deleting pod2htmd.tmp > >> Deleting pod2htmi.tmp > >> Deleting blib > >> Deleting _build > >> Deleting Build > >> > >> Then there is an NLS message about the right way to call START. > >> And Build.bat is still there. > > > >Ok, this looks like the source of at least some of the problem. I've > >uploaded a new tarball to the same location: > > > > <http://thepierianspring.org/perl/Module-Build.tar.gz> > > > >Could you try it again with the commands > > > > perl Build.PL > > Build realclean > > > >Does it still outputs an error? Is the 'Build.bat' file still there? If > >so, I'll have to find the docs for the start command and for > >command.com. Could you post them? > > Build.bat cannot delete itself on Windows. > You can't delete executing things. This is why Windows needs to > reboot after installing upgrades. > A running thing can ask for a delete on next reboot, but cannot delete > an open file. This is wrong. Batch files most certainly can delete themselves on NT/W2k and etc. I believe that the command processor opens the file, reads a line, does a tell, closes the file then executes the line then when control returns reopens and seeks then reads again. Suffice it to say that i tested whether a batchfile along the lines of del self.bat echo foo could succesffully self delete. Yves -- perl -Mre=3Ddebug -e "/just|another|perl|hacker/" |
|
From: Dr B. <gr...@mo...> - 2006-03-01 04:52:50
|
On Tue, 28 Feb 2006, Randy W. Sims wrote: > <http://thepierianspring.org/perl/Module-Build.tar.gz> D:\greg\Module-Build>Build realclean Deleting _build Deleting Build D:\greg\Module-Build>dir build Volume in drive D has no label Volume Serial Number is 4658-17D7 Directory of D:\greg\Module-Build BUILD PL 2,591 02-02-06 8:19 Build.PL 1 file(s) 2,591 bytes 0 dir(s) 13,721.52 MB free D:\greg\Module-Build> D:\greg\Module-Build>perl Build realclean Deleting _build Deleting Build Deleting Build.bat D:\greg\Module-Build>dir build Volume in drive D has no label Volume Serial Number is 4658-17D7 Directory of D:\greg\Module-Build BUILD PL 2,591 02-02-06 8:19 Build.PL 1 file(s) 2,591 bytes 0 dir(s) 13,721.52 MB free D:\greg\Module-Build> > If everything works could you post the batch heading of Build.bat? @rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S "%0" --build_bat %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; #!perl #line 15 use strict; use Cwd; use File::Basename; > Build test Failed Test Stat Wstat Total Fail Failed List of Failed ----------------------------------------------------------------------------- t\basic.t 2 512 55 110 200.00% 1-55 t\compat.t 2 512 ?? ?? % ?? t\destinations.t 2 512 92 184 200.00% 1-92 t\extend.t 2 512 53 106 200.00% 1-53 t\files.t 2 512 6 12 200.00% 1-6 t\install.t 2 512 34 68 200.00% 1-34 t\manifypods.t 2 512 ?? ?? % ?? t\metadata.t 2 512 46 92 200.00% 1-46 t\metadata2.t 2 512 18 36 200.00% 1-18 t\moduleinfo.t 2 512 66 132 200.00% 1-66 t\notes.t 2 512 11 22 200.00% 1-11 t\ppm.t 2 512 ?? ?? % ?? t\runthrough.t 2 512 28 56 200.00% 1-28 t\signature.t 2 512 ?? ?? % ?? t\tilde.t 2 512 11 22 200.00% 1-11 t\versions.t 2 512 2 4 200.00% 1-2 t\xs.t 2 512 ?? ?? % ?? Failed 17/20 test scripts, 15.00% okay. 422/548 subtests failed, 22.99% okay. D:\greg\Module-Build> There were a lot of error messages about Tie::CPHash not being found. I put that in the lib directory and it is hanging again at subtest 25 of basic.t But Build realclean works. -- Dr Bean Whereof we cannot speak, we must remain silent. --Ludwig Wittgenstein We know more than we can say. --Michael Polanyi |
|
From: demerphq <dem...@gm...> - 2006-03-01 07:59:38
|
On 3/1/06, Dr Bean <gr...@mo...> wrote: > There were a lot of error messages about Tie::CPHash not being found. > > I put that in the lib directory and it is hanging again at subtest 25 of > basic.t > > But Build realclean works. Am I correct that this is Win98? -- perl -Mre=3Ddebug -e "/just|another|perl|hacker/" |
|
From: Dr B. <gr...@mo...> - 2006-02-26 09:56:36
|
On Sat, 25 Feb 2006, Randy W. Sims wrote: > pl2bat -n "-x -S """%0""" --build_bat %*" -o "-x -S """%0""" --build_bat > %1 %2 %3 %4 %5 %6 %7 %8 %9" < Build > Build.bat > pl2bat -n "-x -S """%0""" --build_bat %* " -o "-x -S """%0""" > --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 " < Build > Build.bat Both of those commands, run from the command line are hanging here. But 'pl2bat --help' is hanging also, though 'pl2bat -h' doesn't. -- drbean |
|
From: demerphq <dem...@gm...> - 2006-02-26 12:39:03
|
On 2/26/06, Dr Bean <gr...@mo...> wrote: > On Sat, 25 Feb 2006, Randy W. Sims wrote: > > > pl2bat -n "-x -S """%0""" --build_bat %*" -o "-x -S """%0""" --build_ba= t > > %1 %2 %3 %4 %5 %6 %7 %8 %9" < Build > Build.bat > > > pl2bat -n "-x -S """%0""" --build_bat %* " -o "-x -S """%0""" > > --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 " < Build > Build.bat > > Both of those commands, run from the command line are hanging > here. > > But 'pl2bat --help' is hanging also, though 'pl2bat -h' doesn't. I vaguely recall that %* isnt supported on Win 9x. But i havent verified th= is. Yves -- perl -Mre=3Ddebug -e "/just|another|perl|hacker/" |
|
From: Randy W. S. <ml...@th...> - 2006-02-22 22:59:34
|
Joshua ben Jore wrote: > On 2/22/06, Nick Ing-Simmons <ni...@in...> wrote: >> Randy W. Sims <Ra...@Th...> writes: > >> Build.bat cannot delete itself on Windows. >> You can't delete executing things. This is why Windows needs to >> reboot after installing upgrades. >> A running thing can ask for a delete on next reboot, but cannot delete >> an open file. > > You can have it delete itself if you can manage to call the CreateFile > Win32 API function with the FILE_FLAG_DELETE_ON_CLOSE flag. At least > that's what demerphq told p5p about something similar when trying to > get M::B to be able to install Cwd. That's true of binary executable images, batch scripts turn out to be different... We start with a perl script 'Build', run it through the 'pl2bat' utility which prefaces it with a batch script that invokes the perl interpreter with itself, skipping the batch header. This produces the 'Build.bat' file that we execute. Perl reads the entire file in, closing the handle. Initially, we tried deleting the 'Build.bat' from the perl side of the script. It worked: the file was unlinked. But when execution returned the shell, the batch script was no longer there, producing the "not found" error. This seems to imply that batch files are opened, read & executed one line at a time. This is important. The final solution, the one being tweaked now because of slight syntax differences between commands on 9x vs NT, involves appending DOS commands to the end of the batch script during the execution of the 'realclean' action. The general solution was suggested by some people in the alt.msdos.batch newsgroup. Basically, it's executing the following commands from a batch file: > It will need more quotes for NT, but works here. > > @echo off > start "" /min "%comspec%" /c del "%~f0" > > > For Win9x this should work > > @echo off > start /min "%comspec%" /c del "%~f0" Note the %~f0 syntax is specific to NT, but is not a problem because we fill in the literal path before appending the command to the batch script. The main syntax difference that caused the failure on 9x was from the "" as the first argument; I still don't understand that requirement. When 'Build realclean' is executed, it does it's thing deleting everything but the 'Build.bat'. It opens the 'Build.bat' for appending, adding the command above. When the perl side exits, control returns to the shell which continues execution of the now extended batch script. This works perfectly as far as I can tell; though it's a very odd way to go about it. There is a couple of other issues. Cygwin is running pl2bat; I don't know if it should, and if it is decided it should, the solution will be different under the bash shell. The other is the test failures that Dr Bean noticed; I'm not convinced yet that they are related to any of this, i.e. I wonder if they are pre-existing issues. Randy. PS: Still trying to get caught up on stuff that transpired while I was away on a very nice little vacation. Unfortunately, I also brought back a nasty little cold with me. Catching up as fast as I can, but I came back to over a thousand mails/mailing-list msgs/etc... |
|
From: demerphq <dem...@gm...> - 2006-02-23 10:45:20
|
On 2/22/06, Randy W. Sims <ml...@th...> wrote: > Joshua ben Jore wrote: > > On 2/22/06, Nick Ing-Simmons <ni...@in...> wrote: > >> Randy W. Sims <Ra...@Th...> writes: > > > >> Build.bat cannot delete itself on Windows. > >> You can't delete executing things. This is why Windows needs to > >> reboot after installing upgrades. > >> A running thing can ask for a delete on next reboot, but cannot delete > >> an open file. > > > > You can have it delete itself if you can manage to call the CreateFile > > Win32 API function with the FILE_FLAG_DELETE_ON_CLOSE flag. At least > > that's what demerphq told p5p about something similar when trying to > > get M::B to be able to install Cwd. > > That's true of binary executable images, batch scripts turn out to be > different... > > We start with a perl script 'Build', run it through the 'pl2bat' utility > which prefaces it with a batch script that invokes the perl interpreter > with itself, skipping the batch header. This produces the 'Build.bat' > file that we execute. Perl reads the entire file in, closing the handle. > > Initially, we tried deleting the 'Build.bat' from the perl side of the > script. It worked: the file was unlinked. But when execution returned > the shell, the batch script was no longer there, producing the "not > found" error. This seems to imply that batch files are opened, read & > executed one line at a time. This is important. > > The final solution, the one being tweaked now because of slight syntax > differences between commands on 9x vs NT, involves appending DOS > commands to the end of the batch script during the execution of the > 'realclean' action. The general solution was suggested by some people in > the alt.msdos.batch newsgroup. Basically, it's executing the following > commands from a batch file: And actually if you go back to the early mails on this, i suggested something along these lines at that time. (One nice use of this trick is that you can write a perl script that is then run through pl2bat which is capable of altering its parents enviornment.) Cheers, yves -- perl -Mre=3Ddebug -e "/just|another|perl|hacker/" |
|
From: Nick Ing-S. <ni...@in...> - 2006-02-24 18:14:30
|
Joshua ben Jore <tw...@gm...> writes: >On 2/22/06, Nick Ing-Simmons <ni...@in...> wrote: >> Randy W. Sims <Ra...@Th...> writes: > >> Build.bat cannot delete itself on Windows. >> You can't delete executing things. This is why Windows needs to >> reboot after installing upgrades. >> A running thing can ask for a delete on next reboot, but cannot delete >> an open file. > >You can have it delete itself if you can manage to call the CreateFile >Win32 API function with the FILE_FLAG_DELETE_ON_CLOSE flag. At least >that's what demerphq told p5p about something similar when trying to >get M::B to be able to install Cwd. And there was a whole thread ... > >http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/fileio/= fs/createfile.asp Well that flag is a help, but not suffient, as a browse of URL above confim= s: A. It don't work on Win9x like things. B. It don't work if there is an _existing_ open other than ours unless th= at=20 open had other ANOTHER flag set.=20 Does cmd.exe set FILE_SHARE_DELETE access when it opens Build.bat ? > >Josh |
|
From: Joshua b. J. <tw...@gm...> - 2006-02-24 19:32:23
|
On 2/24/06, Nick Ing-Simmons <ni...@in...> wrote: > >http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/filei= o/fs/createfile.asp > > Well that flag is a help, but not suffient, as a browse of URL above conf= ims: > A. It don't work on Win9x like things. I had to read the source of the HTML to see which item the "doesn't work on Windows 9x/ME" belonged to. It was to the previous flag, not the one I mentioned. Not that it matters much since it isn't going to do the job here *anyway*..= . I just mention that it's easy to read that page and think it says the flag doesn't work on 9x/ME. The table cells aren't aligned nicely and there's no borders so you have to guess what text belongs in what row (or read the source). Josh |
|
From: Ron S. <ro...@sa...> - 2006-02-24 22:57:45
|
On Fri, 24 Feb 2006 13:32:19 -0600, Joshua ben Jore wrote: Hi Joshua > there's no borders so you have to guess what text belongs in what IE displays borders on all tables on that page. -- Cheers Ron Savage, ro...@sa... on 25/02/2006 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company |