Skip Menu |
 

Date: Tue, 25 Nov 2014 14:42:19 +0100
Subject: Re: [krb5] Unable to build under Windows (#235)
From: Bratislav Stojanovic <bratislav1983@gmail.com>
To: krb5-bugs@mit.edu, kaduk@mit.edu
Download (untitled) / with headers
text/plain 3.9KiB
Hi Ben,

Thanks for answering, but I'm still completely clueless. This time I've wiped out VS2013 and installed VS2010 (Ultimate) and tried
again - still the same.

When I switched from ActivePerl to Strawberry, I got slightly different error code :

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        copy/b nul:+ win-mac.h autoconf.h
nul
win-mac.h
        1 file(s) copied.
        copy/b nul:+ osconf.hin osconf.h
nul
osconf.hin
        1 file(s) copied.
        copy /y krb5\krb5.h+k5-int.h+krb5\clpreauth_plugin.h private-and-public-
decls
krb5\krb5.h
k5-int.h
krb5\clpreauth_plugin.h
        1 file(s) copied.
        perl -w .\../util/def-check.pl private-and-public-decls .\../lib/krb5_32.def
_error_table' at .\../util/def-check.pl line 175, <GEN0> line 8448.
NMAKE : fatal error U1077: 'C:\Strawberry\perl\bin\perl.EXE' : return code '0x19'
Stop.
NMAKE : fatal error U1077: 'for' : return code '0x1'
Stop.

awk - I've renamed awk script from the Windows\SUA\bin into awk.exe and copied into C:\awk (available in PATH).
When I run awk from SDK 7.1 command prompt, it seems everything is fine :

c:\Users\User\Downloads\krb5\src>awk
Usage: awk [-f programfile | 'program'] [-Ffieldsep] [-v var=value] [files]

procedure - Here's the complete procedure I'm using :

- installed VS2010 Ultimate
- installed SDK 7.1
- installed latest updates from Windows Update
- installed the latest subsystem for UNIX-based apps for Windows 7 (hmm, instructions at
- installed WiX 3.5 using the installer (not binary package)
- updated PATH so candle.exe is available

candle.exe - also works from cmd prompt :

c:\Users\User\Downloads\krb5\src>candle.exe --help
Microsoft (R) Windows Installer Xml Compiler version 3.5.2519.0
Copyright (C) Microsoft Corporation. All rights reserved.

 usage:  candle.exe [-?] [-nologo] [-out outputFile] sourceFile [sourceFile ...]
 [@responseFile]

   -arch      set platform defaults for package, components, etc.
              values: x86, x64, or ia64 (default: x86)
...

source code - tried both master and kfw-4.0.1-final branches (which one should I use?). Result is the same.

vs cmd prompt - tried to use VS command prompt instead of SDK 7.1 cmd - again the same error

From the error it looks like I'm missing something as def-check.pl script fails to find _error_table, but have
no clue why (where should I get _error_table from?).

Please help.


On Mon, Nov 24, 2014 at 7:10 PM, kaduk <notifications@github.com> wrote:
Show quoted text

I'm going to close this github issue, since we are using a mixed workflow which only uses github pull requests, and keeps bug/issue tracking on our RT instance at krbdev.mit.edu. Please follow-up with mail to krb5-bugs@mit.edu.

That said, I believe the current git master (6649798) is buildable on windows, at least on my test system which is running Windows 7 Enterprise and using Visual Studio 2010. Perhaps I should have a test system with Visual Studio 2013 around just on general principles; I'll see if I can work on that.

The first thing that comes to mind as a potential issue is the availability of 'awk', though I don't remember its absence presenting in this fashion. In the command prompt from which you're running nmake, can you successfully run awk (just 'awk' should print a usage message)?

If that works as expected, can you send the full list of what you did for each of the steps 1 through 6 in your email? I am also slightly curious what the error message looks like when Strawberry Perl is used, though I agree with you that the perl is unlikely to actually be the culprit.

-Ben


Reply to this email directly or view it on GitHub.




--
Bratislav Stojanovic, M.Sc.
Date: Tue, 25 Nov 2014 23:57:58 -0500 (EST)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Bratislav Stojanovic <bratislav1983@gmail.com>
Subject: Re: [krb5] Unable to build under Windows (#235)
CC: krb5-bugs@MIT.EDU
Download (untitled) / with headers
text/plain 2.6KiB
On Tue, 25 Nov 2014, Bratislav Stojanovic wrote:

Show quoted text
> Thanks for answering, but I'm still completely clueless. This time I've
> wiped out VS2013 and installed VS2010 (Ultimate) and tried
> again - still the same.

I was pretty clueless for a while, but staring at it for a bit, I have a
little bit of a better handle on what the messages mean, at least.

Note that the version of Wix is completely irrelevant here; WiX is not
used until step 9 when the installer is built.

The version of Visual Studio should also be irrelevant, as no actual
compiling is going on yet. The only thing that might be relevant is if
some details of the environment in the shell are different.

Show quoted text
> private-and-public-
> decls
> krb5\krb5.h
> k5-int.h
> krb5\clpreauth_plugin.h
> 1 file(s) copied.
> perl -w .\../util/def-check.pl private-and-public-decls
> .\../lib/krb5_32.def
> *_error_table'* at .\../util/def-check.pl line 175, <GEN0> line 8448.

The particular error codes below are not very helpful; the above line is
where we're going to get traction.

This seems to be the truncation of the output of line 175 of def-check.pl:

die "Invalid function name: '$_'" if (!/^[A-Za-z0-9_]+$/);

The '<GEN0>' should correspond to the first file being processed, i.e.,
krb5.h. I am not in front of my test VM right now, but the krb5.h in my
Unix build tree has near line 8448 this chunk:

8449 #if !defined(_WIN32)
8450 /* for compatibility with older versions... */
8451 extern void initialize_krb5_error_table (void) /*@modifies internalState@*/;
8452 #else
8453 #define initialize_krb5_error_table()
8454 #endif

Note that the not-_WIN32 case lacks a KRB5_CALLCONV specifier on the
declaration, which would cause the quoted perl error.

So, I am guessing that _WIN32 is for some reason not defined at some
point, and it should be.

First, it would be good to manually run the perl script over krb5.h and
see if the full output can be obtained.

Second, it would be good to check what the environment looks like in your
build shell (there's probably no need to paste the full output of 'set',
but some parts may be relevant). I will try to look further into where
_WIN32 is defined in my (working) build.


Show quoted text
> *NMAKE : fatal error U1077: 'C:\Strawberry\perl\bin\perl.EXE' : return code
> '0x19'*
> Stop.
> NMAKE : fatal error U1077: 'for' : return code '0x1'
> Stop.
>
[...]

Show quoted text
> *vs cmd prompt* - tried to use VS command prompt instead of SDK 7.1 cmd -
> again the same error

With the SDK 7.1 cmd, I might try throwing another 'setenv.exe /x86'
invocation in there "just to be sure" -- I thought that setenv was run as
part of the startup for the SDK cmd, but could be wrong.

-Ben
Date: Wed, 26 Nov 2014 09:22:18 +0100
Subject: Re: [krb5] Unable to build under Windows (#235)
From: Bratislav Stojanovic <bratislav1983@gmail.com>
To: Benjamin Kaduk <kaduk@mit.edu>, krb5-bugs@mit.edu
Download set_output.txt
text/plain 4.4KiB

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 3.6KiB
setenv /x86 doesn't help - still the same. I've even tried setenv /x64 (along
with setting other x64 changes) - again the same error emerge.

Here's the output of the "set" command (attached set_output.txt).

I've tried to manually run def-check.pl and here's the output :

c:\Users\User\Downloads\krb5\src>cd include

c:\Users\User\Downloads\krb5\src\include>perl -w .\../util/def-check.pl private-
and-public-decls .\../lib/krb5_32.def
_error_table' at .\../util/def-check.pl line 175, <GEN0> line 7896.

If I chnage command to use absolute paths, still the same output.

I accidentally found --with-system-et param in the official install documentation, not sure
if this is somehow related to this problem. Hmm, 'et' stands for error_table, but I'm not sure how
to enable/disable this param.

On Wed, Nov 26, 2014 at 5:57 AM, Benjamin Kaduk <kaduk@mit.edu> wrote:
Show quoted text
On Tue, 25 Nov 2014, Bratislav Stojanovic wrote:

> Thanks for answering, but I'm still completely clueless. This time I've
> wiped out VS2013 and installed VS2010 (Ultimate) and tried
> again - still the same.

I was pretty clueless for a while, but staring at it for a bit, I have a
little bit of a better handle on what the messages mean, at least.

Note that the version of Wix is completely irrelevant here; WiX is not
used until step 9 when the installer is built.

The version of Visual Studio should also be irrelevant, as no actual
compiling is going on yet.  The only thing that might be relevant is if
some details of the environment in the shell are different.

> private-and-public-
> decls
> krb5\krb5.h
> k5-int.h
> krb5\clpreauth_plugin.h
>         1 file(s) copied.
>         perl -w .\../util/def-check.pl private-and-public-decls
> .\../lib/krb5_32.def
> *_error_table'* at .\../util/def-check.pl line 175, <GEN0> line 8448.

The particular error codes below are not very helpful; the above line is
where we're going to get traction.

This seems to be the truncation of the output of line 175 of def-check.pl:

die "Invalid function name: '$_'" if (!/^[A-Za-z0-9_]+$/);

The '<GEN0>' should correspond to the first file being processed, i.e.,
krb5.h.  I am not in front of my test VM right now, but the krb5.h in my
Unix build tree has near line 8448 this chunk:

  8449  #if !defined(_WIN32)
  8450  /* for compatibility with older versions... */
  8451  extern void initialize_krb5_error_table (void) /*@modifies internalState@*/;
  8452  #else
  8453  #define initialize_krb5_error_table()
  8454  #endif

Note that the not-_WIN32 case lacks a KRB5_CALLCONV specifier on the
declaration, which would cause the quoted perl error.

So, I am guessing that _WIN32 is for some reason not defined at some
point, and it should be.

First, it would be good to manually run the perl script over krb5.h and
see if the full output can be obtained.

Second, it would be good to check what the environment looks like in your
build shell (there's probably no need to paste the full output of 'set',
but some parts may be relevant).  I will try to look further into where
_WIN32 is defined in my (working) build.


> *NMAKE : fatal error U1077: 'C:\Strawberry\perl\bin\perl.EXE' : return code
> '0x19'*
> Stop.
> NMAKE : fatal error U1077: 'for' : return code '0x1'
> Stop.
>
[...]

> *vs cmd prompt* - tried to use VS command prompt instead of SDK 7.1 cmd -
> again the same error

With the SDK 7.1 cmd, I might try throwing another 'setenv.exe /x86'
invocation in there "just to be sure" -- I thought that setenv was run as
part of the startup for the SDK cmd, but could be wrong.

-Ben



--
Bratislav Stojanovic, M.Sc.
Date: Wed, 26 Nov 2014 13:51:40 -0500 (EST)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Bratislav Stojanovic <bratislav1983@gmail.com>
Subject: Re: [krbdev.mit.edu #8043] [krb5] Unable to build under Windows (#235)
CC: krb5-bugs@MIT.EDU
RT-Send-Cc:
On Wed, 26 Nov 2014, Bratislav Stojanovic wrote:

Show quoted text
> I've tried to manually run def-check.pl and here's the output :
>
> c:\Users\User\Downloads\krb5\src>cd include
>
> c:\Users\User\Downloads\krb5\src\include>perl -w .\../util/def-check.pl
> private-
> and-public-decls .\../lib/krb5_32.def
> _error_table' at .\../util/def-check.pl line 175, <GEN0> line 7896.

Hmm, 7896 != 8448.

def-check.pl has a "verbose output" mode, so you could try

perl -w ../util/def-check.pl -v private-and-public-decls ../lib/krb5_32.def

You should probably also post the contents of your
private-and-public-decls and krb5_32.def files, just in case something is
not right with their contents.

Show quoted text
> I accidentally found --with-system-et param in the official install
> documentation, not sure
> if this is somehow related to this problem. Hmm, 'et' stands for
> error_table, but I'm not sure how
> to enable/disable this param.

That's only useful as an argument to the 'configure' script, which is not
used for windows builds.

-Ben
Date: Mon, 1 Dec 2014 15:07:41 -0500 (EST)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Bratislav Stojanovic <bratislav1983@gmail.com>
Subject: Re: [krbdev.mit.edu #8043] [krb5] Unable to build under Windows (#235)
CC: krb5-bugs@MIT.EDU
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.8KiB
On Thu, 27 Nov 2014, Bratislav Stojanovic wrote:

Show quoted text
> > perl -w ../util/def-check.pl -v private-and-public-decls
> ../lib/krb5_32.def
> _error_table' at ../util/def-check.pl line 175, <GEN0> line 7896.
>
> Requested files attached.

Okay, I can reproduce something similar to this error, using your
private-and-public-decls file. It seems to be tied to the DOS line
endings (CL+LF) -- if I strip the carriage returns from the file, I get
some more sensible results. (Note this is with a normal Unix perl on a
mac, not directly in my windows VM.)

I'm not sure where the configuration knob is going to be which affects the
type of line endings in use, though.

-Ben

Show quoted text
> On Wed, Nov 26, 2014 at 7:51 PM, Benjamin Kaduk <kaduk@mit.edu> wrote:
>
> > On Wed, 26 Nov 2014, Bratislav Stojanovic wrote:
> >
> > > I've tried to manually run def-check.pl and here's the output :
> > >
> > > c:\Users\User\Downloads\krb5\src>cd include
> > >
> > > c:\Users\User\Downloads\krb5\src\include>perl -w .\../util/def-check.pl
> > > private-
> > > and-public-decls .\../lib/krb5_32.def
> > > _error_table' at .\../util/def-check.pl line 175, <GEN0> line 7896.
> >
> > Hmm, 7896 != 8448.
> >
> > def-check.pl has a "verbose output" mode, so you could try
> >
> > perl -w ../util/def-check.pl -v private-and-public-decls
> > ../lib/krb5_32.def
> >
> > You should probably also post the contents of your
> > private-and-public-decls and krb5_32.def files, just in case something is
> > not right with their contents.
> >
> > > I accidentally found --with-system-et param in the official install
> > > documentation, not sure
> > > if this is somehow related to this problem. Hmm, 'et' stands for
> > > error_table, but I'm not sure how
> > > to enable/disable this param.
> >
> > That's only useful as an argument to the 'configure' script, which is not
> > used for windows builds.
Download (untitled) / with headers
text/plain 1.3KiB
[kaduk@MIT.EDU - Mon Dec 1 15:14:20 2014]:

Show quoted text
> On Thu, 27 Nov 2014, Bratislav Stojanovic wrote:
>
> > > perl -w ../util/def-check.pl -v private-and-public-decls
> > ../lib/krb5_32.def
> > _error_table' at ../util/def-check.pl line 175, <GEN0> line 7896.
> >
> > Requested files attached.
>
> Okay, I can reproduce something similar to this error, using your
> private-and-public-decls file. It seems to be tied to the DOS line
> endings (CL+LF) -- if I strip the carriage returns from the file, I
> get
> some more sensible results. (Note this is with a normal Unix perl on
> a
> mac, not directly in my windows VM.)
>
> I'm not sure where the configuration knob is going to be which affects
> the
> type of line endings in use, though.

The file in question should be generated with:

copy /y krb5\krb5.h+k5-int.h+krb5\clpreauth_plugin.h $@

So, that makes me wonder what sort of line endings are in the input files for copy.exe
(krb5\krb5.h and friends) -- what procedure did you use to get the krb5 checkout on your
windows machine? I have been going through VMware shared folders, something like 'git
archive|(cd /share; tar x)' and then just copying the tree using Windows Explorer. I would
imagine that using a native windows git client would have different line-endings behavior,
depending on that git client's configuration.

-Ben