Skip Menu |
 

From: "Ben-David, Ben (BBENDAVI)" <BBENDAVI@arinc.com>
To: "krb5-bugs@mit.edu" <krb5-bugs@mit.edu>
Subject: Building Krb5 on windows
Date: Wed, 9 Jul 2014 22:59:32 +0000

Hi,

 

My goal is to use Krb5 on windows 7 – 64 bit and use the API from an application written in C code.

I’m trying to build the MIT Krb5 on windows 7 while following the steps in the README file (the one under the src\windows directory). I’m having problems running “nmake install” because of wrong path or missing files when it tries to copy all the header files/libs. I updated my local makefile to find all the files but when I reached to “copy lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."” I just couldn’t tell what lib files to copy.

Will appreciate your help with an update Makefile for windows or just an explanation of how to install krb5 on windows environment.

 

Thanks,

Ben Ben David / Software Engineer / Surface Transportation Systems
Information Management Services
4553 Glencoe Avenue, Suite 100, Marina del Rey, CA 90292 USA
Phone: 310-751-3344

bbendavi@arinc.com

 

[BBENDAVI@arinc.com - Thu Jul 10 12:47:55 2014]:

Show quoted text
> Hi,
>
> My goal is to use Krb5 on windows 7 - 64 bit and use the API from an
> application written in C code.
> I'm trying to build the MIT Krb5 on windows 7 while following the
> steps in the README file (the one under the src\windows directory).
> I'm having problems running "nmake install" because of wrong path
> or missing files when it tries to copy all the header files/libs. I
> updated my local makefile to find all the files but when I reached
> to "copy lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."" I just
> couldn't tell what lib files to copy.
> Will appreciate your help with an update Makefile for windows or just
> an explanation of how to install krb5 on windows environment.

