6 4. git submodules maintenance
9 1. Compilation and Installation
10 ===============================
15 On Itanium, you must obtain libunwind:
17 http://www.hpl.hp.com/research/linux/libunwind/download.php4
19 On Solaris, make sure that you used GNU tar to unpack this package, as
20 Solaris tar will not unpack this correctly, and you will get strange errors.
22 On Solaris, make sure that you use the GNU toolchain to build the software.
24 Optional dependencies:
28 If you want to get support for System.Drawing, you will need to get
29 Libgdiplus. This library in turn requires glib and pkg-config:
33 Available from: http://www.freedesktop.org/Software/pkgconfig
37 Available from: http://www.gtk.org/
41 This library and the development headers are required for compression
42 file support in the 2.0 profile.
44 b. Building the Software
45 ------------------------
47 If you obtained this package as an officially released tarball,
48 this is very simple, use configure and make:
50 ./configure --prefix=/usr/local
54 Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390,
55 S/390x, AMD64, ARM and PowerPC systems.
57 If you obtained this as a snapshot, you will need an existing
58 Mono installation. To upgrade your installation, unpack both
61 tar xzf mcs-XXXX.tar.gz
62 tar xzf mono-XXXX.tar.gz
66 ./autogen.sh --prefix=/usr/local
69 The Mono build system is silent for most compilation commands.
70 To enable a more verbose compile (for example, to pinpoint
71 problems in your makefiles or your system) pass the V=1 flag to make, like this:
76 c. Building the software from GIT
77 ---------------------------------
79 If you are building the software from GIT, make sure that you
80 have up-to-date mcs and mono sources:
82 If you are an anonymous user:
83 git clone git://github.com/mono/mono.git
85 If you are a Mono contributors with read/write privileges:
86 git clone git@github.com:mono/mono.git
89 Then, go into the mono directory, and configure:
92 ./autogen.sh --prefix=/usr/local
95 For people with non-standard installations of the auto* utils and of
96 pkg-config (common on misconfigured OSX and windows boxes), you could get
99 ./configure: line 19176: syntax error near unexpected token `PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...
101 This means that you need to set the ACLOCAL_FLAGS environment var
102 when invoking autogen.sh, like this:
104 ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/loca
106 where $acprefix is the prefix where aclocal has been installed.
108 This will automatically go into the mcs/ tree and build the
111 This assumes that you have a working mono installation, and that
112 there's a C# compiler named 'mcs', and a corresponding IL
113 runtime called 'mono'. You can use two make variables
114 EXTERNAL_MCS and EXTERNAL_RUNTIME to override these. e.g., you
117 make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono
119 If you don't have a working Mono installation
120 ---------------------------------------------
122 If you don't have a working Mono installation, an obvious choice
123 is to install the latest released packages of 'mono' for your
124 distribution and running autogen.sh; make; make install in the
125 mono module directory.
127 You can also try a slightly more risky approach: this may not work,
128 so start from the released tarball as detailed above.
130 This works by first getting the latest version of the 'monolite'
131 distribution, which contains just enough to run the 'mcs'
132 compiler. You do this with:
134 # Run the following line after ./autogen.sh
135 make get-monolite-latest
137 This will download and automatically gunzip and untar the
138 tarball, and place the files appropriately so that you can then
141 make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe
143 And that will use the files downloaded by 'make get-monolite-latest.
145 Testing and Installation
146 ------------------------
148 You can run (part of) the mono and mcs testsuites with the command:
152 All tests should pass.
154 If you want more extensive tests, including those that test the
155 class libraries, you need to re-run 'configure' with the
156 '--enable-nunit-tests' flag, and try
160 Expect to find a few testsuite failures. As a sanity check, you
161 can compare the failures you got with
163 https://wrench.mono-project.com/Wrench/
165 You can now install mono with:
169 You can verify your installation by using the mono-test-install
170 script, it can diagnose some common problems with Mono's install.
172 Failure to follow these steps may result in a broken installation.
174 d. Configuration Options
175 ------------------------
177 The following are the configuration options that someone
178 building Mono might want to use:
182 Generational GC support: Used to enable or disable the
183 compilation of a Mono runtime with the SGen garbage collector.
185 On platforms that support it, after building Mono, you
186 will have both a mono binary and a mono-sgen binary.
187 Mono uses Boehm, while mono-sgen uses the Simple
190 --with-gc=[boehm, included, sgen, none]
192 Selects the default Boehm garbage collector engine to
193 use, the default is the "included" value.
196 This is the default value, and its
197 the most feature complete, it will allow Mono
198 to use typed allocations and support the
201 It is essentially a slightly modified Boehm GC
204 This is used to use a system-install Boehm GC,
205 it is useful to test new features available in
206 Boehm GC, but we do not recommend that people
207 use this, as it disables a few features.
210 Disables the inclusion of a garbage
213 --with-tls=__thread,pthread
215 Controls how Mono should access thread local storage,
216 pthread forces Mono to use the pthread APIs, while
217 __thread uses compiler-optimized access to it.
219 Although __thread is faster, it requires support from
220 the compiler, kernel and libc. Old Linux systems do
221 not support with __thread.
223 This value is typically pre-configured and there is no
224 need to set it, unless you are trying to debug a
227 --with-sigaltstack=yes,no
229 Experimental: Use at your own risk, it is known to
230 cause problems with garbage collection and is hard to
231 reproduce those bugs.
233 This controls whether Mono will install a special
234 signal handler to handle stack overflows. If set to
235 "yes", it will turn stack overflows into the
236 StackOverflowException. Otherwise when a stack
237 overflow happens, your program will receive a
240 The configure script will try to detect if your
241 operating system supports this. Some older Linux
242 systems do not support this feature, or you might want
243 to override the auto-detection.
245 --with-static_mono=yes,no
247 This controls whether `mono' should link against a
248 static library (libmono.a) or a shared library
251 This defaults to yes, and will improve the performance
252 of the `mono' program.
254 This only affects the `mono' binary, the shared
255 library libmono.so will always be produced for
256 developers that want to embed the runtime in their
259 --with-xen-opt=yes,no
261 The default value for this is `yes', and it makes Mono
262 generate code which might be slightly slower on
263 average systems, but the resulting executable will run
264 faster under the Xen virtualization system.
266 --with-large-heap=yes,no
268 Enable support for GC heaps larger than 3GB.
270 This value is set to `no' by default.
272 --enable-small-config=yes,no
274 Enable some tweaks to reduce memory usage and disk footprint at
275 the expense of some capabilities. Typically this means that the
276 number of threads that can be created is limited (256), that the
277 maxmimum heap size is also reduced (256 MB) and other such limitations
278 that still make mono useful, but more suitable to embedded devices
279 (like mobile phones).
281 This value is set to `no' by default.
283 --with-ikvm-native=yes,no
285 Controls whether the IKVM JNI interface library is
286 built or not. This is used if you are planning on
287 using the IKVM Java Virtual machine with Mono.
289 This defaults to `yes'.
291 --with-profile4=yes,no
293 Whether you want to build the 4.x profile libraries
296 It defaults to `yes'.
298 --with-moonlight=yes,no
300 Whether you want to generate the Silverlight/Moonlight
301 libraries and toolchain in addition to the default
304 This will produce the `smcs' compiler which will reference
305 the Silverlight modified assemblies (mscorlib.dll,
306 System.dll, System.Code.dll and System.Xml.Core.dll) and turn
307 on the LINQ extensions for the compiler.
309 --with-moon-gc=boehm,sgen
311 Select the GC to use for Moonlight.
314 Selects the Boehm Garbage Collector, with the same flags
315 as the regular Mono build. This is the default.
318 Selects the new SGen Garbage Collector, which provides
319 Generational GC support, using the same flags as the
322 This defaults to `boehm'.
324 --with-libgdiplus=installed,sibling,<path>
326 This is used to configure where should Mono look for
327 libgdiplus when running the System.Drawing tests.
329 It defaults to `installed', which means that the
330 library is available to Mono through the regular
333 `sibling' can be used to specify that a libgdiplus
334 that resides as a sibling of this directory (mono)
337 Or you can specify a path to a libgdiplus.
339 --disable-shared-memory
341 Use this option to disable the use of shared memory in
342 Mono (this is equivalent to setting the MONO_DISABLE_SHM
343 environment variable, although this removes the feature
346 Disabling the shared memory support will disable certain
347 features like cross-process named mutexes.
349 --enable-minimal=LIST
351 Use this feature to specify optional runtime
352 components that you might not want to include. This
353 is only useful for developers embedding Mono that
354 require a subset of Mono functionality.
356 The list is a comma-separated list of components that
357 should be removed, these are:
360 Disables support for the Ahead of Time
364 Support for the Mono.Management assembly and the
365 VMAttach API (allowing code to be injected into
369 Disables COM support.
372 Drop debugging support.
375 Disables support for System.Decimal.
378 By default Mono comes with a full table
379 of messages for error codes. This feature
380 turns off uncommon error messages and reduces
384 Generics support. Disabling this will not
385 allow Mono to run any 2.0 libraries or
386 code that contains generics.
389 Removes the JIT engine from the build, this reduces
390 the executable size, and requires that all code
391 executed by the virtual machine be compiled with
392 Full AOT before execution.
395 Disables support for large assemblies.
398 Disables support for debug logging.
401 Support for Platform Invocation services,
402 disabling this will drop support for any
403 libraries using DllImport.
406 Removes support for MONO_IOMAP, the environment
407 variables for simplifying porting applications that
408 are case-insensitive and that mix the Unix and Windows path separators.
411 Disables support for the default profiler.
414 Drop System.Reflection.Emit support
416 reflection_emit_save:
417 Drop support for saving dynamically created
418 assemblies (AssemblyBuilderAccess.Save) in
419 System.Reflection.Emit.
422 Disables support for AppDomain's shadow copies
423 (you can disable this if you do not plan on
427 Disables support for the Mono.SIMD intrinsics
431 Disables compilation for the SSA optimization
432 framework, and the various SSA-based
438 This enables the use of LLVM as a code generation engine
439 for Mono. The LLVM code generator and optimizer will be
440 used instead of Mono's built-in code generator for both
441 Just in Time and Ahead of Time compilations.
443 See the http://www.mono-project.com/Mono_LLVM for the
444 full details and up-to-date information on this feature.
446 You will need to have an LLVM built that Mono can link
449 The --enable-loadedllvm variant will make the llvm backend
450 into a runtime-loadable module instead of linking it directly
451 into the main mono binary.
455 This enables the use arrays whose indexes are larger
458 By default Mono has the same limitation as .NET on
459 Win32 and Win64 and limits array indexes to 32-bit
460 values (even on 64-bit systems).
462 In certain scenarios where large arrays are required,
463 you can pass this flag and Mono will be built to
464 support 64-bit arrays.
466 This is not the default as it breaks the C embedding
467 ABI that we have exposed through the Mono development
470 --enable-parallel-mark
472 Use this option to enable the garbage collector to use
473 multiple CPUs to do its work. This helps performance
474 on multi-CPU machines as the work is divided across CPUS.
476 This option is not currently the default as we have
477 not done much testing with Mono.
481 On Solaris and MacOS X builds a version of the Mono
482 runtime that contains DTrace probes and can
483 participate in the system profiling using DTrace.
488 Mono uses /dev/random to obtain good random data for
489 any source that requires random numbers. If your
490 system does not support this, you might want to
493 There are a number of runtime options to control this
494 also, see the man page.
498 This configures the Mono compiler to generate code
499 suitable to be used by Google's Native Client:
501 http://code.google.com/p/nativeclient/
503 Currently this is used with Mono's AOT engine as
504 Native Client does not support JIT engines yet.
509 Once you have installed the software, you can run a few programs:
523 See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
530 Technical documents about the Mono runtime.
533 Configuration files installed as part of the Mono runtime.
536 The core of the Mono Runtime.
539 The object system and metadata reader.
542 The Just in Time Compiler.
545 CIL executable Disassembler
548 Common code for the JIT and the interpreter.
551 The I/O layer and system abstraction for
552 emulating the .NET IO model.
555 Common Intermediate Representation, XML
556 definition of the CIL bytecodes.
559 Interpreter for CLI executables (obsolete).
562 Architecture specific portions.
566 Manual pages for the various Mono commands and programs.
570 Some simple sample programs on uses of the Mono
571 runtime as an embedded library.
575 Scripts used to invoke Mono and the corresponding program.
579 A directory that contains the Makefiles that link the
580 mono/ and mcs/ build systems.
584 If the directory ../olive is present (as an
585 independent checkout) from the Mono module, that
586 directory is automatically configured to share the
587 same prefix than this module gets.
590 4. Git submodules maintenance
591 =============================
593 Read documentation at http://mono-project.com/Git_Submodule_Maintenance
599 To submit bug reports, please use Xamarin's Bugzilla:
601 https://bugzilla.xamarin.com/
603 Please use the search facility to ensure the same bug hasn't already
604 been submitted and follow our guidelines on how to make a good bug
607 http://mono-project.com/Bugs#How_to_make_a_good_bug_report