Skip Menu |
 

Subject: Build of windows/identity fails in clean directory
krb5/src/windows/identity/copnfig/Makefile.w32 adds two directory
levels between DESTROOT and DESTDIR. Makefile does a mkdir of
DESTROOT followed by a mkdir of DESTDIR. For example,
mkdir ...\krb5\src\windows\identity\obj\ followed by
mkdir ...\krb5\src\windows\identity\obj\i386\dbg

The second mkdir fails because i386 doesn't exist. Adding an extra
mkdir of $(DESTROOT)\$(CPU) fixes the problem.

Stylisticly, which is preferred: adding another variable to
Makefile.w32 and the new mkdir block in Makefile adds it, or the new
mkdir block adds $(DESTROOT)\$(CPU)?
Date: Thu, 13 Dec 2007 09:15:45 -0500
From: Jeffrey Altman <jaltman@secure-endpoints.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Kevin Koch via RT wrote:
Show quoted text
> krb5/src/windows/identity/copnfig/Makefile.w32 adds two directory
> levels between DESTROOT and DESTDIR. Makefile does a mkdir of
> DESTROOT followed by a mkdir of DESTDIR. For example,
> mkdir ...\krb5\src\windows\identity\obj\ followed by
> mkdir ...\krb5\src\windows\identity\obj\i386\dbg
>
> The second mkdir fails because i386 doesn't exist. Adding an extra
> mkdir of $(DESTROOT)\$(CPU) fixes the problem.
>
Before I answer that question I want to understand why this has not been
a problem before now since your build script always starts from a clean
directory tree.

What changed?
I'm not sure.

The same problem happens later on when MODULE is set to plugins\common
and the mkdirs: action in Makefile.w32 does a mkdir of $(OBJDIR)
\$(MODULE). ...\plugins doesn't exist so mkdir of ...\plugins\common
fails.
This problem needs to be fixed in Makefile.w32 and Makefile.w2k.

Otherwise the abstraction layer between Makefile.w32/w2k and Makefile is
broken. Makefile should not need to know what the definition of DESTDIR is.

The appropriate mkdir commands must go into the mkdirs:: section of
Makefile.w32/w2k.
This code fixes the problem:
mkdirs::
!if !exist($(OBJ))
echo > a.tmp
# xcopy will build any missing directory structure:
echo F | xcopy a.tmp $(OBJ)\a.tmp
del a.tmp
del $(OBJ)\a.tmp
!endif

But all the uses of mkdirs pass arguments that are ignored. Should
mkdirs process its input arguments or should they be removed from the
callers?
Which command shell are you using? Unless you specifically disabled
command extensions, mkdir as provided by cmd.exe on Windows 2000 and
above will create intermediate directories as needed.

The following is from the Windows 2000 command reference (the same is
true for XP):

When command extensions are enabled (the default in Windows 2000), you
can use a single mkdir command to create intermediate directories in a
specified path. For example, if you want create a directory named
"Taxes" containing a directory named "Property," which in turn contains
a directory named "Current," you would type:

mkdir \Taxes\Property\Current"

Show quoted text
> But all the uses of mkdirs pass arguments that are ignored. Should
> mkdirs process its input arguments or should they be removed from the
> callers?

Which uses? 'mkdirs' is only used as a dependency so that the
directories are created before building the other targets, which
'mkdirs' itself has no dependencies. Or am I misunderstanding the question?

- Asanka
Download (untitled) / with headers
text/plain 1.3KiB
I'm using a VS2005 command window.

Here are the mkdirs usages that sure look like they want a bunch of
directories created:

$ find /cygdrive/c/KfW/pismere/athena/auth/krb5/src/windows -exec grep
mkdirs {} /dev/null \; | grep -v \.log: | grep -v \.svn
identity/doc/Makefile:all: mkdirs docs
identity/help/Makefile:all: mkdirs $(CHMFILE) $(INCFILES)
identity/kconfig/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
identity/kcreddb/Makefile:all: mkdirs $(INCFILES) $(OBJ)\kcredres.res
$(OBJFILES)
identity/kherr/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
identity/kmm/Makefile:all: mkdirs $(INCFILES) $(MSGRESFILE) $(OBJFILES)
identity/kmq/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
identity/nidmgrdll/Makefile:all: mkdirs $(DLLFILE)
identity/nidmgrdll/Makefile.w2k:all: mkdirs $(DLLFILE)
identity/plugins/common/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
identity/plugins/krb4/Makefile:all: mkdirs $(MSGRESFILE) $(DLLFILE)
lang
identity/plugins/krb5/Makefile:all: mkdirs $(MSGRESFILE) $(DLLFILE)
lang
identity/sample/templates/credprov/Makefile:mkdirs::
identity/sample/templates/credprov/Makefile:all: mkdirs
$(CONFIGHEADER) $(DLL) lang
identity/ui/Makefile:all: mkdirs $(MANIFESTFILE) $(EXEFILE)
identity/ui/Makefile.w2k:all: mkdirs $(EXEFILE)
identity/uilib/Makefile:all: mkdirs $(INCFILES) $(UIDLLOBJFILES)
identity/util/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
Date: Thu, 13 Dec 2007 13:37:45 -0500
From: Jeffrey Altman <jaltman@secure-endpoints.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Kevin, any chance you aren't using cmd.exe? Perhaps one of the cygwin
shells? Is the mkdir that is being executed the cygwin mkdir.exe
instead of the cmd.exe "mkdir"?
Date: Thu, 13 Dec 2007 13:42:15 -0500
From: Jeffrey Altman <jaltman@secure-endpoints.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Kevin Koch via RT wrote:
Show quoted text
> I'm using a VS2005 command window.
>
And what changed since the days when this code worked?

Something changed. The Makefiles have not. It is something in your
environment. Please don't change the Makefiles until you understand why
your system no longer works.
Download smime.p7s
application/x-pkcs7-signature 3.2KiB

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 1.4KiB
Show quoted text
> $ find /cygdrive/c/KfW/pismere/athena/auth/krb5/src/windows -exec grep
> mkdirs {} /dev/null \; | grep -v \.log: | grep -v \.svn
> identity/doc/Makefile:all: mkdirs docs
> identity/help/Makefile:all: mkdirs $(CHMFILE) $(INCFILES)
> identity/kconfig/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
> identity/kcreddb/Makefile:all: mkdirs $(INCFILES) $(OBJ)\kcredres.res
> $(OBJFILES)
> identity/kherr/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
> identity/kmm/Makefile:all: mkdirs $(INCFILES) $(MSGRESFILE)
> $(OBJFILES)
> identity/kmq/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
> identity/nidmgrdll/Makefile:all: mkdirs $(DLLFILE)
> identity/nidmgrdll/Makefile.w2k:all: mkdirs $(DLLFILE)
> identity/plugins/common/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
> identity/plugins/krb4/Makefile:all: mkdirs $(MSGRESFILE) $(DLLFILE)
> lang
> identity/plugins/krb5/Makefile:all: mkdirs $(MSGRESFILE) $(DLLFILE)
> lang
> identity/sample/templates/credprov/Makefile:mkdirs::
> identity/sample/templates/credprov/Makefile:all: mkdirs
> $(CONFIGHEADER) $(DLL) lang
> identity/ui/Makefile:all: mkdirs $(MANIFESTFILE) $(EXEFILE)
> identity/ui/Makefile.w2k:all: mkdirs $(EXEFILE)
> identity/uilib/Makefile:all: mkdirs $(INCFILES) $(UIDLLOBJFILES)
> identity/util/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)

All the above lines look like:

all: mkdirs (other stuff)

Except the ones that look like 'mkdirs::'. None of these are instances
where the mkdirs needs to create more than one directory.
Date: Thu, 13 Dec 2007 14:29:34 -0500
From: Jeffrey Altman <jaltman@secure-endpoints.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.5KiB
asanka@mit.edu via RT wrote:
Show quoted text
>> $ find /cygdrive/c/KfW/pismere/athena/auth/krb5/src/windows -exec grep
>> mkdirs {} /dev/null \; | grep -v \.log: | grep -v \.svn
>> identity/doc/Makefile:all: mkdirs docs
>> identity/help/Makefile:all: mkdirs $(CHMFILE) $(INCFILES)
>> identity/kconfig/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
>> identity/kcreddb/Makefile:all: mkdirs $(INCFILES) $(OBJ)\kcredres.res
>> $(OBJFILES)
>> identity/kherr/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
>> identity/kmm/Makefile:all: mkdirs $(INCFILES) $(MSGRESFILE)
>> $(OBJFILES)
>> identity/kmq/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
>> identity/nidmgrdll/Makefile:all: mkdirs $(DLLFILE)
>> identity/nidmgrdll/Makefile.w2k:all: mkdirs $(DLLFILE)
>> identity/plugins/common/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
>> identity/plugins/krb4/Makefile:all: mkdirs $(MSGRESFILE) $(DLLFILE)
>> lang
>> identity/plugins/krb5/Makefile:all: mkdirs $(MSGRESFILE) $(DLLFILE)
>> lang
>> identity/sample/templates/credprov/Makefile:mkdirs::
>> identity/sample/templates/credprov/Makefile:all: mkdirs
>> $(CONFIGHEADER) $(DLL) lang
>> identity/ui/Makefile:all: mkdirs $(MANIFESTFILE) $(EXEFILE)
>> identity/ui/Makefile.w2k:all: mkdirs $(EXEFILE)
>> identity/uilib/Makefile:all: mkdirs $(INCFILES) $(UIDLLOBJFILES)
>> identity/util/Makefile:all: mkdirs $(INCFILES) $(OBJFILES)
>
> All the above lines look like:
>
> all: mkdirs (other stuff)
>
> Except the ones that look like 'mkdirs::'. None of these are instances
> where the mkdirs needs to create more than one directory.
mkdirs is a dependency of the "all" rule
Download smime.p7s
application/x-pkcs7-signature 3.2KiB