What variables did you set before the build [and to what values]? In particular, things like
KRB_INSTALL_DIR, DEBUG, DEBUG_FILES, CPU, etc.
From: "Ben-David, Ben (BBENDAVI)" <BBENDAVI@arinc.com>
To: "rt-comment@krbdev.mit.edu" <rt-comment@krbdev.mit.edu>
Subject: RE: [krbdev.mit.edu #7963] Building Krb5 on windows
Date: Thu, 10 Jul 2014 18:39:59 +0000
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.2KiB
Hi,

CPU=AMD64
KRB_INSTALL_DIR=c:\freeware\krb

What else have to be set?
DEBUG is optional according to what I saw in the Makefile

Ben



Show quoted text
-----Original Message-----
From: Benjamin Kaduk via RT [mailto:rt-comment@krbdev.mit.edu]
Sent: Thursday, July 10, 2014 10:13 AM
To: Ben-David, Ben (BBENDAVI)
Subject: [krbdev.mit.edu #7963] Building Krb5 on windows

[BBENDAVI@arinc.com - Thu Jul 10 12:47:55 2014]:

> Hi,
>
> My goal is to use Krb5 on windows 7 - 64 bit and use the API from an
> application written in C code.
> I'm trying to build the MIT Krb5 on windows 7 while following the
> steps in the README file (the one under the src\windows directory).
> I'm having problems running "nmake install" because of wrong path
> or missing files when it tries to copy all the header files/libs. I
> updated my local makefile to find all the files but when I reached
> to "copy lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."" I just
> couldn't tell what lib files to copy.
> Will appreciate your help with an update Makefile for windows or just
> an explanation of how to install krb5 on windows environment.

What variables did you set before the build [and to what values]? In particular, things like KRB_INSTALL_DIR, DEBUG, DEBUG_FILES, CPU, etc.
[BBENDAVI@arinc.com - Thu Jul 10 14:40:04 2014]:

Show quoted text
> Hi,
>
> CPU=AMD64
> KRB_INSTALL_DIR=c:\freeware\krb
>
> What else have to be set?
> DEBUG is optional according to what I saw in the Makefile

You are correct that DEBUG is supposed to be optional, but it affects whether the makefile
attempts to install debug symbols.

Can you please specify what version of krb5 you are attempting to build (i.e., how did you get
the source tree), and also copy the exact error message(s) which are displayed?

Thanks,

Ben
From: "Ben-David, Ben (BBENDAVI)" <BBENDAVI@arinc.com>
To: "rt@krbdev.mit.edu" <rt@krbdev.mit.edu>
Subject: RE: [krbdev.mit.edu #7963] Building Krb5 on windows
Date: Thu, 10 Jul 2014 20:35:49 +0000
RT-Send-Cc:
copy lib\obj\AMD64\dbg\*.lib "c:\freeware\krb\lib\."
The system cannot find the path specified.
NMAKE : fatal error U1077: 'copy' : return code '0x1'

That's the error I'm getting after doing "nmake install"
The version is 5-1.12.1
I got it from MIT: http://web.mit.edu/kerberos/

Ben

Show quoted text
-----Original Message-----
From: Benjamin Kaduk via RT [mailto:rt@krbdev.mit.edu]
Sent: Thursday, July 10, 2014 12:04 PM
To: Ben-David, Ben (BBENDAVI)
Subject: [krbdev.mit.edu #7963] Building Krb5 on windows


[BBENDAVI@arinc.com - Thu Jul 10 14:40:04 2014]:

> Hi,
>
> CPU=AMD64
> KRB_INSTALL_DIR=c:\freeware\krb
>
> What else have to be set?
> DEBUG is optional according to what I saw in the Makefile

You are correct that DEBUG is supposed to be optional, but it affects whether the makefile attempts to install debug symbols.

Can you please specify what version of krb5 you are attempting to build (i.e., how did you get the source tree), and also copy the exact error message(s) which are displayed?

Thanks,

Ben
[BBENDAVI@arinc.com - Thu Jul 10 16:35:51 2014]:

Show quoted text
> copy lib\obj\AMD64\dbg\*.lib "c:\freeware\krb\lib\."
> The system cannot find the path specified.
> NMAKE : fatal error U1077: 'copy' : return code '0x1'

That command line would be for a debug build, which is the default (the knob is NODEBUG, not
DEBUG as I said in my previous message, sorry). Weird failures are expected if the value of
NODEBUG does not match the compiler environment (the "setenv" invocation or similar,
depending on the visual studio release in use).

Show quoted text
> That's the error I'm getting after doing "nmake install"
> The version is 5-1.12.1
> I got it from MIT: http://web.mit.edu/kerberos/

The krb5 1.NN releases are for Unix systems only and are not necessarily expected to build on
windows systems. We don't have tarballs of the source code for KfW releases on that page, but
they are available via github, e.g., https://github.com/krb5/krb5/releases/kfw-4.0.1-final .

If nothing else but to decrease the number of unknown variables, it's probably best to retry with
that source tree.
From: "Ben-David, Ben (BBENDAVI)" <BBENDAVI@arinc.com>
To: "rt@krbdev.mit.edu" <rt@krbdev.mit.edu>
Subject: RE: [krbdev.mit.edu #7963] Building Krb5 on windows
Date: Thu, 10 Jul 2014 21:40:14 +0000
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.4KiB
I understood that the krb4 was proved to be unsecured and that's why there is no support in it anymore.
Changing the NODEBUG is not helping with either value.
Is there a way to ensure that the build on windows will work?

Ben

Show quoted text
-----Original Message-----
From: Benjamin Kaduk via RT [mailto:rt@krbdev.mit.edu]
Sent: Thursday, July 10, 2014 2:05 PM
To: Ben-David, Ben (BBENDAVI)
Subject: [krbdev.mit.edu #7963] Building Krb5 on windows


[BBENDAVI@arinc.com - Thu Jul 10 16:35:51 2014]:

> copy lib\obj\AMD64\dbg\*.lib "c:\freeware\krb\lib\."
> The system cannot find the path specified.
> NMAKE : fatal error U1077: 'copy' : return code '0x1'

That command line would be for a debug build, which is the default (the knob is NODEBUG, not DEBUG as I said in my previous message, sorry). Weird failures are expected if the value of NODEBUG does not match the compiler environment (the "setenv" invocation or similar, depending on the visual studio release in use).

> That's the error I'm getting after doing "nmake install"
> The version is 5-1.12.1
> I got it from MIT: http://web.mit.edu/kerberos/

The krb5 1.NN releases are for Unix systems only and are not necessarily expected to build on windows systems. We don't have tarballs of the source code for KfW releases on that page, but they are available via github, e.g., https://github.com/krb5/krb5/releases/kfw-4.0.1-final .

If nothing else but to decrease the number of unknown variables, it's probably best to retry with that source tree.
Date: Thu, 10 Jul 2014 17:51:10 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: via RT <rt@krbdev.MIT.EDU>
Subject: RE: [krbdev.mit.edu #7963] Building Krb5 on windows
RT-Send-Cc:
On Thu, 10 Jul 2014, via RT wrote:

Show quoted text
>
> I understood that the krb4 was proved to be unsecured and that's why
> there is no support in it anymore.
> Changing the NODEBUG is not helping with either value.
> Is there a way to ensure that the build on windows will work?

Kerberos protocol version 4 is insecure.

The MIT Kerberos for Windows version 4.x series provides an implementation
of kerberos protocol version 5 that is suitable for use on Windows, along
with a GUI Ticket Manager application. I am not asking you to use
unsupported software; on the contrary, I am explicitly asking you to use
the software which is supported for this purpose.

The build on windows is expected to work if you are using a supported
version of the source tree.

-Ben
From: "Ben-David, Ben (BBENDAVI)" <BBENDAVI@arinc.com>
To: "rt@krbdev.mit.edu" <rt@krbdev.mit.edu>
Subject: RE: [krbdev.mit.edu #7963] Building Krb5 on windows
Date: Thu, 10 Jul 2014 22:10:08 +0000
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.1KiB
So version 4 of KfW is actually Kerberos version 5?
Also once I installed KfW4 how exactly can I use it? Is it adding all the environment needed? All I need to do is include krb5.h?

Show quoted text
-----Original Message-----
From: Benjamin Kaduk via RT [mailto:rt@krbdev.mit.edu]
Sent: Thursday, July 10, 2014 2:51 PM
To: Ben-David, Ben (BBENDAVI)
Subject: RE: [krbdev.mit.edu #7963] Building Krb5 on windows


On Thu, 10 Jul 2014, via RT wrote:

>
> I understood that the krb4 was proved to be unsecured and that's why
> there is no support in it anymore.
> Changing the NODEBUG is not helping with either value.
> Is there a way to ensure that the build on windows will work?

Kerberos protocol version 4 is insecure.

The MIT Kerberos for Windows version 4.x series provides an implementation of kerberos protocol version 5 that is suitable for use on Windows, along with a GUI Ticket Manager application. I am not asking you to use unsupported software; on the contrary, I am explicitly asking you to use the software which is supported for this purpose.

The build on windows is expected to work if you are using a supported version of the source tree.

-Ben
[BBENDAVI@arinc.com - Thu Jul 10 18:10:09 2014]:

Show quoted text
> So version 4 of KfW is actually Kerberos version 5?

Yes. So was KfW 3, and KfW 2.

Show quoted text
> Also once I installed KfW4 how exactly can I use it? Is it adding all
> the environment needed? All I need to do is include krb5.h?

If you just need to include krb5.h and link libkrb5, the easiest path is to just use the installer
from http://web.mit.edu/kerberos/dist/#kfw-4.0 and do a custom installation, being sure to
install the SDK component (which is not selected by default). I don't believe that there's
currently an installer option to disable the installation of MIT Kerberos.exe, but you don't need
to run that application in order to use libkrb5.

If you really want to avoid having the GUI Ticket Manager application on your machine, you can
still compile from source, and set KRB_INSTALL_DIR to the desired install tree before running
'make install' (you would then ignore the directions in the README for building an installer). But
I think you would still want to use the source tree from a KfW release, and not a Unix krb5
release.