Add g_getdtablesize to list of acceptable g_* symbols in mono, for test-eglib-remap
[mono-project.git] / README.md
blobbb5b98a76c729f95eac8d59f0771fd35543f991e
1 Mono is a software platform designed to allow developers to easily create cross platform applications.
2 It is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.
4 1. [Compilation and Installation](#compilation-and-installation)
5 2. [Using Mono](#using-mono)
6 3. [Directory Roadmap](#directory-roadmap)
7 4. [Contributing to Mono](#contributing-to-mono)
8 5. [Reporting bugs](#reporting-bugs)
9 6. [Configuration Options](#configuration-options)
11 **Build Status**
13 | debian-amd64 | debian-i386 | centos-s390x | windows-amd64 |
14 |:------------:|:-----------:|:------------:|:-------------:|
15 | [![debian-amd64](http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/badge/icon)](http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/) | [![debian-i386](http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/badge/icon)](http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/) | [![centos-s390x](http://jenkins.mono-project.com/job/test-mono-mainline/label=centos-s390x/badge/icon)](http://jenkins.mono-project.com/job/test-mono-mainline/label=centos-s390x/) | [![windows-amd64](https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true)](https://ci.appveyor.com/project/ajlennon/mono-817/branch/master) |
17 Compilation and Installation
18 ============================
20 Building the Software
21 ---------------------
23 Please see our guides for building Mono on
24 [Mac OS X](http://www.mono-project.com/docs/compiling-mono/mac/),
25 [Linux](http://www.mono-project.com/docs/compiling-mono/linux/) and 
26 [Windows](http://www.mono-project.com/docs/compiling-mono/windows/).
28 Note that building from Git assumes that you already have Mono installed,
29 so please download and [install the latest Mono release](http://www.mono-project.com/download/)
30 before trying to build from Git. This is required because the Mono build
31 relies on a working Mono C# compiler to compile itself
32 (also known as [bootstrapping](http://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
34 If you don't have a working Mono installation
35 ---------------------------------------------
37 If you don't have a working Mono installation, you can try a slightly
38 more risky approach: getting the latest version of the 'monolite' distribution,
39 which contains just enough to run the 'mcs' compiler. You do this with:
41     # Run the following line after ./autogen.sh
42     make get-monolite-latest
44 This will download and place the files appropriately so that you can then
45 just run:
47     make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe
49 The build will then use the files downloaded by `make get-monolite-latest`.
51 Testing and Installation
52 ------------------------
54 You can run the mono and mcs test suites with the command: `make check`.
56 Expect to find a few test suite failures. As a sanity check, you
57 can compare the failures you got with [https://wrench.mono-project.com/Wrench/](https://wrench.mono-project.com/Wrench/)
58 and [http://jenkins.mono-project.com/](http://jenkins.mono-project.com/).
60 You can now install mono with: `make install`
62 You can verify your installation by using the mono-test-install
63 script, it can diagnose some common problems with Mono's install.
64 Failure to follow these steps may result in a broken installation. 
66 Using Mono
67 ==========
69 Once you have installed the software, you can run a few programs:
71 * `mono program.exe` runtime engine
73 * `mcs program.cs` C# compiler 
75 * `monodis program.exe` CIL Disassembler
77 See the man pages for mono(1), mcs(1) and monodis(1) for further details.
79 Directory Roadmap
80 =================
82 * `data/` - Configuration files installed as part of the Mono runtime.
84 * `docs/` - Technical documents about the Mono runtime.
86 * `external/` - Git submodules for external libraries (Newtonsoft.Json, ikvm, etc).
88 * `man/` - Manual pages for the various Mono commands and programs.
90 * `mcs/` - The class libraries, compiler and tools
92   * `class/` - The class libraries (like System.*, Microsoft.Build, etc.)
94   * `mcs/` - The Mono C# compiler written in C#
96   * `tools/` - Tools like gacutil, ikdasm, mdoc, etc.
98 * `mono/` - The core of the Mono Runtime.
100   * `arch/` - Architecture specific portions.
102   * `cil/` - Common Intermediate Representation, XML
103 definition of the CIL bytecodes.
105   * `dis/` - CIL executable Disassembler
107   * `io-layer/` - The I/O layer and system abstraction for 
108 emulating the .NET IO model.
110   * `metadata/` - The object system and metadata reader.
112   * `mini/` - The Just in Time Compiler.
114 * `runtime/` - A directory that contains the Makefiles that link the
115 mono/ and mcs/ build systems.
117 * `samples/` -Some simple sample programs on uses of the Mono
118 runtime as an embedded library.   
120 * `scripts/` - Scripts used to invoke Mono and the corresponding program.
122 * `../olive/` - Incubation code from [Olive](https://github.com/mono/olive).
124   * If the directory ../olive is present (as an
125 independent checkout) from the Mono module, that
126 directory is automatically configured to share the
127 same prefix than this module gets.
129 Contributing to Mono
130 ====================
132 Before submitting changes to Mono, please review the [contribution guidelines](http://www.mono-project.com/community/contributing/).
133 Please pay particular attention to the [Important Rules](http://www.mono-project.com/community/contributing/#important-rules) section.
135 Reporting bugs
136 ==============
138 To submit bug reports, please use [Xamarin's Bugzilla](https://bugzilla.xamarin.com/)
140 Please use the search facility to ensure the same bug hasn't already
141 been submitted and follow our [guidelines](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
142 on how to make a good bug report.
144 Configuration Options
145 =====================
147 The following are the configuration options that someone
148 building Mono might want to use:
150 * `--with-sgen=yes,no` - Generational GC support: Used to enable or disable the
151 compilation of a Mono runtime with the SGen garbage collector.
153   * On platforms that support it, after building Mono, you will have
154 both a `mono` binary and a `mono-sgen` binary. `mono` uses Boehm, while
155 `mono-sgen` uses the Simple Generational GC.
157 * `--with-gc=[included, boehm,  none]` - Selects the default Boehm garbage
158 collector engine to use.
160   * *included*: (*slighty modified Boehm GC*)
161 This is the default value for the Boehm GC, and it's 
162 the most feature complete, it will allow Mono 
163 to use typed allocations and support the debugger. 
165   * *boehm*:
166 This is used to use a system-install Boehm GC,
167 it is useful to test new features available in
168 Boehm GC, but we do not recommend that people
169 use this, as it disables a few features.
171   * *none*:
172 Disables the inclusion of a garbage collector.
174   * This defaults to `included`.
176 * `--with-tls=__thread,pthread`
178   * Controls how Mono should access thread local storage,
179 pthread forces Mono to use the pthread APIs, while
180 __thread uses compiler-optimized access to it.
182   * Although __thread is faster, it requires support from
183 the compiler, kernel and libc. Old Linux systems do
184 not support with __thread.
186   * This value is typically pre-configured and there is no
187 need to set it, unless you are trying to debug a problem.
189 * `--with-sigaltstack=yes,no`
191   * **Experimental**: Use at your own risk, it is known to
192 cause problems with garbage collection and is hard to
193 reproduce those bugs.
195   * This controls whether Mono will install a special
196 signal handler to handle stack overflows. If set to
197 `yes`, it will turn stack overflows into the
198 StackOverflowException. Otherwise when a stack
199 overflow happens, your program will receive a
200 segmentation fault.
202   * The configure script will try to detect if your
203 operating system supports this. Some older Linux
204 systems do not support this feature, or you might want
205 to override the auto-detection.
207 * `--with-static_mono=yes,no`
209   * This controls whether `mono` should link against a
210 static library (libmono.a) or a shared library
211 (libmono.so). 
213   * This defaults to `yes`, and will improve the performance
214 of the `mono` program. 
216   * This only affects the `mono' binary, the shared
217 library libmono.so will always be produced for
218 developers that want to embed the runtime in their
219 application.
221 * `--with-xen-opt=yes,no` - Optimize code for Xen virtualization.
223   * It makes Mono generate code which might be slightly
224 slower on average systems, but the resulting executable will run
225 faster under the Xen virtualization system.
227   * This defaults to `yes`.
229 * `--with-large-heap=yes,no` - Enable support for GC heaps larger than 3GB.
231   * This defaults to `no`.
233 * `--enable-small-config=yes,no` - Enable some tweaks to reduce memory usage
234 and disk footprint at the expense of some capabilities.
236   * Typically this means that the number of threads that can be created
237 is limited (256), that the maximum heap size is also reduced (256 MB)
238 and other such limitations that still make mono useful, but more suitable
239 to embedded devices (like mobile phones).
241   * This defaults to `no`.
243 * `--with-ikvm-native=yes,no` - Controls whether the IKVM JNI interface library is
244 built or not.
246   * This is used if you are planning on
247 using the IKVM Java Virtual machine with Mono.
249   * This defaults to `yes`.
251 * `--with-profile4=yes,no` - Whether you want to build the 4.x profile libraries
252 and runtime.
254   * This defaults to `yes`.
256 * `--with-libgdiplus=installed,sibling,<path>` - Configure where Mono
257 searches for libgdiplus when running System.Drawing tests.
259   * It defaults to `installed`, which means that the
260 library is available to Mono through the regular
261 system setup.
263   * `sibling` can be used to specify that a libgdiplus
264 that resides as a sibling of this directory (mono)
265 should be used.
267  * Or you can specify a path to a libgdiplus.
269 * `--disable-shared-memory`
271   * Use this option to disable the use of shared memory in
272 Mono (this is equivalent to setting the MONO_DISABLE_SHM
273 environment variable, although this removes the feature
274 completely).
276   * Disabling the shared memory support will disable certain
277 features like cross-process named mutexes.
279 * `--enable-minimal=LIST`
281   * Use this feature to specify optional runtime
282 components that you might not want to include.  This
283 is only useful for developers embedding Mono that
284 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 compilation.
291     * `attach`:
292 Support for the Mono.Management assembly and the
293 VMAttach API (allowing code to be injected into
294 a target VM)
296     * `com`:
297 Disables COM support.
299     * `debug`:
300 Drop debugging support.
302     * `decimal`:
303 Disables support for System.Decimal.
305     * `full_messages`:
306 By default Mono comes with a full table
307 of messages for error codes. This feature
308 turns off uncommon error messages and reduces
309 the runtime size.
311     * `generics`:
312 Generics support.  Disabling this will not
313 allow Mono to run any 2.0 libraries or
314 code that contains generics.
316     * `jit`:
317 Removes the JIT engine from the build, this reduces
318 the executable size, and requires that all code
319 executed by the virtual machine be compiled with
320 Full AOT before execution.
322     * `large_code`:
323 Disables support for large assemblies.
325     * `logging`:
326 Disables support for debug logging.
328     * `pinvoke`:
329 Support for Platform Invocation services,
330 disabling this will drop support for any
331 libraries using DllImport.
333     * `portability`:
334 Removes support for MONO_IOMAP, the environment
335 variables for simplifying porting applications that 
336 are case-insensitive and that mix the Unix and Windows path separators.
338     * `profiler`:
339 Disables support for the default profiler.
341     * `reflection_emit`:
342 Drop System.Reflection.Emit support
344     * `reflection_emit_save`:
345 Drop support for saving dynamically created
346 assemblies (AssemblyBuilderAccess.Save) in
347 System.Reflection.Emit.
349     * `shadow_copy`:
350 Disables support for AppDomain's shadow copies
351 (you can disable this if you do not plan on 
352 using appdomains).
354     * `simd`:
355 Disables support for the Mono.SIMD intrinsics
356 library.
358     * `ssa`:
359 Disables compilation for the SSA optimization
360 framework, and the various SSA-based optimizations.
362 * `--enable-llvm`
363 * `--enable-loadedllvm`
365   * This enables the use of LLVM as a code generation engine
366 for Mono.  The LLVM code generator and optimizer will be 
367 used instead of Mono's built-in code generator for both
368 Just in Time and Ahead of Time compilations.
370   * See http://www.mono-project.com/docs/advanced/mono-llvm/ for the 
371 full details and up-to-date information on this feature.
373   * You will need to have an LLVM built that Mono can link
374 against.
376   * The `--enable-loadedllvm` variant will make the LLVM backend
377 into a runtime-loadable module instead of linking it directly
378 into the main mono binary.
380 * `--enable-big-arrays` - Enable use of arrays with indexes larger
381 than Int32.MaxValue.
383   * By default Mono has the same limitation as .NET on
384 Win32 and Win64 and limits array indexes to 32-bit
385 values (even on 64-bit systems).
387   * In certain scenarios where large arrays are required,
388 you can pass this flag and Mono will be built to
389 support 64-bit arrays.
391   * This is not the default as it breaks the C embedding
392 ABI that we have exposed through the Mono development
393 cycle.
395 * `--enable-parallel-mark`
397   * Use this option to enable the garbage collector to use
398 multiple CPUs to do its work.  This helps performance
399 on multi-CPU machines as the work is divided across CPUS.
401   * This option is not currently the default as we have
402 not done much testing with Mono.
404 * `--enable-dtrace`
406   * On Solaris and MacOS X builds a version of the Mono
407 runtime that contains DTrace probes and can
408 participate in the system profiling using DTrace.
410 * `--disable-dev-random`
412   * Mono uses /dev/random to obtain good random data for
413 any source that requires random numbers.   If your
414 system does not support this, you might want to
415 disable it.
417   * There are a number of runtime options to control this
418 also, see the man page.
420 * `--enable-nacl`
422   * This configures the Mono compiler to generate code
423 suitable to be used by Google's Native Client:
424 http://code.google.com/p/nativeclient/
426   * Currently this is used with Mono's AOT engine as
427 Native Client does not support JIT engines yet.