Message body not shown because it is not plain text.

The VS2003 build environment still works. It is the VS2005
environment that doesn't. Also, mkdir a\b\c\d creates the entire path
when run from the VS2005 command window. I'll bet the difference is
in the environment perl sets up for sys. How can I investigate this?
[Does perl do different things for sys and backtick?]

Show quoted text
> Kevin Koch via RT wrote:
> > I'm using a VS2005 command window.
> >
> And what changed since the days when this code worked?
>
> Something changed. The Makefiles have not. It is something in your
> environment. Please don't change the Makefiles until you understand
> why your system no longer works.
Date: Fri, 14 Dec 2007 09:17:43 -0500
From: Jeffrey Altman <jaltman@secure-endpoints.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Kevin Koch via RT wrote:
Show quoted text
> The VS2003 build environment still works. It is the VS2005
> environment that doesn't. Also, mkdir a\b\c\d creates the entire path
> when run from the VS2005 command window. I'll bet the difference is
> in the environment perl sets up for sys. How can I investigate this?
> [Does perl do different things for sys and backtick?]

If you are using the same perl in both VS2003 and VS2005, why do you
believe that perl is at fault?

You have the VS2003 and VS2005 shortcuts. Compare them and the
environments they produce and identify the differences.

use tools such as procmon and procexp to determine what processes are in
use and what operations are being performed.

in any case, it is clear this is a configuration issue not a makefile
issue. This ticket should in my opinion be closed and if you need help
from the kfwdev community, you should ask for help there.
Date: Thu, 20 Dec 2007 22:32:38 -0500
From: Danny Mayer <mayer@ntp.isc.org>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.5KiB
Jeffrey Altman via RT wrote:
Show quoted text
> Kevin Koch via RT wrote:
>> The VS2003 build environment still works. It is the VS2005
>> environment that doesn't. Also, mkdir a\b\c\d creates the entire path
>> when run from the VS2005 command window. I'll bet the difference is
>> in the environment perl sets up for sys. How can I investigate this?
>> [Does perl do different things for sys and backtick?]
>
> If you are using the same perl in both VS2003 and VS2005, why do you
> believe that perl is at fault?
>
> You have the VS2003 and VS2005 shortcuts. Compare them and the
> environments they produce and identify the differences.
>
> use tools such as procmon and procexp to determine what processes are in
> use and what operations are being performed.
>
> in any case, it is clear this is a configuration issue not a makefile
> issue. This ticket should in my opinion be closed and if you need help
> from the kfwdev community, you should ask for help there.

While I agree that this appears to be a configuration issue and not a
makefile issue, the ticket should *not* be closed. The problem needs to
be understood and resolved and it may very well require changes to the
makefile to ensure that the right thing happens. Just because it only
currently happens in one situation it doesn't mean that the code is not
wrong.

On an advisory note try running ntwhich on mkdir and see where it finds
it. That may tell you why you are having a problem. If you need a copy,
send me mail. I have a bunch of tools like that which are not cygwin based.

Danny
mkdir /? in a cmd.exe in a Visual Studio 2005 command prompt window
gives a usage example with backslashes. mkdir /? in a cygwin window
gives an error message. But I'd like to see ntwhich in any case.

Maybe this should be renamed VS2003/VS2005 environment differences?
Here's another one: hcw doesn't exist in VS2005 so the leash help
doesn't build.

