- Download and install a recent Mono from http://mono-project.com/Downloads. Install it in C:\mono to avoid problems with spaces and other chars in the build path. The official install will feed the cygwin environment with the compiler as well as all the native dependancy libs.
- Install Cygwin (I would recommend in C:\cygwin to same problems mentioned above) with the following packages in addition to the default ones:
autoconf
automake
bison
gcc
libtool
pkg-config
subversion
make
- Downgrade make because version 3.81 installed by Cygwin introduces a bug which causes the mono build to fail. Replace C:\cygwin\bin\make.exe with the one fromhere: make 3.80
- Prepare the build environment by setting the paths so that all the dependancy libs and scripts will be used from the official setup.
export MONO_LOCATION=/cygdrive/c/mono
export PATH=${PATH}:${MONO_LOCATION}/bin
export ACLOCAL_FLAGS="-I ${MONO_LOCATION}/share/aclocal"
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${MONO_LOCATION}/lib/pkgconfig
mkdir -p /mono/svn
mkdir /mono/build
- Checkout Mono’s source from svn and compile.
cd /mono/svn
svn co svn://anonsvn.mono-project.com/source/trunk/mono
svn co svn://anonsvn.mono-project.com/source/trunk/mcs
cd mono
./autogen.sh --prefix=/mono/build
make
make install
- Copy the freshly compiled files from C:\cygwin\mono\build to C:\mono and replace all existing. DONE!