1 Copyright (C) 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
\r
2 See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
\r
4 BIND 9.10 for Win32 Source Build Instructions. 02-Feb-2014
\r
6 Building BIND 9.10 on Windows has the following prerequisites:
\r
8 1) You need to install Perl for Windows. ActivePerl
\r
9 (http://www.activestate.com/) and Strawberry Perl
\r
10 (http://www.strawberryperl.com) have both been tested and found
\r
13 2) OpenSSL (http://www.openssl.org) must be downloaded and built on
\r
14 the system on which you are building BIND.
\r
16 3) If you wish to use the statistics channel, LibXML2
\r
17 (ftp://xmlsoft.org/libxml2) must be downloaded and built on
\r
18 the system on which you are building BIND.
\r
20 4) Optional external packages (not used by default)
\r
22 If you wish to use IP geolocation, GeoIP API and database must be
\r
23 downloaded, patched and built on the system on which you are building
\r
26 If you wish to use readline, the readline library must be downloaded
\r
27 and built on the system on which you are building BIND.
\r
29 5) The BIND Installer (BINDInstall) includes a copy of the
\r
30 redistributable runtime object vcredist_x86.exe (or vcredist_x64.exe),
\r
31 which is included with Visual Studio and can be downloaded from
\r
32 Microsoft. This file must be in place prior to running Configure.
\r
34 6) BIND is known to run on the following versions of Windows:
\r
35 Windows XP (with Service Pack 2 or higher), Vista, 7, 8, Server 2003,
\r
36 Server 2008, Server 2008R2, and Server 2012.
\r
38 Step 1: Download and build OpenSSL
\r
40 OpenSSL is required for DNSSEC. If you wish to build BIND 9 without
\r
41 DNSSEC support, skip to step 2.
\r
43 Download and untar the OpenSSL sources from http://www.openssl.org/.
\r
44 Extract them at in the same directory in which you extracted the BIND 9
\r
45 source: If BIND 9 is in \build\bind-9.10.0, for instance, OpenSSL should
\r
46 be in \build\openssl-1.0.1g (subject to version number changes).
\r
48 Note: Building OpenSSL requires that you install Perl as it uses it
\r
49 during its build process. The following commands work as of
\r
50 openssl-1.0.1g, but you should check the OpenSSL distribution to see
\r
51 if the build instructions in the INSTALL.W32 (or INSTALL.W64) file
\r
52 have changed, in particular for the assembler options:
\r
55 (In an x86 Visual Studio Command Prompt window)
\r
57 perl Configure --prefix=c:\openssl enable-static-engine VC-WIN32
\r
59 nmake /f ms\ntdll.mak
\r
62 (In an x64 Visual Studio Command Prompt window)
\r
64 perl Configure --prefix=c:\openssl64 enable-static-engine VC-WIN64A
\r
66 nmake /f ms\ntdll.mak
\r
68 The "enable-static-engine" option is needed when an OpenSSL engine
\r
69 will be used -- for example, when using the GOST signing algorithm or
\r
70 OpenSSL-based PKCS#11 support.
\r
72 If you wish to use OpenSSL-based PKCS#11 to control a cryptographic
\r
73 hardware service module, please see "PKCS#11 (Cryptoki) support" in
\r
74 chapter 4 of the BIND 9 Administrator Reference Guide. You will need to
\r
75 apply the patch in bind9\bin\pkcs11\openssl-1.0.1g-patch (this can be
\r
76 done using the Cygwin 'patch' utility) and add --pk11-libname and
\r
77 --pk11-flavor to the Configure command above.
\r
79 Step 2: Download and build LibXML2
\r
81 LibXML2 is required to use the statistics channel. If you wish to
\r
82 build BIND 9 without support for this feature, skip to step 3.
\r
84 Download and untar the libxml2 sources from ftp://xmlsoft.org/libxml2.
\r
85 Extract them in the same directory in which you extracted the BIND 9
\r
86 source: If BIND 9 is in \build\bind-9.10.0, for instance, libxml2 should
\r
87 be in \build\libxml2-2.9.1 (subject to version number changes).
\r
89 Now build libxml2, and copy the resulting files into the include and lib
\r
92 cd libxml2-2.9.1\win32
\r
93 cscript configure.js compiler=msvc vcmanifest=yes static=yes \
\r
95 nmake /f Makefile.msvc libxml
\r
97 Step 3: Download and build GeoIP
\r
99 Geographic ("geoip") ACLs require libGeoIP. If you wish to build BIND 9
\r
100 without support for this feature, skip to step 4.
\r
102 The libGeoIP source code is available from:
\r
104 https://github.com/maxmind/geoip-api-c/releases.
\r
106 As of this writing, the current version of libGeoIP is 1.6.0. There
\r
107 is a known bug in this and all prior versions which prevents it from
\r
108 building a suitable DLL with thread support on Windows. You can apply
\r
109 the patch file bind9/win32utils/GeoIP.diff to address the problem.
\r
110 This patch has been submitted upstream, and will be included in
\r
111 future versions of libGeoIP.
\r
113 Step 4: Download and build Readline
\r
115 The readline library adds command-line editing in nslookup and nsupdate.
\r
116 If you wish to build BIND 9 without support for this feature, skip to
\r
119 Because the original GNU source for the readline library has no WIN32
\r
120 support, it will be necessary to download a version of the static
\r
121 readline library source that is ready to be built by Visual Studio. One
\r
122 such version is available at:
\r
124 http://gpsim.sourceforge.net/gpsimWin32/gpsimWin32.html#readline_lib
\r
126 Step 5: Make the redistributable runtime object available
\r
128 Check that the Microsoft redistributable object (vcredist_x86.exe or
\r
129 vcredist_x64.exe) is available to the build. The file may be placed
\r
130 in the directory in which the BIND 9 source was extracted (for
\r
131 instance, if BIND 9 is in \build\bind-9.10.0, the redistributable
\r
132 may be placed in \build\vcredist_x86.exe). Or, the path to the file
\r
133 can be specified via the VCREDIST_PATH environment variable, or via
\r
134 the "with-vcredist=PATH" option to the configuration script (see
\r
135 step 4). If none of these options is used, Configure will attempt to
\r
136 find the redistributable based on clues in the build environment.
\r
138 Step 6: Configuring the BIND build
\r
140 From the command prompt, cd to the win32utils directory under
\r
143 cd bind-9.10.0\win32utils
\r
145 In this directory, you can prepare the Windows build by running:
\r
147 perl Configure <options> win32
\r
151 perl Configure <options> x64
\r
153 This will set up all the files needed for building BIND 9 according
\r
154 to the given options. To see the available options, run:
\r
156 perl Configure help
\r
158 To remove all files generated by Configure, run:
\r
160 perl Configure clean
\r
162 Step 7: Building BIND
\r
164 To build using 'nmake' or older versions of Visual Studio (e.g.
\r
165 VS 2005 or VS 2008), go to the legacy subdirectory:
\r
169 and follow the instructions in win32-build.txt.
\r
171 Note: Only 32-bit builds are supported in this mode.
\r
173 To build using the Visual Studio GUI in VS 2010 or VS 2012:
\r
174 open the bind9.sln solution file; this will load the project
\r
175 files for all of the BIND 9 libraries and applications. Select
\r
176 "Build->Batch Build", click "Select All", then click "Build".
\r
178 To build using MSBuild in VS 2010 or VS 2012: call MSBuild on
\r
179 the bind9.sln solution file:
\r
181 msbuild /t:Build /p:Configuration=Release bind9.sln
\r
182 msbuild /t:Build /p:Configuration=Debug bind9.sln
\r
184 Note: This mode does not support building for Windows XP.
\r
188 Installation is accomplished by running the BINDInstall program. All
\r
189 DLL's are copied to the Program Files area and all applications
\r
190 (including BINDInstall which may be necessary for uninstalling BIND
\r
191 9) to the bin directory. If BIND 8 has previously been installed on
\r
192 the system it must be uninstalled first by running it's own
\r
193 BINDInstall program. The BIND 9 installer does not yet do this.
\r
195 Note: BINDInstall.exe requires the MFC (Microsoft Foundation Class).
\r
196 This is only distributed with non-free (i.e., not "Express") versions of
\r
197 Visual Studio. The other BIND 9 libraries and applications do not have
\r
200 Please report bugs, whether in the process of building the application
\r
201 or in BIND 9 itself, to bind9-bugs@isc.org.
\r