[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 the 1.0.x branch on the Win32 platform.

From: Martin Tomes <lists_at_tomes.org>
Date: 2004-04-26 12:34:58 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 9468)
+++ INSTALL (working copy)
@@ -161,9 +161,9 @@
       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,134 +578,276 @@
   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 is
+ too old. You only need the 'Core SDK'. You can get it 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.5, downloaded from
+ http://www.webdav.org/neon/neon-0.24.5.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.4 binaries http://www.winimage.com/zLibDll/zlib114dll.zip and
+ sources http://www.gzip.org/zlib/zlib114.zip
+ * openssl-0.9.7d.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/
+ * 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.4. 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/ or
+ http://gnuwin32.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/branches/1.0.x src-1.0.x

- 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 and add it to your path
+ * 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 zlib sources into SVN\http-2.0.49\srclib\zlib
+ * Extract the pre-built zlib into SVN\zlib and copy
+ SVN\zlib\static32\zlibstat.lib into SVN\zlib
+ * Extract openssl into SVN\openssl-0.9.7d
+ * 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 if it isn't already
+ there.

- 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
+ Set up the environment.

- Finally, you will need to copy the Apache apr libraries into the
- root of the Subversion source tree.
+ C:>set VER=1.0.x
+ C:>set DIR=1.0.x
+ C:>set DRIVE=C
+ C:>set PYTHONDIR=C:\Python22
+ C:>set SDKINC=C:\Program Files\Microsoft SDK\include
+ C:>set SDKLIB=C:\Program Files\Microsoft SDK\lib
+ C:>set APACHEMODDIR=C:\Program Files\Apache Group\Apache2\modules
+ C:>PATH=%PATH%;%DRIVE%:\SVN\src\db4-win32;%DRIVE%:\SVN\nasm;%PYTHONDIR%
+ C:>set INCLUDE=%SDKINC%;%INCLUDE%
+ C:>set LIB=%SDKLIB%;%LIB%

- Walkthrough:

- 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.
+ OpenSSL

- Open the Apache.dsw file and build the Apache source. If you
- don't compile Apache, mod_dav_svn will not build.
+ C:>cd openssl-0.9.7d
+ C:>perl Configure VC-WIN32
+ C:>call ms\do_nasm
+ C:>nmake -f ms\ntdll.mak
+ C:>cd out32dll
+ C:>call ..\ms\test
+ C:>cd ..\..

- 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.
+ Apache 2

- 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:>perl httpd-2.0.49\srclib\apr-util\build\w32locatedb.pl dll src-%DIR%\db4-win32\include src-%DIR%\db4-win32\lib
+ C:>msdev httpd-2.0.49\apache.dsw /MAKE "BuildBin - Win32 Release"

- The following is a sample script.
- gunzip, tar, and unzip are native win32 apps taken from
+ Subversion

- http://unxutils.sourceforge.net/
+ Things to note:

- C:\SVN> svn co http://svn.collab.net/repos/svn/trunk src
- C:\SVN> gunzip neon-0.24.4.tar.gz
- C:\SVN> cd src
- C:\SVN\src> tar -xvf ..\neon-0.24.4.tar
- C:\SVN\src> ren neon-0.24.4 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"
+ * 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.
+ * 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.
+ * If you are using Visual Studio .NET add -t vcproj to the gen-make.py
+ command, you will also have to distribute the C runtime dll with the
+ binaries.
+ * Apache must not be running or the copy of the modules will fail.

- [NOTE: Substitute "Release" for "Debug" in the "msdev" command lines
- above if you want binaries optimized for release.]
+ C:>mkdir src-%DIR%\apr
+ C:>mkdir src-%DIR%\apr-iconv
+ C:>mkdir src-%DIR%\apr-util
+ C:>xcopy /S /Y httpd-2.0.49\srclib\apr src-%DIR%\apr
+ C:>xcopy /S /Y httpd-2.0.49\srclib\apr-iconv src-%DIR%\apr-iconv
+ C:>xcopy /S /Y httpd-2.0.49\srclib\apr-util src-%DIR%\apr-util
+ C:>cd src-%DIR%
+ C:>python gen-make.py -t dsp --with-httpd=..\httpd-2.0.49 --with-berkeley-db=db4-win32 --with-openssl=..\openssl-0.9.7d --with-zlib=..\zlib
+ C:>msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
+ C:>msdev subversion_msvc.dsw /USEENV /MAKE "test_utf - Win32 Release"
+ C:>msdev subversion_msvc.dsw /USEENV /MAKE "test_ra_local - Win32 Release"
+ C:>cd ..

- [ALSO NOTE: There have been rumors that Subversion on Win32 can be built
- using the latest cygwin. ymmv.]
+ The binaries have now been built, the tests set up ready to run and the
+ apache modules copied into place.

+ E.5 Packaging the binaries

+ 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.
+
+ From within the SVN directory copy these files (substitute the
+ version number as required):
+
+ C:>mkdir svn-win32-%VER%
+ C:>mkdir svn-win32-%VER%\bin
+ C:>mkdir svn-win32-%VER%\httpd
+ C:>mkdir svn-win32-%VER%\iconv
+ C:>copy src-%DIR%\db4-win32\bin\libdb42.dll svn-win32-%VER%\bin
+ C:>copy src-%DIR%\Release\subversion\clients\cmdline\svn.exe svn-win32-%VER%\bin
+ C:>copy src-%DIR%\Release\subversion\svnadmin\svnadmin.exe svn-win32-%VER%\bin
+ C:>copy src-%DIR%\Release\subversion\svndumpfilter\svndumpfilter.exe svn-win32-%VER%\bin
+ C:>copy src-%DIR%\Release\subversion\svnlook\svnlook.exe svn-win32-%VER%\bin
+ C:>copy src-%DIR%\Release\subversion\svnserve\svnserve.exe svn-win32-%VER%\bin
+ C:>copy src-%DIR%\Release\subversion\svnversion\svnversion.exe svn-win32-%VER%\bin
+ C:>copy src-%DIR%\Release\subversion\mod_authz_svn\mod_authz_svn.so svn-win32-%VER%\httpd
+ C:>copy src-%DIR%\Release\subversion\mod_dav_svn\mod_dav_svn.so svn-win32-%VER%\httpd
+ C:>copy src-%DIR%\apr-iconv\Release\iconv\*.so svn-win32-%VER%\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:>cd src-%DIR%
+ C:>mkdir Release\subversion\tests\clients
+ C:>xcopy /S /Y subversion\tests\clients 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:>copy Release\subversion\mod_dav_svn\mod_dav_svn.so "%APACHEMODDIR%"
+ C:>copy Release\subversion\mod_authz_svn\mod_authz_svn.so "%APACHEMODDIR%"
+ C:>cd ..
+
+ 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-1.0.x/Release/subversion/tests/clients/cmdline/repositories
+ </Location>
+
+ <Location /local_tmp/repos>
+ DAV svn
+ SVNPath c:/SVN/src-1.0.x/Release/subversion/tests/clients/cmdline/local_tmp/repos
+ </Location>
+
+ Then restart Apache and run the tests:
+
+ C:>PATH=%DRIVE%:\SVN\svn-win32\bin;%PATH%
+ C:>cd src-%DIR%
+ C:>python win-tests.py -c -r -v
+ C:>python win-tests.py -c -r -v -u http://localhost
+ C:>cd ..
 
 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 Mon Apr 26 12:35:29 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.