Skip Menu |

This queue is for tickets about the dmake CPAN distribution.

Report information
The Basics
Id: 28847
Status: resolved
Priority: 0/
Queue: dmake

People
Owner: Nobody in particular
Requestors: corion [...] corion.net
Cc:
AdminCc:

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



Subject: dmake does not understand whitespace in paths?
Date: Wed, 15 Aug 2007 22:22:51 +0200
To: bugs-dmake [...] rt.cpan.org
From: Max Maischein <corion [...] corion.net>
Hello dmake maintainers, I'm currently trying to build bleadperl in a directory that contains whitespace. I'm aware that this practice is discouraged, but the Perl core so far works and miniperl.exe gets built. But when building WIN32CORE, dmake does not want to work, while it works once I substitute the 8.3 directory name for the whitespace-containing directory. I think dmake should have no problems with a quoted command containing whitespace, but seemingly it does - the problematic makefile is attached to this mail, but I'll repeat the crux here: I'm building blead perl in a directory evilly named "fresh blead" (originally, I was building it under "Documents and Settings"). The created Makefile contains: ABSPERL = C:\Projekte\perl-5.8.8\fresh blead\perl-5.9.5\miniperl.exe (you note the missing quotes, but that's a problem to be attacked later, once I get the manual fixup to work). Running this Makefile via `dmake` yields: C:\Projekte\perl-5.8.8\fresh blead\perl-5.9.5\ext\Win32CORE>dmake gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-st rict-aliasing -DPERL_MSVCRT_READFIX -DPERLDLL -s -O2 -DVERSION=\"0.02\" -DXS_VERSION=\"0.02\ " "-I..\..\lib\CORE" Win32CORE.c C:\Projekte\perl-5.8.8\fresh blead\perl-5.9.5\miniperl.exe "-I..\..\lib" "-I..\..\lib" -MExtUtils::C ommand -e rm_rf ..\..\lib\auto\Win32CORE\Win32CORE.a Der Befehl "C:\Projekte\perl-5.8.8\fresh" ist entweder falsch geschrieben oder konnte nicht gefunden werden. dmake: Error code 129, while making '..\..\lib\auto\Win32CORE\Win32CORE.a' - dmake did not find the command. No surprise, as the command was not properly quoted. So, let's do that: ABSPERL = "C:\Projekte\perl-5.8.8\fresh blead\perl-5.9.5\miniperl.exe" C:\Projekte\perl-5.8.8\fresh blead\perl-5.9.5\ext\Win32CORE>dmake gcc -c -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-st rict-aliasing -DPERL_MSVCRT_READFIX -DPERLDLL -s -O2 -DVERSION=\"0.02\" -DXS_VERSION=\"0.02\ " "-I..\..\lib\CORE" Win32CORE.c "C:\Projekte\perl-5.8.8\fresh blead\perl-5.9.5\miniperl.exe" "-I..\..\lib" "-I..\..\lib" -MExtUtils: :Command -e rm_rf ..\..\lib\auto\Win32CORE\Win32CORE.a Der Befehl "C:\Projekte\perl-5.8.8\fresh" ist entweder falsch geschrieben oder konnte nicht gefunden werden. dmake: Error code 129, while making '..\..\lib\auto\Win32CORE\Win32CORE.a' Hmmm - so it seems to strip the quotes and forget about them. Pasting the same (quoted) command into the console window works, so it seems to be a problem with dmake.exe itself. C:\Projekte\perl-5.8.8\fresh blead\perl-5.9.5\ext\Win32CORE>dmake -V dmake - Version 4.8-20070327-SHAY (Windows / MS Visual C++) Copyright (c) 1990,...,1997 by WTI Corp. Default Configuration: MAXLINELENGTH := 32766 MAXPROCESSLIMIT := 4 MAXPROCESS := 1 .IMPORT .IGNORE: DMAKEROOT .MAKEFILES : makefile.mk makefile .SOURCE : .NULL DMAKEROOT *= $(ABSMAKECMD:d)startup MAKESTARTUP := $(DMAKEROOT)\startup.mk Please read the NEWS file for the latest release notes. This is the latest dmake version I found... I hope it's an easy fix so we can have dmake work even with build directories containing whitespace (like the local temp directory below "Documents and Settings\$profile\Temporary Files")... Thanks -max

Message body is not shown because it is too large.

From: SteveHay [...] planit.com
Hi Max, Sorry for the slow reply, but I didn't receive any notification of this ticket from rt.cpan.org. I think the system is having some difficulties with my having changed email address from steve.hay@uk.radan.com to SteveHay@planit.com. On Wed Aug 15 16:13:15 2007, corion@corion.net wrote: Show quoted text
> Hello dmake maintainers, > > I'm currently trying to build bleadperl in a directory that contains > whitespace. I'm aware that this practice is discouraged, but the Perl > core so far works and miniperl.exe gets built. But when building > WIN32CORE, dmake does not want to work, while it works once I substitute > the 8.3 directory name for the whitespace-containing directory. > > I think dmake should have no problems with a quoted command containing > whitespace, but seemingly it does - the problematic makefile is attached > to this mail, but I'll repeat the crux here:
I haven't had a close look at your attached makefile yet, except that I couldn't see any mention of "fresh blead" anywhere in it. Did you definitely attached the correct file? I did quickly try out using dmake (and nmake) to run a command in a directory with spaces and I didn't find any problems. With the attached makefile, if I simply run "dmake" then I get the output: "C:\Temp\directory with spaces\hello.exe" Hello, world. (where "C:\Temp\directory with spaces\hello.exe" is a compiled C program that outputs "Hello, world.\n"). I get the same result when running "nmake" (from VC6). So you can see that the quotes are still present in the value of the macro that gets echoed, and the command runs successfully. If I remove the double-quotes from the value of the HELLO macro in that makefile then "dmake" now outputs: C:\Temp\directory with spaces\hello.exe dmake: Error: -- C:\Temp\directory: Invalid argument Here, you can see that the macro value no longer contains the quotes and the command doesn't run any more. So I can't help wondering if your problem actually lies elsewhere. I'll try to take a closer look later. Steve
Download Makefile
application/octet-stream 87b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #28847] dmake does not understand whitespace in paths?
Date: Mon, 03 Sep 2007 22:20:14 +0200
To: bug-dmake [...] rt.cpan.org
From: Max Maischein <corion [...] corion.net>
Hello Steve, Show quoted text
> Sorry for the slow reply, but I didn't receive any notification of this > ticket from rt.cpan.org. I think the system is having some difficulties > with my having changed email address from steve.hay@uk.radan.com to > SteveHay@planit.com.
No worries - it didn't fall through the cracks ;) Show quoted text
> I haven't had a close look at your attached makefile yet, except that I > couldn't see any mention of "fresh blead" anywhere in it. Did you > definitely attached the correct file?
I suspect I attached the main Perl win32\Makefile.mk and not the troublesome one, ext\Win32CORE\Makefile. Show quoted text
> I did quickly try out using dmake (and nmake) to run a command in a > directory with spaces and I didn't find any problems. With the attached > makefile, if I simply run "dmake" then I get the output: > > "C:\Temp\directory with spaces\hello.exe" > Hello, world.
That sounds promising. But I can't replicate your findings locally, unfortunately (see below for the (German) session). This exhibits the same problem as the Perl stuff for me. Quoting things in two places does not work, neither does quoting in one place... This is on Windows 2000, with cmd.exe as the shell, on an NTFS volume, run as Administrator, so I don't think the setup is too esoteric... -max C:\Projekte\Directory With Whitespace>dir Datenträger in Laufwerk C: hat keine Bezeichnung. Datenträgernummer: 6C76-F753 Verzeichnis von C:\Projekte\Directory With Whitespace 03.09.2007 22:11 <DIR> . 03.09.2007 22:11 <DIR> .. 03.09.2007 22:11 87 Makefile 1 Datei(en) 87 Bytes 2 Verzeichnis(se), 9.291.988.992 Bytes frei C:\Projekte\Directory With Whitespace>type Makefile HELLO="C:\Temp\directory with spaces\hello.exe" all : @echo $(HELLO) @$(HELLO) C:\Projekte\Directory With Whitespace>dmake "C:\Temp\directory with spaces\hello.exe" Der Befehl "C:\Temp\directory" ist entweder falsch geschrieben oder konnte nicht gefunden werden. dmake: Error code 129, while making 'all' C:\Projekte\Directory With Whitespace>dmake -V dmake - Version 4.8-20070327-SHAY (Windows / MS Visual C++) Copyright (c) 1990,...,1997 by WTI Corp. Default Configuration: MAXLINELENGTH := 32766 MAXPROCESSLIMIT := 4 MAXPROCESS := 1 .IMPORT .IGNORE: DMAKEROOT .MAKEFILES : makefile.mk makefile .SOURCE : .NULL DMAKEROOT *= $(ABSMAKECMD:d)startup MAKESTARTUP := $(DMAKEROOT)\startup.mk Please read the NEWS file for the latest release notes.

Message body is not shown because it is too large.

On Mon Sep 03 16:22:44 2007, corion@corion.net wrote: Show quoted text
> > I haven't had a close look at your attached makefile yet, except that I > > couldn't see any mention of "fresh blead" anywhere in it. Did you > > definitely attached the correct file?
> I suspect I attached the main Perl win32\Makefile.mk and not the > troublesome one, ext\Win32CORE\Makefile.
OK, I've got your new attachment now, and I've also tried building blead myself in "C:\Temp\fresh blead\perl-5.9.5". You'll be glad to hear that I get the same problem, and quoting the value of ABSPERL doesn't fix it for me either. Show quoted text
>
> > I did quickly try out using dmake (and nmake) to run a command in a > > directory with spaces and I didn't find any problems. With the attached > > makefile, if I simply run "dmake" then I get the output: > > > > "C:\Temp\directory with spaces\hello.exe" > > Hello, world.
> That sounds promising. But I can't replicate your findings locally,
Very strange. I, in turn, can't replicate your findings on my English (UK) setup! I'm running Windows XP SP2 / cmd.exe / NTFS / dmake-4.8-20070327-SHAY, which is very similar to your own setup. I'm going to ignore that for now and concentrate on the main problem. (I might come back to the other problem later, but it's not so important.) It seems that dmake is happy to run a command given by a MACRO with a double-quoted value, but not if that command has a double-quoted argument! Thus, the attached makefile produces the following output for me: "C:\Temp\directory with spaces\hello.exe" Hello, world. "C:\Temp\directory with spaces\hello.exe" arg Hello, world. "C:\Temp\directory with spaces\hello.exe" "arg" 'C:\Temp\directory' is not recognized as an internal or external command, operable program or batch file. dmake: Error code 129, while making 'all' I'm going to report this bug to the real dmake maintainers, i.e. those that work on the source code: I simply build binaries and put them up on CPAN periodically. I'll keep you posted with progress.
Download Makefile
application/octet-stream 268b