[mayer@ntp.isc.org - Thu Dec 20 22:37:25 2007]:
On an advisory note try running ntwhich on mkdir and see where it
finds it. That may tell you why you are having a problem. If you need a
copy, send me mail. I have a bunch of tools like that which are not
cygwin based.
Date: Fri, 21 Dec 2007 10:09:44 -0500
From: Jeffrey Altman <jaltman@secure-endpoints.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Kevin Koch via RT wrote:
Show quoted text
> Maybe this should be renamed VS2003/VS2005 environment differences?
> Here's another one: hcw doesn't exist in VS2005 so the leash help
> doesn't build.
>
hcw.exe doesn't exist in either VS2003 or VS2005. Its an additional
tool that you installed from the HTML Help SDK.
Download smime.p7s
application/x-pkcs7-signature 3.2KiB

Message body not shown because it is not plain text.

Date: Fri, 21 Dec 2007 10:16:08 -0500
From: Jeffrey Altman <jaltman@secure-endpoints.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Sorry, I was thinking of hhc.exe which comes from the HTML Help Workshop.

hcw.exe is deprecated because the .HLP format is no longer supported by
Microsoft. .chm (HTML Help) is the only supported Help file format.
hcw is only used to build the leash32.hlp file which is to the best of
my knowledge no longer being built for KFW.

There was agreement that leash32.exe and associated files would be
removed from all installations after 3.2.2

There is an open ticket for doing so.
Download smime.p7s
application/x-pkcs7-signature 3.2KiB

Message body not shown because it is not plain text.

Date: Wed, 16 Jan 2008 15:19:34 -0500
From: Jeffrey Altman <jaltman@secure-endpoints.com>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #5859] Build of windows/identity fails in clean directory
RT-Send-Cc:
Coming back to this ticket.

Kevin, would you please check the version of nmake.exe that you are
using in your old and new build environments?

I would like you to confirm that in your old environment you were using
nmake.exe (version 7.x) and that in your new environment you are now
using the VS 2005 nmake.exe (version 8.x). I would also like you to
confirm which Platform SDK you are using because the XP SP2 Platform SDK
which is the one we are still building with includes the version 7.x
nmake.exe.

The version 8.x nmake.exe appears to favor executables over shell
commands. As a result, using "mkdir" instead of "md" in the Makefile as
the command for creating directory trees fails when the Cygwin mkdir.exe
is present in the PATH.

The change I would therefore recommend is to modify the

MKDIR=mkdir
RMDIR=rmdir

macros in the Makefiles to be

MKDIR=md
RMDIR=rd

as this will execute the shell version of the command in all cases.

Jeffrey Altman
Download smime.p7s
application/x-pkcs7-signature 3.2KiB

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 1.4KiB
Your theory that I was using nmake V8 in the failing case and V7 in the
succeeding case is correct.

It turns out that in the VM with VS2005 installed, the failing case was
in a W2K environment shell, with nmake V8 from c/Program
Files/Microsoft Visual Studio 8/VC/BIN.

The succeeding case was in a XP build environment shell, with nmake V7
from c/Program Files/Platform SDK Server 2003 R2/Bin.

I will update the build documentation to say what build environment is
needed.


Show quoted text
> Coming back to this ticket.
>
> Kevin, would you please check the version of nmake.exe that you are
> using in your old and new build environments?
>
> I would like you to confirm that in your old environment you were
> using
> nmake.exe (version 7.x) and that in your new environment you are now
> using the VS 2005 nmake.exe (version 8.x). I would also like you to
> confirm which Platform SDK you are using because the XP SP2 Platform
> SDK
> which is the one we are still building with includes the version 7.x
> nmake.exe.
>
> The version 8.x nmake.exe appears to favor executables over shell
> commands. As a result, using "mkdir" instead of "md" in the Makefile
> as
> the command for creating directory trees fails when the Cygwin
> mkdir.exe
> is present in the PATH.
>
> The change I would therefore recommend is to modify the
>
> MKDIR=mkdir
> RMDIR=rmdir
>
> macros in the Makefiles to be
>
> MKDIR=md
> RMDIR=rd
>
> as this will execute the shell version of the command in all cases.
...
From: kpkoch@mit.edu
Subject: SVN Commit

Update build instructions to indicate PATH ordering; add troubleshooting tip about nmake versions.
Commit By: kpkoch



Revision: 20210
Changed Files:
U trunk/src/windows/build/bkw-automation.html