Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: mono-1-1-10
Fetching contributors…

Cannot retrieve contributors at this time

236 lines (175 sloc) 8.015 kB
* Compiling Mono
This document describes how to compile and install Mono from
its source code. If you are only interested in running Mono,
you might want to install Mono from packages, which have been
The core of Mono is split in two components:
* C components (available in the mono package)
* C# components (available in the mcs package).
Mono is also available in various forms:
<dt>Officially <a href="download.html">released</a> packages.</dt>
<p>This is the format of choice for people to use, since these
have been tested and are known to build and work.
<dt><a href="daily">Daily</a> packages.</dt>
<p>This is a service offered for people who want to try out the
daily changes. Baked daily.</dd>
<dt>CVS source code.</dt>
<p>These are available to Mono <a href="ccvs.html">developers</a> and
also for enthusiasts through <a href="anoncvs.html">anonymous CVS</a>.
<dt>CVS snapshots.</dt>
<p>Available for curious developers which do not necessarily want to
install the CVS source. Baked daily.
* Compiling the code
There are a number of ways of compiling Mono
<li>From the <a href="#scripts">scripts</A>
<LI><a href="#install">Manually</a> for the first time.
<li>Manually, <a href="#upgrade">while upgrading</a> to CVS
(which is an easy way to get the latest CVS information)
<a name="scripts">
* Compiling with scripts
These scripts should be used for installing from packages, specially
on Windows, where dependencies have not always been installed.
There are scripts to help build mono for both Unix and Windows. Get
<a href=""></a> for Unix, or <a
href=""></a> for Windows.
These scripts automate the installation of GLIB and pkgconfig
(building from source on Unix, and using binary packages
provided by the GIMP for Windows project on Windows.) To use
the script, follow these simple steps:
* Save the script for your platform somewhere (e.g. /usr/local/bin)
* Make the script executable (i.e chmod 755 /usr/local/bin/
* Create a directory to hold the mono source, and the compiled binaries (e.g. mkdir ~/mono)
* Change to the new directory (i.e. cd ~/mono)
* run the script (i.e. /usr/local/bin/
The script requires wget on either platform, and building the
software requires make, gcc, automake, autoconf, and libtool.
You should install these packages from your distribution or
with the cygwin installer. You should also take care of setting
the right environment variables as the PKG_CONFIG_FLAGS, etc.
The script will download required packages from and do a cvs checkout of mono in the current
directory. <b>IMPORTANT!:</b> The cvs server chosen defaults to
anonymous cvs;
set your CVSROOT environment variable before running the script to
select a particular cvs server.
<a name="install">
** Building the software manually
You will need to obtain the Mono dependencies first: <a
href="">glib 2.x</a> and
<a href="">pkg-config</a>.
*** Building From Packages
This applies to both the officially released packages, as well as the
daily tarball packages.
Unpack the Mono runtime distribution:
<pre class="shell">
tar xzvf mono-X.XX.tar.gz
cd mono-X.XX</pre>
Then configure, compile and install:
<pre class="shell">
./configure --prefix=/usr/local
make install</pre>
This will give you a runtime, C# compiler and runtime
If you want to recompile the runtime and the compiler,
follow these steps, first unpack the MCS package:
<pre class="shell">
tar xzvf mcs-X.XX.tar.gz</pre>
Then use the following command to compile and install:
<pre class="shell">
./configure --profile=atomic
You can change /usr/local to something else if you want.
*** Building from CVS
To upgrade your Mono installation from CVS, it is very
important that you update your Mono and MCS modules from CVS
at the same time. Failure to do so might result in a
problematic installation as the runtime and the class
libraries will be out of sync.
Run the following commands to update your CVS tree (more
details in <a href="ccvs.html">Cvs and Mono</a> and the <A
href="anoncvs.html">AnonCVS and Mono</a> pages).
(cd mono; cvs update -dP .)
(cd mcs; cvs update -dP .)
Then you can run:
(cd mono; make bootstrap)
Now you can install the result:
(cd mono; make install)
Notice that following the above procedure does not require you
to manually install the software in the `mcs' directory, as
the relevant files will be copied by the `mono' makefiles.
* Software resources and notes
The required and additional software can be downloaded here:
* Microsoft's .NET Framework SDK from
<a href=""></a>.
* Cygwin and the GNU Make tools from
<a href=""></a>.
Some people observed problems with autoconf 2.52. Installing
autoconf 2.13 helped in those cases.
* Precompiled GLIB 2.0 and pkg-config packages (and
their dependencies) by the <a href="">GIMP for Windows</a> project from
<a href=""></a><br>
<a href=""></a> <br>
<a href=""></a> <br>
<a href=""></a> <br>
<a href=""></a> <br>
<a href=""></a><br>
* Download the Mono source code from the
<a href="download.html">packaged versions</a> or
the <a href="">
nightly snapshots</a> or the <a href="anoncvs.html">
Anonymous CVS</a>. The nightly snapshots are done every
night at 10pm EST (Boston Time). The nightly snapshots are
not guaranteed to build, but most of the time they should.
*** Notes on compiling GLIB 2.0 and pkg-config from source:
* Some people observed problems with autoconf 2.52. Installing
autoconf 2.13 helped in those cases (don't forget to do a
`make maintainer-clean' after the update).
* Download, compile and install <a href="">pkg-config</a> from source.
(I had to change line 674 of
<nobr><tt>pkg-config-0.8.0/glib-1.2.8/gstrfuncs.c</tt></nobr> from
<nobr><tt>extern char *strsignal (int sig);</tt></nobr> to
<nobr><tt>extern const char *strsignal (int sig);</tt></nobr>.
<pre class="shell">
tar xzvf pkg-config-0.8.0.tar.gz
cd pkg-config-0.8.0
./configure --prefix=/usr
make install
* Download, compile and install <a href="">libiconv</a> from source.<br>
If you dont have MS Visual C/C++ 4.0 or 5.0 or 6.0 you can also try
the binary package available at <a
* Download, compile and install the
<a href="">
glib 2.0</a> from source.
Jump to Line
Something went wrong with that request. Please try again.