[OpenAFS-devel] Compiling the native Windows client

Matt Benjamin matt@linuxbox.com
Thu, 09 Apr 2009 12:27:20 -0400


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Peter,

Well, you do need to adapt accordingly.

For my setup, which is vs2005, wsdk 6001, and wdk for (iirc) server
2008, I use the slightly messy invocation:

32bit:

call "C:\VS8\VC\bin\vcvars32.bat"
call "c:\wsdk61\Bin\SetEnv.Cmd" /x86 /xp /DEBUG
call "C:\VS8\VC\bin\vcvars32.bat"
set
PATH=3DC:\Windows\System32;%PATH%;c:\cygwin\bin;c:\wix2058;C:\PROGRA~1\DE=
BUGG~1\

64bit:

call "C:\VS8\VC\bin\amd64\vcvarsamd64.bat"
call "c:\wsdk61\Bin\SetEnv.Cmd" /x64 /xp /DEBUG
call "C:\VS8\VC\bin\amd64\vcvarsamd64.bat"
set
PATH=3DC:\Windows\System32;%PATH%;c:\cygwin\bin;c:\wix2058;C:\PROGRA~1\DE=
BUGG~1\

For ntbuild.bat, I have ntbuild32.bat and ntbuild64.bat--as you work,
you need to change normally only AFSROOT:

/afs/umich.edu/user/m/b/mbenj/Public/bldwxx/ntbuild32.bat
/afs/umich.edu/user/m/b/mbenj/Public/bldwxx/ntbuild64.bat

Also depending on the wdk, you may need to change a line in
src\WINNT\afsrdr\NTMakefile such that the build.exe is passed "x64"
rather than "AMD64" where it creates the ddkbuild.cmd.

I think the top level NTMakefile README-NT tells you to copy from
src\NTMakefile doesn't (on the IFS branch only) define,

DOC=3D$(AFSROOT)\doc

at the top, add that if you find it doesn't.  Also, if your nmake.exe is
from VS9 (which mine is, for some reason, even though I do all AFS
builds with VS8), change

DOCD=3D$(SRC)\DOLASTCMP.BAT

to

DOCD=3Dcall $(SRC)\DOLASTCMP.BAT

in that file too (unless you're concerned about the fact that I don't
precisely know why this works, which I don't--in which case, just use
another nmake.exe).

Btw, I use the Perl from Cygwin for the bits that need that, seemingly
without issue.

You probably don't want the flex and bison definitions in my
ntbuild*.bats, but, fwiw, I use the Monmouth win32 bison port, and have
updated the bison templates slightly for the recent compilers.  You
shouldn't I think need to worry about that (I have a windows afs project
where I do, and just try to keep consistent).

For posterity, here is:

/afs/umich.edu/user/m/b/mbenj/Public/bldwxx/bison.hairy
/afs/umich.edu/user/m/b/mbenj/Public/bldwxx/bison.simple

vs2008

Some time ago I put a patch for vs2008 in RT.  Built and worked for some
definition of, MSI installer only.  You might find it helpful to pick
over, most things are self-evident or mentioned above.

http://rt.central.org/rt/Ticket/Display.html?id=3D123903

Alternatively, you can definitely get vs2005 with an MSDN professional
subscription.

Hope this helps,

Matt

Peter Hallberg wrote:
>> You need the full kdfs branch build. The areas in which there are
>> ifs specific changes are the afsd_service.exe (src/WINNT/afsd),
>> the new driver code (src/WINNT/afsrdr), and the pioctl interface
>> (src/sys)
>=20
> The driver build clean using the WDK but for the full build I have a qu=
estion, the documentation in the file README-NT says:
> STEP F. Begin the build
> ...
> (3) Configure the environment variables:
> ...
>     For a debug build:
> ...
>     (b) Execute the SETENV.BAT file with the parameters "/2000 /DEBUG"
>=20
> But there are no file named setenv.bat in the openafs source tree and t=
he one in the WDK takes different kind of parameters?
>=20
> Also, can Visual Studio 2003 be used or is only 2005 supported, the doc=
umentation says that 2003 also is supported but earlier in this thread on=
ly 2005 was mentioned?
>=20
> _________________________________________________________________
> V=E5rk=E4nslor och pirr i magen? Hitta din dr=F6mpartner h=E4r!
> http://dejting.se.msn.com/channel/index.aspx?trackingid=3D1002952______=
_________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel




- --

Matt Benjamin

The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI  48104

http://linuxbox.com

tel. 734-761-4689
fax. 734-769-8938
cel. 734-216-5309


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ3iHoJiSUUSaRdSURCFY7AJ4g5Vh9TQ69JkKYsHKMuAMyNl6orACdEQLu
ekCXI1LBnzG5Sim+rulv7sE=3D
=3D8yjt
-----END PGP SIGNATURE-----