Make XML
[mono-project.git] / README
blobc4c7a2ce800f3f7750ce5dc34fceb3cfc554c824
2 This is Mono.
4         1. Installation
5         2. Using Mono
6         3. Directory Roadmap
8 1. Compilation and Installation
9 ===============================
11    a. Build Requirements
12    ---------------------
14         To build Mono, you will need the following components:
16                 * pkg-config
18                   Available from: http://www.freedesktop.org/Software/pkgconfig
20                 * glib 2.4
22                   Available from: http://www.gtk.org/
24         On Itanium, you must obtain libunwind:
26                 http://www.hpl.hp.com/research/linux/libunwind/download.php4
28         On Solaris, make sure that you used GNU tar to unpack this package, as
29         Solaris tar will not unpack this correctly, and you will get strange errors.
31         On Solaris, make sure that you use the GNU toolchain to build the software.
33         Optional dependencies:
35                 * libgdiplus
37                   If you want to get support for System.Drawing, you will need to get
38                   Libgdiplus.
40                 * libzlib
42                   This library and the development headers are required for compression
43                   file support in the 2.0 profile.
45     b. Building the Software
46     ------------------------
47         
48         If you obtained this package as an officially released tarball,
49         this is very simple, use configure and make:
51                 ./configure --prefix=/usr/local
52                 make
53                 make install
55         Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390, AMD64, ARM
56         and PowerPC systems.
58         If you obtained this as a snapshot, you will need an existing
59         Mono installation.  To upgrade your installation, unpack both
60         mono and mcs:
62                 tar xzf mcs-XXXX.tar.gz
63                 tar xzf mono-XXXX.tar.gz
64                 mv mono-XXX mono
65                 mv mcs-XXX mcs
66                 cd mono
67                 ./autogen.sh --prefix=/usr/local
68                 make
70     c. Building the software from SVN
71     ---------------------------------
73         If you are building the software from SVN, make sure that you
74         have up-to-date mcs and mono sources:
76                 svn co svn+ssh://USER@mono-cvs.ximian.com/source/trunk/mono
77                 svn co svn+ssh://USER@mono-cvs.ximian.com/source/trunk/mcs
79         Then, go into the mono directory, and configure:
81                 cd mono
82                 ./autogen.sh --prefix=/usr/local
83                 make
85         For people with non-standard installations of the auto* utils and of
86         pkg-config (common on misconfigured OSX and windows boxes), you could get
87         an error like this:
89         ./configure: line 19176: syntax error near unexpected token `PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...
91         This means that you need to set the ACLOCAL_FLAGS environment var
92         when invoking autogen.sh, like this:
94                 ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/loca
95         
96         where $acprefix is the prefix where aclocal has been installed.
98         This will automatically go into the mcs/ tree and build the
99         binaries there.
101         This assumes that you have a working mono installation, and that
102         there's a C# compiler named 'mcs', and a corresponding IL
103         runtime called 'mono'.  You can use two make variables
104         EXTERNAL_MCS and EXTERNAL_RUNTIME to override these.  e.g., you
105         can say
107           make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono
108         
109         If you don't have a working Mono installation
110         ---------------------------------------------
112         If you don't have a working Mono installation, an obvious choice
113         is to install the latest released packages of 'mono' for your
114         distribution and running autogen.sh; make; make install in the
115         mono module directory.
117         You can also try a slightly more risky approach: this may not work,
118         so start from the released tarball as detailed above.
120         This works by first getting the latest version of the 'monolite'
121         distribution, which contains just enough to run the 'mcs'
122         compiler.  You do this with:
124                 make get-monolite-latest
126         This will download and automatically gunzip and untar the
127         tarball, and place the files appropriately so that you can then
128         just run:
130                 make
132         To ensure that you're using the 'monolite' distribution, you can
133         also try passing EXTERNAL_MCS=false on the make command-line.
135         Testing and Installation
136          ------------------------
138         You can run (part of) the mono and mcs testsuites with the command:
140                 make check
142         All tests should pass.  
144         If you want more extensive tests, including those that test the
145         class libraries, you need to re-run 'configure' with the
146         '--enable-nunit-tests' flag, and try
148                 make -k check
150         Expect to find a few testsuite failures.  As a sanity check, you
151         can compare the failures you got with
153                 http://go-mono.com/tests/displayTestResults.php
155         You can now install mono with:
157                 make install
159         Failure to follow these steps may result in a broken installation. 
161     d. Common Configuration Options
162     -------------------------------
164         The following are the configuration options that someone
165         building Mono might want to use:
166         
168         --with-gc=[boehm, included, sgen, none]
170                 Selects the garbage collector engine to use, the
171                 default is the "included" value.
172         
173                 included: 
174                         This is the default value, and its
175                         the most feature complete, it will allow Mono
176                         to use typed allocations and support the
177                         debugger.
179                         It is essentially a slightly modified Boehm GC
181                 boehm:
182                         This is used to use a system-install Boehm GC,
183                         it is useful to test new features available in
184                         Boehm GC, but we do not recommend that people
185                         use this, as it disables a few features.
187                 sgen:
188                         The under-development Generational GC for
189                         Mono, do not use this in production.
191                 none:
192                         Disables the inclusion of a garbage
193                         collector.  
195         --with-tls=__thread,pthread
197                 Controls how Mono should access thread local storage,
198                 pthread forces Mono to use the pthread APIs, while
199                 __thread uses compiler-optimized access to it.
201                 Although __thread is faster, it requires support from
202                 the compiler, kernel and libc.   Old Linux systems do
203                 not support with __thread.
205                 This value is typically pre-configured and there is no
206                 need to set it, unless you are trying to debug a
207                 problem.
209         --with-sigaltstack=yes,no
211                 This controls whether Mono will install a special
212                 signal handler to handle stack overflows.   If set to
213                 "yes", it will turn stack overflows into the
214                 StackOverflowException.  Otherwise when a stack
215                 overflow happens, your program will receive a
216                 segmentation fault.
218                 The configure script will try to detect if your
219                 operating system supports this.   Some older Linux
220                 systems do not support this feature, or you might want
221                 to override the auto-detection.
223         --with-static-mono=yes,no
225                 This controls whether `mono' should link against a
226                 static library (libmono.a) or a shared library
227                 (libmono.so). 
229                 This defaults to yes, and will improve the performance
230                 of the `mono' program. 
232                 This only affects the `mono' binary, the shared
233                 library libmono.so will always be produced for
234                 developers that want to embed the runtime in their
235                 application.
237         --with-xen-opt=yes,no
239                 The default value for this is `yes', and it makes Mono
240                 generate code which might be slightly slower on
241                 average systems, but the resulting executable will run
242                 faster under the Xen virtualization system.
244         --with-large-heap=yes,no
246                 Enable support for GC heaps larger than 3GB.
248                 This value is set to `no' by default.
250         --with-ikvm-native=yes,no
252                 Controls whether the IKVM JNI interface library is
253                 built or not.  This is used if you are planning on
254                 using the IKVM Java Virtual machine with Mono.
256                 This defaults to `yes'.
258         --with-preview=yes,no
260                 Whether you want to build libraries that are still not
261                 completed (The 2.0 APIs).   It defaults to `yes'.
263         --with-libgdiplus=installed,sibling,<path>
265                 This is used to configure where should Mono look for
266                 libgdiplus when running the System.Drawing tests.
268                 It defaults to `installed', which means that the
269                 library is available to Mono through the regular
270                 system setup.
272                 `sibling' can be used to specify that a libgdiplus
273                 that resides as a sibling of this directory (mono)
274                 should be used.
276                 Or you can specify a path to a libgdiplus.
278         --enable-minimal=LIST
280                 Use this feature to specify optional runtime
281                 components that you might not want to include.  This
282                 is only useful for developers embedding Mono that
283                 require a subset of Mono functionality.
285                 The list is a comma-separated list of components that
286                 should be removed, these are:
288                 aot:
289                         Disables support for the Ahead of Time
290                         compilation.
292                 profiler:
293                         Disables support for the default profiler.
295                 decimal:
296                         Disables support for System.Decimal.
298                 pinvoke:
299                         Support for Platform Invocation services,
300                         disabling this will drop support for any
301                         libraries using DllImport.
303                 debug:
304                         Drop debugging support.
306                 reflection_emit:
307                         Drop System.Reflection.Emit support
309                 large_code:
310                         Disables support for large assemblies.
312                 logging:
313                         Disables support for debug logging.
315                 com:
316                         Disables COM support.
318                 ssa:
319                         Disables compilation for the SSA optimization
320                         framework, and the various SSA-based
321                         optimizations.
323                 generics:
324                         Generics support.  Disabling this will not
325                         allow Mono to run any 2.0 libraries or
326                         code that contains generics.
327                 
328         --disable-dev-random
330                 Mono uses /dev/random to obtain good random data for
331                 any source that requires random numbers.   If your
332                 system does not support this, you might want to
333                 disable it.
335                 There are a number of runtime options to control this
336                 also, see the man page.
339 2. Using Mono
340 =============
342         Once you have installed the software, you can run a few programs:
344         * runtime engine
346                 mono program.exe
348         * C# compiler
350                 mcs program.cs
352         * CIL Disassembler
354                 monodis program.exe
356         See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
357         for further details.
359 3. Directory Roadmap
360 ====================
362         docs/
363                 Technical documents about the Mono runtime.
365         data/
366                 Configuration files installed as part of the Mono runtime.
368         mono/
369                 The core of the Mono Runtime.
371                 metadata/
372                         The object system and metadata reader.
374                 mini/
375                         The Just in Time Compiler.
377                 dis/
378                         CIL executable Disassembler
380                 cli/
381                         Common code for the JIT and the interpreter.
383                 io-layer/
384                         The I/O layer and system abstraction for 
385                         emulating the .NET IO model.
387                 cil/
388                         Common Intermediate Representation, XML
389                         definition of the CIL bytecodes.
391                 interp/
392                         Interpreter for CLI executables (obsolete).
394                 arch/
395                         Architecture specific portions.
397         man/
399                 Manual pages for the various Mono commands and programs.
401         scripts/
403                 Scripts used to invoke Mono and the corresponding program.
405         runtime/
407                 A directory that contains the Makefiles that link the
408                 mono/ and mcs/ build systems.