Building HTCondor prior to 7.5.5 on Windows
Requirements
- Active-State Perl
- Microsoft Visual Studio 2008 Edition + SP1
- Microsoft Windows Server 2003 SP1 Platform SDK
NOTE: The Platform SDK's version is very important. This is the latest version that both supports Windows 2000 and does not play silly tricks with the registry. As for Microsoft Visual Studio Team System 2008, only select the x86 compiler (which is the default); otherwise, some of the environment scripts will not be written correctly (on Vista, anyway; I haven't tested this on other platforms). Not sure why this happens exactly; but if you do select the other options, the Microsoft .NET Platform directory is exported incorrectly to the environment (maybe I'll get around to reporting this to them at some point). The problem is that our command-line build depends on a tool shipped with the Microsoft .NET Platform: msbuild.exe
. It's a glorified version of make
that uses XML as it's input. What's nice about it is that it will build the project directly, rather than manually exporting Makefiles
for consumption, as was previously required.
Installation
- Install all the packages listed above to their default destinations, as some of our scripts are reliant on these locations. We do take great efforts to avoid hard-coded paths; however, some things cannot be fully auto-detected at present (sorry, but that is the state-of-the-art right now).
- The order in which you install them is also important; for instance, a Visual Studio Service Pack should be installed after Visual Studio is installed. Also, for proper integration, the Platform SDKs should be installed after Visual Studio has completed its installation, so that it will integrate gracefully with the software.
Microsoft Visual Studio Team System 2008
- Visual C#
- Visual Basic
- Visual Web Developer
- Dotfuscator Community Edition
- Unit Testing Tools
- Microsoft SQL Server 2005 Express Edition (x86)
- Crystal Reports Basic for Visual Studio 2008
Do, however, make sure to keep the Redistributable Merge Modules, as the installer (the MSI) will use these to install the correct runtime libraries in the appropriate location.
Configuration
Microsoft Windows Server 2003 SP1 Platform SDK
C:\Program Files
Instead of the default C:\Program Files (x86)
destination. This move is required because the configuration scripts that are shipped with the SDKs, which we depend upon, have the C:\Program Files
path hard-coded in them, while the installer does not.
Visual Studio 2008: Build and Run
- From the Tools menu, select Options...
- In the Options dialog, expand Project and Solutions, and select Build and Run
- On the right hand side, set the maximum number of parallel project builds to 1.
This setting is stored persistently and not in the user configuration files; therefore, you will only need to be done once per user.
Some Background
Environment
NMI
NMI user account
For details on creating the template account HTCondor, please refer to WindowsUserProfiles.
NMI Cygwin install
- You must be on the nmi private network to access the nmi cygwin mirror
- get http://cfengine/mirror/nmi_cygwin/setup.exe
- next, install from internet, root is C:\cygwin, packages dir is C:\cygwin\packages
- direct connection, add mirror http://cfengine/mirror/nmi_cygwin
- ensure view is on "Category", click thing next to All to set to "install" (install ALL packages), click next
- answer "no" to any "try again?" messages
NMI Miscellaneous config
- Right click My computer -> remote -> allow users to connect remotely
Command Prompt
- Right-click your Command Prompt shortcut, select Properties > Advanced... > Check Run as administrator
- Click OK
Visual Studio
- Right-click your Visual Studio shortcut, select Properties > Advanced... > Check Run as administrator
- Click OK
gsoap.mak
Eccentricities
gsoap.mak
(i.e. C:\Temp). The presence of this directory is required for HTCondor to compile. This will be changed for future releases.
Building
C:\workspace\source\msbuild
directory. See GitingTheCode for further details on getting the source.
From the Command-line
- Run make.bat;
- Ignore the compiler warnings, they are mostly innocuous and likely to disappear in upcoming releases;
- If there are any errors, please reffer to the Trouble Shooting sub-section bellow.
From the IDE
- Run run_msdev.bat;
- Ensure the Release "Solution Configuration" is selected (Debug is the default);
- From the Project menu, select Build Solution;
- Ignore the compiler warnings, they are mostly innocuous and likely to disappear in subsequent releases;
- If there are any errors, please refer to the Trouble Shooting sub-section bellow.
Customizing the debugger's variable value view
You need to locate a file called AUTOEXP.DAT
in your Visual C++ installation. By default it will be:
VC++ 6.0:
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\AUTOEXP.DAT
VC++ 9.0:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\autoexp.dat
After you have made the changes and saved the file, you will need to restart Visual C++ for the changes to take effect.
Trouble Shooting
set_env.bat
. You can remedy this by renaming %ProgramFiles%\Microsoft SDKs to something else while developing or compiling the HTCondor software. This will not be a problem when HTCondor drops support for Windows 2000.
Put shortly, if you do not see the following two lines in the build output:
Setting environment for using Microsoft Visual Studio 2008 x86 tools. Targeting Windows 2000 and IE 5.0 RETAIL
Then there is most certainly a problem.
That said, and paradoxical as it may sound, a build can succeed with this directory intact. It all hinges on the order in which you install the software packages. That's why we stressed the order in which you install the software packages above. If, by chance, it happens to work for you in another order, then consider yourself lucky; having tried several, this seems to be the most dependable procedure.
Packaging
Packaging a build from source code
- mkdir c:\temp\condor-7.5.2
- cd msconfig
- dorelease.bat c:\temp\condor-7.5.2
- dopackaging.bat c:\temp\condor-7.5.2 c:\temp
- After about 15 minutes,
condor-7.5.2-winnt50-x86.msi
andcondor-7.5.2-winnt50-x86.zip
will waiting for you inc:\temp
Packaging a build from NMI
- Download results.tar from NMI for platform winnt from a given build id.
- Untar into subdir c:\temp
- move c:\temp\public c:\temp\condor-v7.5.2
- rmdir c:\temp\condor-v7.5.2\testbin
- rmdir c:\temp\condor-v7.5.2\logs
- git checkout V7_5_2 (note: you need to checkout from git the same version of HTCondor that NMI built, as the packaging scripts and directives themselves are only found in the source code and not in the results.tar file)
- cd CONDOR_SRC\msconfig
- dopackaging.bat c:\temp\condor-7.5.2 c:\temp
- After about 15 minutes,
condor-7.5.2-winnt50-x86.msi
andcondor-7.5.2-winnt50-x86.zip
will waiting for you inc:\temp