Fixing the broken icon of centos-s390x
[mono.git] / README.md
1 Mono is a software platform designed to allow developers to easily
2 create cross platform applications.  It is an open source
3 implementation of Microsoft's .NET Framework based on the ECMA
4 standards for C# and the Common Language Runtime.
5
6 [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mono/mono?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7
8 1. [Compilation and Installation](#compilation-and-installation)
9 2. [Using Mono](#using-mono)
10 3. [Directory Roadmap](#directory-roadmap)
11 4. [Contributing to Mono](#contributing-to-mono)
12 5. [Reporting bugs](#reporting-bugs)
13 6. [Configuration Options](#configuration-options)
14 7. [Working with Submodules](#working-with-submodules)
15
16 **Build Status**
17
18 Officially supported architectures:
19
20 | debian-amd64            | debian-i386            | debian-armel            | debian-armhf            | windows-amd64             |
21 |-------------------------|------------------------|-------------------------|-------------------------|---------------------------|
22 | [![debian-amd64][1]][2] | [![debian-i386][3]][4] | [![debian-armel][5]][6] | [![debian-armhf][7]][8] | [![windows-amd64][9]][10] |
23
24 Community supported architectures:
25
26 | centos-s390x              |
27 |---------------------------|
28 | [![centos-s390x][11]][12] |
29
30 [1]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/badge/icon
31 [2]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/
32 [3]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/badge/icon
33 [4]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/
34 [5]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/badge/icon
35 [6]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/
36 [7]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/badge/icon
37 [8]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/
38 [9]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
39 [10]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
40 [11]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
41 [12]: https://jenkins.mono-project.com/job/z/label=centos-s390x
42
43 Compilation and Installation
44 ============================
45
46 Building the Software
47 ---------------------
48
49 Please see our guides for building Mono on
50 [Mac OS X](http://www.mono-project.com/docs/compiling-mono/mac/),
51 [Linux](http://www.mono-project.com/docs/compiling-mono/linux/) and 
52 [Windows](http://www.mono-project.com/docs/compiling-mono/windows/).
53
54 Note that building from Git assumes that you already have Mono installed,
55 so please download and [install the latest Mono release](http://www.mono-project.com/download/)
56 before trying to build from Git. This is required because the Mono build
57 relies on a working Mono C# compiler to compile itself
58 (also known as [bootstrapping](http://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
59
60 If you don't have a working Mono installation
61 ---------------------------------------------
62
63 If you don't have a working Mono installation, you can try a slightly
64 more risky approach: getting the latest version of the 'monolite' distribution,
65 which contains just enough to run the 'mcs' compiler. You do this with:
66
67     # Run the following line after ./autogen.sh
68     make get-monolite-latest
69
70 This will download and place the files appropriately so that you can then
71 just run:
72
73     make
74
75 The build will then use the files downloaded by `make get-monolite-latest`.
76
77 Testing and Installation
78 ------------------------
79
80 You can run the mono and mcs test suites with the command: `make check`.
81
82 Expect to find a few test suite failures. As a sanity check, you
83 can compare the failures you got with [https://wrench.mono-project.com/Wrench/](https://wrench.mono-project.com/Wrench/)
84 and [http://jenkins.mono-project.com/](http://jenkins.mono-project.com/).
85
86 You can now install mono with: `make install`
87
88 You can verify your installation by using the mono-test-install
89 script, it can diagnose some common problems with Mono's install.
90 Failure to follow these steps may result in a broken installation. 
91
92 Using Mono
93 ==========
94
95 Once you have installed the software, you can run a few programs:
96
97 * `mono program.exe` runtime engine
98
99 * `mcs program.cs` C# compiler 
100
101 * `monodis program.exe` CIL Disassembler
102
103 See the man pages for mono(1), mcs(1) and monodis(1) for further details.
104
105 Directory Roadmap
106 =================
107
108 * `data/` - Configuration files installed as part of the Mono runtime.
109
110 * `docs/` - Technical documents about the Mono runtime.
111
112 * `external/` - Git submodules for external libraries (Newtonsoft.Json, ikvm, etc).
113
114 * `man/` - Manual pages for the various Mono commands and programs.
115
116 * `mcs/` - The class libraries, compiler and tools
117
118   * `class/` - The class libraries (like System.*, Microsoft.Build, etc.)
119
120   * `mcs/` - The Mono C# compiler written in C#
121
122   * `tools/` - Tools like gacutil, ikdasm, mdoc, etc.
123
124 * `mono/` - The core of the Mono Runtime.
125
126   * `arch/` - Architecture specific portions.
127
128   * `cil/` - Common Intermediate Representation, XML
129 definition of the CIL bytecodes.
130
131   * `dis/` - CIL executable Disassembler
132
133   * `io-layer/` - The I/O layer and system abstraction for 
134 emulating the .NET IO model.
135
136   * `metadata/` - The object system and metadata reader.
137
138   * `mini/` - The Just in Time Compiler.
139
140 * `runtime/` - A directory that contains the Makefiles that link the
141 mono/ and mcs/ build systems.
142
143 * `samples/` -Some simple sample programs on uses of the Mono
144 runtime as an embedded library.   
145
146 * `scripts/` - Scripts used to invoke Mono and the corresponding program.
147
148 Contributing to Mono
149 ====================
150
151 Before submitting changes to Mono, please review the [contribution
152 guidelines](http://www.mono-project.com/community/contributing/).
153 Please pay particular attention to the [Important
154 Rules](http://www.mono-project.com/community/contributing/#important-rules)
155 section.
156
157 Reporting bugs
158 ==============
159
160 To submit bug reports, please use [Xamarin's
161 Bugzilla](https://bugzilla.xamarin.com/)
162
163 Please use the search facility to ensure the same bug hasn't already
164 been submitted and follow our
165 [guidelines](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
166 on how to make a good bug report.
167
168 Configuration Options
169 =====================
170
171 The following are the configuration options that someone building Mono
172 might want to use:
173
174 * `--with-sgen=yes,no` - Generational GC support: Used to enable or
175 disable the compilation of a Mono runtime with the SGen garbage
176 collector.
177
178   * On platforms that support it, after building Mono, you will have
179 both a `mono` binary and a `mono-sgen` binary. `mono` uses Boehm,
180 while `mono-sgen` uses the Simple Generational GC.
181
182 * `--with-gc=[included, boehm, none]` - Selects the default Boehm
183 garbage collector engine to use.
184
185   * *included*: (*slighty modified Boehm GC*) This is the default
186 value for the Boehm GC, and it's the most feature complete, it will
187 allow Mono to use typed allocations and support the debugger.
188
189   * *boehm*: This is used to use a system-install Boehm GC, it is
190 useful to test new features available in Boehm GC, but we do not
191 recommend that people use this, as it disables a few features.
192
193   * *none*:
194 Disables the inclusion of a garbage collector.
195
196   * This defaults to `included`.
197
198 * `--with-tls=__thread,pthread`
199
200   * Controls how Mono should access thread local storage,
201 pthread forces Mono to use the pthread APIs, while
202 __thread uses compiler-optimized access to it.
203
204   * Although __thread is faster, it requires support from
205 the compiler, kernel and libc. Old Linux systems do
206 not support with __thread.
207
208   * This value is typically pre-configured and there is no
209 need to set it, unless you are trying to debug a problem.
210
211 * `--with-sigaltstack=yes,no`
212
213   * **Experimental**: Use at your own risk, it is known to
214 cause problems with garbage collection and is hard to
215 reproduce those bugs.
216
217   * This controls whether Mono will install a special
218 signal handler to handle stack overflows. If set to
219 `yes`, it will turn stack overflows into the
220 StackOverflowException. Otherwise when a stack
221 overflow happens, your program will receive a
222 segmentation fault.
223
224   * The configure script will try to detect if your
225 operating system supports this. Some older Linux
226 systems do not support this feature, or you might want
227 to override the auto-detection.
228
229 * `--with-static_mono=yes,no`
230
231   * This controls whether `mono` should link against a
232 static library (libmono.a) or a shared library
233 (libmono.so). 
234
235   * This defaults to `yes`, and will improve the performance
236 of the `mono` program. 
237
238   * This only affects the `mono' binary, the shared
239 library libmono.so will always be produced for
240 developers that want to embed the runtime in their
241 application.
242
243 * `--with-xen-opt=yes,no` - Optimize code for Xen virtualization.
244
245   * It makes Mono generate code which might be slightly
246 slower on average systems, but the resulting executable will run
247 faster under the Xen virtualization system.
248
249   * This defaults to `yes`.
250
251 * `--with-large-heap=yes,no` - Enable support for GC heaps larger than 3GB.
252
253   * This defaults to `no`.
254
255 * `--enable-small-config=yes,no` - Enable some tweaks to reduce memory usage
256 and disk footprint at the expense of some capabilities.
257
258   * Typically this means that the number of threads that can be created
259 is limited (256), that the maximum heap size is also reduced (256 MB)
260 and other such limitations that still make mono useful, but more suitable
261 to embedded devices (like mobile phones).
262
263   * This defaults to `no`.
264
265 * `--with-ikvm-native=yes,no` - Controls whether the IKVM JNI interface library is
266 built or not.
267
268   * This is used if you are planning on
269 using the IKVM Java Virtual machine with Mono.
270
271   * This defaults to `yes`.
272
273 * `--with-profile4=yes,no` - Whether you want to build the 4.x profile libraries
274 and runtime.
275
276   * This defaults to `yes`.
277
278 * `--with-libgdiplus=installed,sibling,<path>` - Configure where Mono
279 searches for libgdiplus when running System.Drawing tests.
280
281   * It defaults to `installed`, which means that the
282 library is available to Mono through the regular
283 system setup.
284
285   * `sibling` can be used to specify that a libgdiplus
286 that resides as a sibling of this directory (mono)
287 should be used.
288
289  * Or you can specify a path to a libgdiplus.
290
291 * `--disable-shared-memory`
292
293   * Use this option to disable the use of shared memory in
294 Mono (this is equivalent to setting the MONO_DISABLE_SHM
295 environment variable, although this removes the feature
296 completely).
297
298   * Disabling the shared memory support will disable certain
299 features like cross-process named mutexes.
300
301 * `--enable-minimal=LIST`
302
303   * Use this feature to specify optional runtime
304 components that you might not want to include.  This
305 is only useful for developers embedding Mono that
306 require a subset of Mono functionality.
307   * The list is a comma-separated list of components that
308 should be removed, these are:
309
310     * `aot`:
311 Disables support for the Ahead of Time compilation.
312
313     * `attach`:
314 Support for the Mono.Management assembly and the
315 VMAttach API (allowing code to be injected into
316 a target VM)
317
318     * `com`:
319 Disables COM support.
320
321     * `debug`:
322 Drop debugging support.
323
324     * `decimal`:
325 Disables support for System.Decimal.
326
327     * `full_messages`:
328 By default Mono comes with a full table
329 of messages for error codes. This feature
330 turns off uncommon error messages and reduces
331 the runtime size.
332
333     * `generics`:
334 Generics support.  Disabling this will not
335 allow Mono to run any 2.0 libraries or
336 code that contains generics.
337
338     * `jit`:
339 Removes the JIT engine from the build, this reduces
340 the executable size, and requires that all code
341 executed by the virtual machine be compiled with
342 Full AOT before execution.
343
344     * `large_code`:
345 Disables support for large assemblies.
346
347     * `logging`:
348 Disables support for debug logging.
349
350     * `pinvoke`:
351 Support for Platform Invocation services,
352 disabling this will drop support for any
353 libraries using DllImport.
354
355     * `portability`:
356 Removes support for MONO_IOMAP, the environment
357 variables for simplifying porting applications that 
358 are case-insensitive and that mix the Unix and Windows path separators.
359
360     * `profiler`:
361 Disables support for the default profiler.
362
363     * `reflection_emit`:
364 Drop System.Reflection.Emit support
365
366     * `reflection_emit_save`:
367 Drop support for saving dynamically created
368 assemblies (AssemblyBuilderAccess.Save) in
369 System.Reflection.Emit.
370
371     * `shadow_copy`:
372 Disables support for AppDomain's shadow copies
373 (you can disable this if you do not plan on 
374 using appdomains).
375
376     * `simd`:
377 Disables support for the Mono.SIMD intrinsics
378 library.
379
380     * `ssa`:
381 Disables compilation for the SSA optimization
382 framework, and the various SSA-based optimizations.
383
384 * `--enable-llvm`
385 * `--enable-loadedllvm`
386
387   * This enables the use of LLVM as a code generation engine
388 for Mono.  The LLVM code generator and optimizer will be 
389 used instead of Mono's built-in code generator for both
390 Just in Time and Ahead of Time compilations.
391
392   * See http://www.mono-project.com/docs/advanced/mono-llvm/ for the 
393 full details and up-to-date information on this feature.
394
395   * You will need to have an LLVM built that Mono can link
396 against.
397
398   * The `--enable-loadedllvm` variant will make the LLVM backend
399 into a runtime-loadable module instead of linking it directly
400 into the main mono binary.
401
402 * `--enable-big-arrays` - Enable use of arrays with indexes larger
403 than Int32.MaxValue.
404
405   * By default Mono has the same limitation as .NET on
406 Win32 and Win64 and limits array indexes to 32-bit
407 values (even on 64-bit systems).
408
409   * In certain scenarios where large arrays are required,
410 you can pass this flag and Mono will be built to
411 support 64-bit arrays.
412
413   * This is not the default as it breaks the C embedding
414 ABI that we have exposed through the Mono development
415 cycle.
416
417 * `--enable-parallel-mark`
418
419   * Use this option to enable the garbage collector to use
420 multiple CPUs to do its work.  This helps performance
421 on multi-CPU machines as the work is divided across CPUS.
422
423   * This option is not currently the default as we have
424 not done much testing with Mono.
425
426 * `--enable-dtrace`
427
428   * On Solaris and MacOS X builds a version of the Mono
429 runtime that contains DTrace probes and can
430 participate in the system profiling using DTrace.
431
432 * `--disable-dev-random`
433
434   * Mono uses /dev/random to obtain good random data for
435 any source that requires random numbers.   If your
436 system does not support this, you might want to
437 disable it.
438
439   * There are a number of runtime options to control this
440 also, see the man page.
441
442 * `--enable-nacl`
443
444   * This configures the Mono compiler to generate code
445 suitable to be used by Google's Native Client:
446 http://code.google.com/p/nativeclient/
447
448   * Currently this is used with Mono's AOT engine as
449 Native Client does not support JIT engines yet.
450
451 Working With Submodules
452 =======================
453
454 Mono references several external git submodules, for example
455 a fork of Microsoft's reference source code that has been altered
456 to be suitable for use with the Mono runtime.
457
458 This section describes how to use it.
459
460 An initial clone should be done recursively so all submodules will also be
461 cloned in a single pass:
462
463         $ git clone --recursive git@github.com:mono/mono
464
465 Once cloned, submodules can be updated to pull down the latest changes.
466 This can also be done after an initial non-recursive clone:
467
468         $ git submodule update --init --recursive
469
470 To pull external changes into a submodule:
471
472         $ cd <submodule>
473         $ git pull origin <branch>
474         $ cd <top-level>
475         $ git add <submodule>
476         $ git commit
477
478 By default, submodules are detached because they point to a specific commit.
479 Use `git checkout` to move back to a branch before making changes:
480
481         $ cd <submodule>
482         $ git checkout <branch>
483         # work as normal; the submodule is a normal repo
484         $ git commit/push new changes to the repo (submodule)
485
486         $ cd <top-level>
487         $ git add <submodule> # this will record the new commits to the submodule
488         $ git commit
489
490 To switch the repo of a submodule (this should not be a common or normal thing
491 to do at all), first edit `.gitmodules` to point to the new location, then:
492
493         $ git submodule sync -- <path of the submodule>
494         $ git submodule update --recursive
495         $ git checkout <desired new hash or branch>
496
497 The desired output diff is a change in `.gitmodules` to reflect the
498 change in the remote URL, and a change in /<submodule> where you see
499 the desired change in the commit hash.