couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Trivial Update of "Building_from_source_on_Windows" by DaveCottlehuber
Date Wed, 04 May 2011 14:53:33 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Building_from_source_on_Windows" page has been changed by DaveCottlehuber.
The comment on this change is: part 1 of 3 riveting episodes.


New page:

= Overview =

This page describes how to set up the toolchain, and then build and install CouchDB 1.0.1
or later from source on Windows. 

 * install Microsoft Visual Studio 2008 C++ compiler
 * install Microsoft Windows 7.0 SDK
 * install Cygwin toolkit
 * install Mozilla toolkit
 * install NSIS and Inno packaging tools
 * unpack OpenSSL, cURL, ICU dependent libraries
 * extract Erlang/OTP, wxWidgets, Mozilla Spidermonkey, Apache CouchDB source

= Warning =

Building CouchDB from source on Windows requires 4 different compilers and
attention to detail. Significant effort goes into setting up the toolchain
correctly to compile Erlang/OTP from source, so that the subsequent Erlang and
CouchDB builds ends up with matching Visual C++ Runtime components and a valid
Side-by-Side (SxS) configuration.

 * always use the Win32 versions of tools unless explicitly mentioned
 * don't use newer versions of compilers or SDKs unless explicitly mentioned

In most cases you will not want to do this and should use the
[[Windows_binary_installer]] instead.

= Toolchain =

open control panel, and set new environment variables:

CYGWIN="nontsec nodosfilewarning"

%RELAX% will be used later on for stashing files; use any sane location without spaces or
special characters.

Then download these, and then install in sequence:

 * Run [[|Cygwin's setup.exe]] using defaults, and additionally
all of devel, utils/file, utils/patch, editors/vim
 * Download [[|Microsoft
Visual Studio Express 2008]] and install. You can skip Silverlight and MSSQL.
 * Install the Windows SDK v7.0 for your architecture (32/64 bit) from either [[|32
bit SDK]] or [[|64
bit SDK]]
 * save [[|Visual
C++ 2008 SP1 runtime]] to %relax%
 * Run [[|Mozilla
 * If you don't like using vim in cygwin, you may want a unix file-compatible editor such
as [[|NotePad++]]
* Add a quick shortcut to Start Menu / All Programs / Visual C++ 2008 Express / Visual Studio
Tools / Visual Studio 2008 Command Prompt -- you'll be using this a lot
= Packaging Tools and Libraries

 * Install [[|OpenSSL]] into c:\OpenSSL,
and add to PATH
 * Unzip [[|ICU]]
into %relax%\icu
 * Install [[|Inno5 Packager]] to %relax%\inno5
 * Install [[|NSIS]]
to %relax%\nsis
 * Reboot now
= Source =

Download & keep these handy in %relax%\bits or similar:

 * [[|Erlang/OTP
R14B01 with 2 CouchDB-specific patches]]
 * [[|LibcURL]]
 * [[|Mozilla SpiderMonkey 1.8.x]]
 * [[|Erlang Tk/Tcl components]]
 * [[|wxWidgets source]]
 * [[|an overlay
for wxWidgets to avoid manual editing]]

= Build Erlang =

 * Start a VS2008 prompt & then:
set OPENSSL_PATH=c:\openssl
set CURL_PATH=%relax%\curl-7.21.6
set ICU_PATH=%relax%\icu


set INCLUDE=%INCLUDE%;%OPENSSL_PATH%\include\;%CURL_PATH%\include\curl;%ICU_PATH%\include;
set LIB=%LIB%;%OPENSSL_PATH%\lib;%CURL_PATH%\lib;%ICU_PATH%\lib;


The rest of this guide will run under the cygwin shell. Modify $ERL_TOP as needed.

tar xzf bits/erlang_otp*.tar.gz
cd erlang_otp
export ERL_TOP=`pwd`

echo "skipping gs" > lib/gs/SKIP
echo "skipping jinterface" > lib/jinterface/SKIP

eval `./otp_build env_win32`

./otp_build autoconf 2>&1 | tee $ERL_TOP/build_autoconf.txt
./otp_build configure 2>&1 | tee $ERL_TOP/build_configure.txt

./otp_build boot -a  2>&1 | tee $ERL_TOP/build_boot.txt
./otp_build release -a  2>&1 | tee $ERL_TOP/build_release.txt
./otp_build installer_win32  2>&1 | tee $ERL_TOP/build_installer_win32.txt
mv --force $ERL_TOP/release/win32/otp_win32_R*.exe $RELAX
./release/win32/Install.exe -s 2>&1 | tee -a $ERL_TOP/build_release.txt


View raw message