Message body not shown because it is not plain text.

I've now raised a new OpenOffice.org "issue" for this bug: http://www.openoffice.org/issues/show_bug.cgi?id=81252
From: SHAY [...] cpan.org
On Tue Sep 04 06:30:51 2007, SHAY wrote: Show quoted text
> I've now raised a new OpenOffice.org "issue" for this bug: > > http://www.openoffice.org/issues/show_bug.cgi?id=81252
This dmake bug has now been fixed in dmake-4.11, which I've released a binary build of on CPAN as dmake-4.11-SHAY. I can now build bleadperl in a directory with spaces in the path if I manually hack the Makefile generated for each extension to double-quote the ABSPERL macro's value. Please confirm that this works for you and I'll close down this bug report. Then we can set about fixing ExtUtils-MakeMaker to write out Makefiles with ABSPERL double-quoted... (Note that dmake-4.11 produces numerous warnings about targets being made but their timestamps not getting updated, and files corresponding to virtual targets existing. I'll look closer at these sometime and decide whether perl's Makefiles need further improvement or whether dmake is being over-zealous and should perhaps only emit those warnings in verbose mode.)
From: SHAY [...] cpan.org
On Tue Nov 27 04:30:50 2007, SHAY wrote: Show quoted text
> (Note that dmake-4.11 produces numerous warnings about targets being > made but their timestamps not getting updated, and files corresponding > to virtual targets existing. I'll look closer at these sometime and > decide whether perl's Makefiles need further improvement or whether > dmake is being over-zealous and should perhaps only emit those warnings > in verbose mode.)
I think dmake-4.11 was being over-zealous. All but two of the warnings are now gone from dmake-4.12-cvs, so this should be resolved too in the next release. See the thread here for more detail: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2007-11/msg00929.html
Now resolved in dmake-4.11-20080107-SHAY, which also removes the spurious warnings that dmake-4.11 was producing.