[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Update build instructions for Win32 platform.

From: Martin Tomes <lists_at_tomes.org>
Date: 2004-04-23 14:10:06 CEST

Update the instructions for building Subversion on the Win32 platform.

The new instructions are split into sections which describe what is needed, how to prepare the files
(unpacking, environment etc.) and how to actually build the binaries with all available options
turned on.

    * INSTALL
      Update Win32 build instructions.

-- 
Martin Tomes
echo 'Martin x Tomes at controls x eurotherm x co x uk'\
  | sed -e 's/ x /\./g' -e 's/ at /@/'

Index: INSTALL
===================================================================
--- INSTALL (revision 9455)
+++ INSTALL (working copy)
@@ -161,1 +161,1 @@
       4. Neon library 0.24.5 (http://www.webdav.org/neon/)

       The Neon library allows a Subversion client to interact with remote
- repositories over the Internet via a WebDAV based protocol. If you
- want to use Subversion to connect to a server over ra_dav (via a
- http:// or https:// url), you will require Neon.
+ repositories over the Internet via a WebDAV based protocol. If you
+ want to use Subversion to connect to a server over ra_dav (via a
+ http:// or https:// url), you will require Neon.

       The Neon library source code can be installed in "./neon" if you
       want Subversion to build it. The source code is included with the
@@ -578,2 +578,2 @@
   E. Building the Latest Source under Windows
       ----------------------------------------

- (These instructions assume you have already installed Subversion
- and checked out a Subversion working copy. See the section
- "Bootstrapping from a Zip or Installer File under Windows" above
- for more.)
+ E.1 Prerequisites

- There is some support for building Subversion on Win32
- platforms. The project files generated by gen-make.py are for
- Microsoft Visual C++ 6.x; earlier versions of the compiler are
- not supported. You'll also need a fairly recent version of the
- Microsoft Platform SDK; the header files that come with MSVC 6.x
- are too old.
+ * Visual Studio 6 with the latest service pack. It can be built
+ with Visual Studio 7 but these instructions assumes VS6.
+ * A recent Windows SDK, the one provided with Visual Studio 6 are
+ too old. You only need the 'Core SDK'. You can get one from MSDN
+ if you have it or from
+ http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ if you
+ don't.
+ * Python 2.2, downloaded from http://www.python.org/ which is
+ used to generate the project files.
+ * Perl 5.8 from http://www.activestate.com/
+ * Neon 0.24.2, downloaded from
+ http://www.webdav.org/neon/neon-0.24.4.tar.gz which is required
+ for building the client components.
+ * Berkeley DB is required for support for local server components,
+ version 4.2.52 is available from
+ http://subversion.tigris.org/servlets/ProjectDocumentList as
+ db-4.2.52-win32.zip. For more information see Section I.5.
+ * Apache 2 source, downloaded from
+ http://httpd.apache.org/download.cgi, these instructions assume
+ version 2.0.49.
+ * Apache 2 msi install file, also from
+ http://httpd.apache.org/download.cgi (required for running the
+ tests)
+ * Zlib 1.1.3 from
+ http://www.gzip.org/zlib/contrib/zlib113-win32.zip
+ * openssl-0.9.7c.tar.gz obtained from
+ http://www.openssl.org/source/
+ * An assembler, e.g., nasm which is avaliable from
+ http://www.kernel.org/pub/software/devel/nasm/binaries/win32/
+ * For localization gnu gettext is needed. Get
+ gettext-runtime-0.12.1.bin.woe32.zip,
+ gettext-tools-0.12.1.bin.woe32.zip, and
+ libiconv-1.9.1.bin.woe32.zip from http://mirrors.kernel.org/gnu
+ * The latest version of apr-util (see Section I.1) must be told
+ where to find the Berkeley DB include files and libraries. You
+ can do this with the w32locatedb.pl script (located in the
+ "build" directory in the apr-util sources), which modifies
+ apr-util's header and DSP files. The instructions at the top of
+ the script file explain how to use the script.

- To generate the project files, you will need Python 2.2 for Windows
- installed. Installing Python will also allow you to run the test
- suite after you build the source.
+ If your copy of apr-util does not contain build\w32locatedb.pl,
+ you can download a recent version from here:

- To build the client components, you'll need a copy of neon
- 0.24.5. See section I.4 for details on where to get one and
- what to do with it when you get it.
+ http://subversion.tigris.org/files/documents/15/8705/w32locatedb.pl

- [NOTE: The neon library supports secure connections with OpenSSL
- and on-the-wire compression with zlib. If you want to use
- those features, you should pass the options "--with-zlib" and
- "--with-openssl" to the gen-make.py script. See Section I.10
- for more details.]
+ You will need Perl 5.8 to run this script.
+ * A Subversion client binary from http://subversion.tigris.org/ to
+ do the initial checkout of the Subversion source. See the section
+ "Bootstrapping from a Zip or Installer File under Windows" above
+ for more.
+ * A means of unpacking the files. Native Win32 versions of gunzip,
+ tar and unzip can be found at http://unxutils.sourceforge.net/.
+ If you have WinZip that will also unpack the files.

+ E.2 Notes
+
+ The neon library supports secure connections with OpenSSL and
+ on-the-wire compression with zlib. If you want to use those
+ features, you should pass the options "--with-zlib" and
+ "--with-openssl" to the gen-make.py script. See Section I.10 for
+ more details.
+
       If you are installing under Win9x, NT4, or WinME, and svn.exe
       doesn't run, try installing shfolder.dll from here:

           http://download.microsoft.com/download/platformsdk/Redist/5.50.4027.300/W9XNT4/EN-US/shfinst.EXE

- If you want to build the (local) server components, you'll also
- need a copy of Berkeley DB, version 4.0.14 or newer (version 4.2.52
- is preferred). Details are in Section I.5. For your convenience,
- there is also a binary distribution on the Subversion downloads
- page
+ E.3 Preparation

- http://subversion.tigris.org/servlets/ProjectDocumentList
+ This section descibes how to unpack the files to make a build tree.

- The file there is named
+ * Make a directory SVN and cd into it.
+ * Checkout the version of Subversion you require:

- db-4.2.52-win32.zip
+ svn co http://svn.collab.net/repos/svn/trunk/ src

- Unpack the distribution into the root directory of the Subversion
- source tree as <SVN>\db4-win32. It's a good idea to add
- <SVN>\db4-win32\bin to your PATH, so that Subversion can find the
- Berkeley DB DLLs.
+ * Install Visual Studio 6
+ * Install a recent Windows Core SDK
+ * Register the SDK with Visual Studio 6. This is a quote from the
+ Microsoft February 2003 SDK documentation:

- [NOTE: This binary package of Berkeley DB is provided for
- convenience only. Please don't address questions about
- Berkeley DB that aren't directly related to using Subversion
- to the project mailing list.]
+ "To register the SDK bin, include, and library directories with
+ Microsoft Visual StudioŽ version 6.0 and Visual Studio .NET,
+ click Start, point to All Programs, point to Microsoft Platform
+ SDK February 2003, point to Visual Studio Registration, and then
+ click Register PSDK Directories with Visual Studio. This
+ registration process places the SDK bin, include, and library
+ directories at the beginning of the search paths, which ensures
+ that the latest headers and libraries are used when building
+ applications in the IDE. Note that for Visual Studio 6.0
+ integration to succeed, Visual Studio 6.0 must run at least once
+ before you select Register PSDK Directories with Visual
+ Studio. Also note that when this option is run, the IDEs should
+ not be running."

- If you build Berkeley DB from the source, you will have to copy
- the file db-4.2.52\build_win32\db.h to <SVN>\db4-win32\include,
- and all the import libraries to <SVN>\db4-win32\lib. Again, the
- DLLs should be somewhere in your path.
+ * Install Python
+ * Install Perl
+ * Install Apache 2 using the msi file
+ * Extract neon into SVN\src\neon
+ * Extract the Berkeley DB files into SVN\src\db4-win32. It's a good
+ idea to add SVN\db4-win32\bin to your PATH, so that Subversion
+ can find the Berkeley DB DLLs.

- The latest version of apr-util (see Section I.1) must be told
- where to find the Berkeley DB include files and libraries. You
- can do this with the w32locatedb.pl script (located in the "build"
- directory in the apr-util sources), which modifies apr-util's
- header and DSP files. The instructions at the top of the script
- file explain how to use the script.
+ [NOTE: This binary package of Berkeley DB is provided for
+ convenience only. Please don't address questions about
+ Berkeley DB that aren't directly related to using Subversion
+ to the project mailing list.]

- If your copy of apr-util does not contain build\w32locatedb.pl,
- you can download a recent version from here:
+ If you build Berkeley DB from the source, you will have to copy
+ the file db-4.2.52\build_win32\db.h to <SVN>\db4-win32\include,
+ and all the import libraries to <SVN>\db4-win32\lib. Again, the
+ DLLs should be somewhere in your path.

- http://subversion.tigris.org/files/documents/15/8705/w32locatedb.pl
+ * Extract Apache source into SVN\http-2.0.49
+ * Extract the pre-built zlib into SVN\http-2.0.49\srclib\zlib
+ * Extract openssl into SVN\openssl-0.9.7c
+ * Extract nasm into SVN\nasm and put it in your path
+ * Put the w32locatedb.pl script in
+ httpd-2.0.49\srclib\apr-util\build\w32locatedb.pl
+ * Make a directory SVN\gettext and unpack
+ gettext-runtime-0.12.1.bin.woe32.zip,
+ gettext-tools-0.12.1.bin.woe32.zip, and
+ libiconv-1.9.1.bin.woe32.zip into it. Add SVN\gettext\bin to your
+ path, SVN\gettext\include to your INCLUDE path and
+ SVN\gettext\lib to your LIB path environment variables. You can
+ add these on the command line as shown below.

- You will need Perl 5.8 to run this script.
+ E.4 Building the Binaries

- To build the Apache module, you will also need the Apache 2.0.49
- or later Win32 source. You can download it from here:
+ Start in the SVN directory you created.

- http://httpd.apache.org/download.cgi
+ OpenSSL

- Finally, you will need to copy the Apache apr libraries into the
- root of the Subversion source tree.
+ C:\SVN> cd openssl-0.9.7c
+ C:\SVN\openssl-0.9.7c> perl Configure VC-WIN32
+ C:\SVN\openssl-0.9.7c> ms\do_nasm
+ C:\SVN\openssl-0.9.7c> nmake -f ms\ntdll.mak
+ C:\SVN\openssl-0.9.7c\out32dll> cd out32dll
+ C:\SVN\openssl-0.9.7c\out32dll> ..\ms\test
+ C:\SVN\openssl-0.9.7c\out32dll> cd ..\..

- [NOTE: Subversion can use the gettext tools and library for localization
- support. Use the "--enable-nls" option to the gen-make.py script.
- You will need a working gettext development installation with it's
- 'bin' directory in your system's PATH and it's 'include' and 'lib'
- directories in your system's INCLUDE and LIB paths. The runtime
- packages from http://mirrors.kernel.org/gnu
- (gettext-runtime-0.12.1.bin.woe32.zip,
- gettext-tools-0.12.1.bin.woe32.zip, and libiconv-1.9.1.bin.woe32.zip)
- have been tested and are known to work.]
+ Apache 2

- Walkthrough:
+ C:\SVN> perl httpd-2.0.49\srclib\apr-util\build\w32locatedb.pl dll src\db4-win32\include src\db4-win32\lib
+ C:\SVN> msdev httpd-2.0.49\apache.dsw /MAKE "BuildBin - Win32 Release"

- Unzip the Apache source, copy the w32locatedb.pl script to the
- srclib\apr-util\build directory, and run it to prepare the
- apr-util sources.
+ Subversion

- Open the Apache.dsw file and build the Apache source. If you
- don't compile Apache, mod_dav_svn will not build.
+ Things to note:

- Run "python gen-make.py -t dsp --with-httpd=<path-to-httpd>"
- to generate the Visual C++ 6.x project files. If you don't
- want to build mod_dav_svn, omit the --with-httpd option. In
- this case, you will have to tell the generator where to find
- the APR libraries; the options are --with-apr, --with-apr-util
- and --with-apr-iconv.
- Run "python gen-make.py -help" to see other options.
+ * gen-make.py is supposed to configure the build to use apr* from
+ the Apache build, it doens't work so the built apr* files have to
+ be copied from the Apache build to the src directory.
+ * The generated dsw file doesn't build all of the tests so there
+ are explicit msdev commands to build test_utf and test_ra_local.
+ * If you don't want to build mod_dav_svn, omit the --with-httpd
+ option. In this case, you will have to tell the generator where
+ to find the APR libraries; the options are --with-apr,
+ --with-apr-util and --with-apr-iconv.
+ * If you would like a debug build substitute Debug for Release in
+ the msdev commands.
+ * There have been rumors that Subversion on Win32 can be built
+ using the latest cygwin. ymmv.
+ * If you don't want to build with localization support then leave
+ --enable-nls off the gen-make.py command.
+ * The /USEENV switch to msdev makes it take notice of the INCLUDE
+ and LIB environment variables. Do *not* use this switch when
+ starting up the msdev Visual environment. If you wish to build
+ in the Visual environment you must add the required include and
+ lib directories using the Tools/Options/Directories settings.

- Open the subversion_msvc.dsw file gen-make creates in the
- top-level directory. Compile the __ALL__ target to compile
- everything, __ALL_TESTS__ to also build the test programs.
+ C:\SVN> PATH=%PATH%;C:\SVN\src\db4-win32;C:\SVN\nasm;C:\Python22;C:\SVN\gettext\bin
+ C:\SVN> set INCLUDE=%INCLUDE%;C:\SVN\gettext\include
+ C:\SVN> set LIB=%LIB%;C:\SVN\gettext\lib
+ C:\SVN> mkdir src/apr
+ C:\SVN> mkdir src/apr-iconv
+ C:\SVN> mkdir src/apr-util
+ C:\SVN> xcopy httpd-2.0.49\srclib\apr src\apr
+ C:\SVN> xcopy httpd-2.0.49\srclib\apr-iconv src\apr-iconv
+ C:\SVN> xcopy httpd-2.0.49\srclib\apr-util src\apr-util
+ C:\SVN> cd src
+ C:\SVN\src> python gen-make.py -t dsp --with-httpd=..\httpd-2.0.49 --with-berkeley-db=db4-win32 --with-openssl=..\openssl-0.9.7c --with-zlib=..\zlib --enable-nls
+ C:\SVN\src> msdev subversion_msvc.dsw /USEENV /MAKE "__ALL__ - Win32 Release"
+ C:\SVN\src> msdev subversion_msvc.dsw /USEENV /MAKE "test_utf - Win32 Release"
+ C:\SVN\src> msdev subversion_msvc.dsw /USEENV /MAKE "test_ra_local - Win32 Release"

- The following is a sample script.
- gunzip, tar, and unzip are native win32 apps taken from
+ The binaries have now been built.

- http://unxutils.sourceforge.net/
+ E.5 Packaging the binaries

- C:\SVN> svn co http://svn.collab.net/repos/svn/trunk src
- C:\SVN> gunzip neon-0.24.5.tar.gz
- C:\SVN> cd src
- C:\SVN\src> tar -xvf ..\neon-0.24.5.tar
- C:\SVN\src> ren neon-0.24.5 neon
- C:\SVN\src> unzip ..\db-4.2.52-win32.zip
- C:\SVN\src> cd ..
- C:\SVN> unzip httpd_2.0.49-win32-src.zip
- C:\SVN> copy w32locatedb.pl httpd-2.0.49\srclib\apr-util\build
- C:\SVN> perl httpd-2.0.49\srclib\apr-util\build\w32locatedb.pl dll src\db4-win32\include src\db4-win32\lib
- C:\SVN> msdev httpd-2.0.49\apache.dsw /MAKE "BuildBin - Win32 Debug"
- C:\SVN> cd src
- C:\SVN\src> python gen-make.py -t dsp --with-httpd=..\httpd-2.0.49
- C:\SVN\src> msdev subversion_msvc.dsw /MAKE "__ALL__ - Win32 Debug"
+ You now need to copy the binaries ready to make the release zip
+ file. You also need to do this to run the tests as the new binaries
+ need to be in your path.

- [NOTE: Substitute "Release" for "Debug" in the "msdev" command lines
- above if you want binaries optimized for release.]
+ From within the SVN directory copy these files (substitute the
+ version number as required):

- [ALSO NOTE: There have been rumors that Subversion on Win32 can be built
- using the latest cygwin. ymmv.]
+ C:\SVN> mkdir svn-win32-trunk
+ C:\SVN> mkdir svn-win32-trunk\bin
+ C:\SVN> mkdir svn-win32-trunk\httpd
+ C:\SVN> mkdir svn-win32-trunk\iconv
+ C:\SVN> copy src\db4-win32\bin\libdb42.dll svn-win32-trunk\bin
+ C:\SVN> copy openssl-0.9.7c\out32dll\libeay32.dll svn-win32-trunk\bin
+ C:\SVN> copy openssl-0.9.7c\out32dll\ssleay32.dll svn-win32-trunk\bin
+ C:\SVN> copy src\Release\subversion\clients\cmdline\svn.exe svn-win32-trunk\bin
+ C:\SVN> copy src\Release\subversion\svnadmin\svnadmin.exe svn-win32-trunk\bin
+ C:\SVN> copy src\Release\subversion\svndumpfilter\svndumpfilter.exe svn-win32-trunk\bin
+ C:\SVN> copy src\Release\subversion\svnlook\svnlook.exe svn-win32-trunk\bin
+ C:\SVN> copy src\Release\subversion\svnserve\svnserve.exe svn-win32-trunk\bin
+ C:\SVN> copy src\Release\subversion\svnversion\svnversion.exe svn-win32-trunk\bin
+ C:\SVN> copy src\Release\subversion\mod_authz_svn\mod_authz_svn.so svn-win32-trunk\httpd
+ C:\SVN> copy src\Release\subversion\mod_dav_svn\mod_dav_svn.so svn-win32-trunk\httpd
+ C:\SVN> copy src\apr-iconv\Release\iconv\*.so svn-win32-trunk\iconv

+ E.6 Testing the Binaries

+ The build process creates the binary test programs but it does not
+ copy the client tests into the release test area.
+
+ C:\SVN> mkdir src\Release\subversion\tests\clients
+ C:\SVN> xcopy /S /Y src\subversion\tests\clients src\Release\subversion\tests\clients
+
+ Assuming Apache 2 is instaled in
+ C:\Program Files\Apache Group\Apache2 copy the dso files into the
+ Apache modules directory.
+
+ C:\SVN> copy src\Release\subversion\mod_dav_svn\mod_dav_svn.so C:\Program Files\Apache Group\Apache2\modules
+ C:\SVN> copy src\Release\subversion\mod_authz_svn\mod_authz_svn.so C:\Program Files\Apache Group\Apache2\modules
+
+ Put the svn-win32-trunk\bin directory at the start of your path so
+ you run the newly built binaries and not another version you might
+ have installed.
+
+ Configure Apache to use the mod_dav_svn and mod_authz_svn modules by
+ making sure these lines appear uncommented in httpd.conf:
+
+ LoadModule dav_module modules/mod_dav.so
+ LoadModule dav_fs_module modules/mod_dav_fs.so
+ LoadModule dav_svn_module modules/mod_dav_svn.so
+ LoadModule authz_svn_module modules/mod_authz_svn.so
+
+ And further down the file add location directives to point to the
+ test repositories. Change the paths to the SVN directory you created:
+
+ <Location /repositories>
+ DAV svn
+ SVNParentPath C:/SVN/src/Release/subversion/tests/clients/cmdline/repositories
+ </Location>
+
+ <Location /local_tmp/repos>
+ DAV svn
+ SVNPath c:/SVN/src/Release/subversion/tests/clients/cmdline/local_tmp/repos
+ </Location>
+
+ Then restart Apache and run the tests:
+
+ C:\SVN> cd src
+ C:\SVN\src> python win-tests.py -r -v
+ C:\SVN\src> python win-tests.py -r -v -u http://localhost/svn/repos/
 
 III. BUILDING A SUBVERSION SERVER
       ============================

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 23 14:10:35 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.