Download and install the latest "fullversion" of msysgit from http://code.google.com/p/msysgit/downloads/list.
msysgit contains bash, gcc and other commonly used Unix tools. Unfortunately the installed compiler can't compile a 64 bit binary, so you need to install another compiler for that...
You "install" the compiler by extracting the zipfile (normally, into c:\msysgit\msysgit\mingw64) and add the bin folder to your path.
You should also consider adding the following to your .bashrc file:
You need to download (and install) pthreads for the 64 bit compiler. A binary package is available from: http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/pthreads/pthreads-20100604.zip/download. Extract the file named pthreads-w64.zip within the zip file into /mingw64 .
The rest of the compilation steps should be performed from a msysgit shell.
To be able to compile both 32-bit and 64-bit applications, installation of compiled binaries will be into /tmp/membase-build32 for 32-bit applications and /tmp/membase-build64 for 64-bit applications.
Download http://monkey.org/~provos/libevent-2.0.7-rc.tar.gz and install it with the following commands:
Download http://curl.haxx.se/download/curl-7.21.1.tar.gz and install it with the following commands:
Next, patch libtool in order to build a shared libraries on Windows. Apply the following patch:
Now build it with the following commands:
There is a Makefile that you may use build everything from scratch. "autoconf" tools are not available on Windows, so you need to log into a UNIX machine first to generate a configure file for all of the sub-projects couchbase is built up of. To do so, run the following commands:
Due to the bug in libtool we need to apply the content of the patch above (it may not apply unless you are using the same version of libtool, but it's fairly easy to manually add.. Just search for "linker path" and add the content above the block).
If you've a patch file that applies cleanly you can fix all of the source with the following commands:
You should now be able to build everything by running the following commands on your windows box: