cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: CVS v1.124 fixed another problem too


From: Alex Jacques
Subject: RE: CVS v1.124 fixed another problem too
Date: Tue, 7 Nov 2000 13:54:35 -0500

Given the following file structure:

dir with spaces
dir with spaces/top
dir with spaces/top/Construct
dir with spaces/top/hello.c
dir with spaces/top/sub
dir with spaces/top/sub/sub2
dir with spaces/top/sub/sub2/Conscript
dir with spaces/top/sub/sub2/world.c
dir with spaces/top/sub/sub2/world.h

where the directory 'dir with spaces' is not part of the build tree
itself, but is in the absolute path for any file in the tree. Note: the
two levels of sub-dirs (sub/sub2) is not essential to demo the bug, it's
just what I had setup.

Cons release 2.0.2, 2.1.2, CVS rev 1.123 and 1.124 all work ok if run
from the 'dir with spaces/top' directory (I don't know about other cons
versions - those are the ones I've played with). However if you cd to
'dir with spaces/top/sub/sub2' and then run 'cons -t', things work only
with cons CVS rev 1.124. Other versions give messages such as

cl /nologo /I. /IC:\dir with spaces\top\sub\sub2 /c C:\dir with
spaces\top\sub\sub2\world.c /FoC:\dir with spaces\top\sub\su
b2\world.obj
Command line warning D4024 : unrecognized source file type 'with',
object file assumed
Command line warning D4027 : source file 'with' ignored
Command line warning D4024 : unrecognized source file type
'spaces\top\sub\sub2', object file assumed
Command line warning D4027 : source file 'spaces\top\sub\sub2' ignored
Command line warning D4024 : unrecognized source file type 'C:\dir',
object file assumed
Command line warning D4027 : source file 'C:\dir' ignored
Command line warning D4024 : unrecognized source file type 'with',
object file assumed
Command line warning D4027 : source file 'with' ignored
Command line warning D4024 : unrecognized source file type 'with',
object file assumed
Command line warning D4027 : source file 'with' ignored
Command line warning D4027 : source file 'spaces\top\sub\sub2\world.obj'
ignored
world.c
fatal error C1083: Cannot open source file:
'spaces\top\sub\sub2\world.c': No such file or directory
cons1123.pl: *** [C:\dir with spaces\top\sub\sub2\world.obj] Error 2
cons1123.pl: errors constructing C:\dir with
spaces\top\sub\sub2\world.obj

This is apparently because cons is using absolute path names (which
contain spaces) without quoting them. Consequently earlier versions of
cons (before CVS 1.124) could only be used reliably if there were no
directories with spaces in the names anywhere in the absolute path. CVS
1.124 avoids this problem by using only relative path names, e.g.

cons1124.pl: Entering directory `c:\dir with spaces\top'
cl /nologo /I. /Isub\sub2 /c sub\sub2\world.c /Fosub\sub2\world.obj
world.c

Therefore with 1.124 one only need avoid having file/directory names
with spaces in them in your build tree (a reasonable restriction since
this is good practice anyway), but you can live with spaces in the names
in the absolute path. This is important in Windows because file names
with spaces are rampant. In particular the rough equivalent of your home
directory usually has a name such as 'C:\Documents and
Settings\ajacques\My Documents'.

Note 1: GNU tar of actual files is attached in MIME format.

Note 2: I am using Windows 2000 with Active State Perl 5.005_03.

Note 3: the 2nd (already fixed) bug I referred to had to do with a
similiar file structure, where running 'cons -t' from a sub-dir didn't
always work (would ignore defaults, process no files, report no
problems). This occured with rel 2.0.2 and 2.1.2, but not with CVS rev
1.123 or 1.124. However I was not able to reproduce the problem here.

-----Original Message-----
From: Steven Knight [mailto:address@hidden
Sent: Monday, November 06, 2000 5:00 PM
To: Alex Jacques
Cc: cons discuss
Subject: Re: CVS v1.124 fixed another problem too


On Mon, 6 Nov 2000, Alex Jacques wrote:
> In addition to fixing the problems listed in the CVS log, v1.124 fixed
> another problem I was having. Previously I was unable to put the build
> tree in a location where you would get spaces in an absolute file spec
> (pity me, I'm being forced to use Kluge2k). In other words, if a build
> tree was located under your "home" directory on Windows (eg under
> "C:\Documents and Settings\ajacques\My Documents") then cons would
have
> a problem,

Can you describe, more specifically, what that problem was?

>            even though there was no whitespace in the file names of
the
> build tree itself.  Since v1.124 uses relative rather than absolute
file
> specs this is not a problem.

I'll certainly take your word for it that this fixed your problem, but
I'm having a hard time understanding why.  Cons' path name manipulation
is intended to not care whether there are spaces or not.  A little
more explanation would be helpful.

>                              Please bear this in mind for future mods
so
> we don't lose this feature. It's greatly helping me get cons accepted
> around here as a make alternative.

Human memories fail (or move on to other things), so the way we try to
keep such things in mind is to add them to the regression test base.

Can you provide a stripped-down configuration that demonstrates the
problem you had that was solved by the 1.124 checkin?  Then, we can
guarantee the problem won't knowingly recur in the future.

> P.S. The problem that v1.124 was intended to (and does) fix makes the
> 2nd time in the last week or so that I was about to submit a bug
report,
> only to find that the problem was already fixed in the latest CVS
> release. Thanks!

Just curious:  What was the first one?

        --SK

Attachment: bug.tgz
Description: application/compressed


reply via email to

[Prev in Thread] Current Thread [Next in Thread]