Skip to content
Newer
Older
100644 526 lines (353 sloc) 13.6 KB
41f5b90 @migueldeicaza testing the scripts
migueldeicaza authored
1
70a513e @migueldeicaza Update README
migueldeicaza authored
2 This is Mono.
0fae05d @migueldeicaza Initial revision
migueldeicaza authored
3
4736c2a @migueldeicaza Testing new repo
migueldeicaza authored
4 1. Installation
5 2. Using Mono
6 3. Directory Roadmap
a6126c1 @migueldeicaza Add mcs man page here, mcs script
migueldeicaza authored
7
04b24f8 @migueldeicaza Updated comments
migueldeicaza authored
8 1. Compilation and Installation
9 ===============================
a6126c1 @migueldeicaza Add mcs man page here, mcs script
migueldeicaza authored
10
efb530c @migueldeicaza Update
migueldeicaza authored
11 a. Build Requirements
12 ---------------------
13
14 To build Mono, you will need the following components:
15
16 * pkg-config
17
18 Available from: http://www.freedesktop.org/Software/pkgconfig
19
12d5959 @illupus Fixes.
illupus authored
20 * glib 2.4
efb530c @migueldeicaza Update
migueldeicaza authored
21
22 Available from: http://www.gtk.org/
23
3e36eb6 @migueldeicaza Update
migueldeicaza authored
24 On Itanium, you must obtain libunwind:
25
26 http://www.hpl.hp.com/research/linux/libunwind/download.php4
27
a48d08a @migueldeicaza Add
migueldeicaza authored
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.
30
31 On Solaris, make sure that you use the GNU toolchain to build the software.
32
efb530c @migueldeicaza Update
migueldeicaza authored
33 Optional dependencies:
34
12d5959 @illupus Fixes.
illupus authored
35 * libgdiplus
efb530c @migueldeicaza Update
migueldeicaza authored
36
37 If you want to get support for System.Drawing, you will need to get
12d5959 @illupus Fixes.
illupus authored
38 Libgdiplus.
efb530c @migueldeicaza Update
migueldeicaza authored
39
1262f54 @illupus Document and warn about the libzlib dependency.
illupus authored
40 * libzlib
41
42 This library and the development headers are required for compression
43 file support in the 2.0 profile.
44
efb530c @migueldeicaza Update
migueldeicaza authored
45 b. Building the Software
46 ------------------------
47
04b24f8 @migueldeicaza Updated comments
migueldeicaza authored
48 If you obtained this package as an officially released tarball,
49 this is very simple, use configure and make:
a6126c1 @migueldeicaza Add mcs man page here, mcs script
migueldeicaza authored
50
04b24f8 @migueldeicaza Updated comments
migueldeicaza authored
51 ./configure --prefix=/usr/local
52 make
53 make install
54
e8436c2 @migueldeicaza Update
migueldeicaza authored
55 Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390,
56 S/390x, AMD64, ARM and PowerPC systems.
f64af1c @migueldeicaza README
migueldeicaza authored
57
04b24f8 @migueldeicaza Updated comments
migueldeicaza authored
58 If you obtained this as a snapshot, you will need an existing
efb530c @migueldeicaza Update
migueldeicaza authored
59 Mono installation. To upgrade your installation, unpack both
60 mono and mcs:
04b24f8 @migueldeicaza Updated comments
migueldeicaza authored
61
efb530c @migueldeicaza Update
migueldeicaza authored
62 tar xzf mcs-XXXX.tar.gz
63 tar xzf mono-XXXX.tar.gz
4286760 @migueldeicaza Update
migueldeicaza authored
64 mv mono-XXX mono
65 mv mcs-XXX mcs
66 cd mono
b358c26 @atsushieno 2003-12-02 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
atsushieno authored
67 ./autogen.sh --prefix=/usr/local
be39e61 @harinath 2004-11-19 Raja R Harinath <rharinath@novell.com>
harinath authored
68 make
04b24f8 @migueldeicaza Updated comments
migueldeicaza authored
69
758861e @migueldeicaza Update
migueldeicaza authored
70 The Mono build system is silent for most compilation commands.
71 To enable a more verbose compile (for example, to pinpoint
72 problems in your makefiles or your system) pass the V=1 flag to make, like this:
73
74 make V=1
75
76
77
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
78 c. Building the software from SVN
57f7b34 @harinath Update to include instructions for the various new
harinath authored
79 ---------------------------------
80
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
81 If you are building the software from SVN, make sure that you
57f7b34 @harinath Update to include instructions for the various new
harinath authored
82 have up-to-date mcs and mono sources:
83
617df62 @migueldeicaza Update
migueldeicaza authored
84 svn co svn+ssh://USER@mono-cvs.ximian.com/source/trunk/mono
85 svn co svn+ssh://USER@mono-cvs.ximian.com/source/trunk/mcs
57f7b34 @harinath Update to include instructions for the various new
harinath authored
86
87 Then, go into the mono directory, and configure:
88
89 cd mono
90 ./autogen.sh --prefix=/usr/local
be39e61 @harinath 2004-11-19 Raja R Harinath <rharinath@novell.com>
harinath authored
91 make
efb530c @migueldeicaza Update
migueldeicaza authored
92
224201b @illupus Mention aclocal/pkg-config misconfiguration.
illupus authored
93 For people with non-standard installations of the auto* utils and of
94 pkg-config (common on misconfigured OSX and windows boxes), you could get
95 an error like this:
96
97 ./configure: line 19176: syntax error near unexpected token `PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...
98
99 This means that you need to set the ACLOCAL_FLAGS environment var
100 when invoking autogen.sh, like this:
101
102 ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/loca
103
104 where $acprefix is the prefix where aclocal has been installed.
105
57f7b34 @harinath Update to include instructions for the various new
harinath authored
106 This will automatically go into the mcs/ tree and build the
47adaf8 @harinath Fix typos and thinkos.
harinath authored
107 binaries there.
efb530c @migueldeicaza Update
migueldeicaza authored
108
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
109 This assumes that you have a working mono installation, and that
110 there's a C# compiler named 'mcs', and a corresponding IL
111 runtime called 'mono'. You can use two make variables
112 EXTERNAL_MCS and EXTERNAL_RUNTIME to override these. e.g., you
113 can say
efb530c @migueldeicaza Update
migueldeicaza authored
114
47adaf8 @harinath Fix typos and thinkos.
harinath authored
115 make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
116
117 If you don't have a working Mono installation
118 ---------------------------------------------
57f7b34 @harinath Update to include instructions for the various new
harinath authored
119
120 If you don't have a working Mono installation, an obvious choice
121 is to install the latest released packages of 'mono' for your
690ab7e @illupus Updates.
illupus authored
122 distribution and running autogen.sh; make; make install in the
123 mono module directory.
57f7b34 @harinath Update to include instructions for the various new
harinath authored
124
690ab7e @illupus Updates.
illupus authored
125 You can also try a slightly more risky approach: this may not work,
126 so start from the released tarball as detailed above.
57f7b34 @harinath Update to include instructions for the various new
harinath authored
127
128 This works by first getting the latest version of the 'monolite'
129 distribution, which contains just enough to run the 'mcs'
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
130 compiler. You do this with:
57f7b34 @harinath Update to include instructions for the various new
harinath authored
131
132 make get-monolite-latest
133
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
134 This will download and automatically gunzip and untar the
135 tarball, and place the files appropriately so that you can then
136 just run:
57f7b34 @harinath Update to include instructions for the various new
harinath authored
137
be39e61 @harinath 2004-11-19 Raja R Harinath <rharinath@novell.com>
harinath authored
138 make
57f7b34 @harinath Update to include instructions for the various new
harinath authored
139
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
140 To ensure that you're using the 'monolite' distribution, you can
141 also try passing EXTERNAL_MCS=false on the make command-line.
142
143 Testing and Installation
e8436c2 @migueldeicaza Update
migueldeicaza authored
144 ------------------------
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
145
146 You can run (part of) the mono and mcs testsuites with the command:
57f7b34 @harinath Update to include instructions for the various new
harinath authored
147
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
148 make check
149
150 All tests should pass.
151
152 If you want more extensive tests, including those that test the
153 class libraries, you need to re-run 'configure' with the
154 '--enable-nunit-tests' flag, and try
57f7b34 @harinath Update to include instructions for the various new
harinath authored
155
be39e61 @harinath 2004-11-19 Raja R Harinath <rharinath@novell.com>
harinath authored
156 make -k check
57f7b34 @harinath Update to include instructions for the various new
harinath authored
157
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
158 Expect to find a few testsuite failures. As a sanity check, you
159 can compare the failures you got with
57f7b34 @harinath Update to include instructions for the various new
harinath authored
160
161 http://go-mono.com/tests/displayTestResults.php
efb530c @migueldeicaza Update
migueldeicaza authored
162
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
163 You can now install mono with:
ddd1fba @migueldeicaza Mhm
migueldeicaza authored
164
165 make install
efb530c @migueldeicaza Update
migueldeicaza authored
166
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
167 Failure to follow these steps may result in a broken installation.
efb530c @migueldeicaza Update
migueldeicaza authored
168
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
169 d. Common Configuration Options
170 -------------------------------
171
172 The following are the configuration options that someone
173 building Mono might want to use:
174
175
176 --with-gc=[boehm, included, sgen, none]
177
178 Selects the garbage collector engine to use, the
179 default is the "included" value.
180
181 included:
182 This is the default value, and its
183 the most feature complete, it will allow Mono
184 to use typed allocations and support the
185 debugger.
186
187 It is essentially a slightly modified Boehm GC
188
189 boehm:
190 This is used to use a system-install Boehm GC,
191 it is useful to test new features available in
192 Boehm GC, but we do not recommend that people
193 use this, as it disables a few features.
194
195 sgen:
196 The under-development Generational GC for
197 Mono, do not use this in production.
198
199 none:
200 Disables the inclusion of a garbage
201 collector.
202
203 --with-tls=__thread,pthread
204
205 Controls how Mono should access thread local storage,
206 pthread forces Mono to use the pthread APIs, while
207 __thread uses compiler-optimized access to it.
208
209 Although __thread is faster, it requires support from
210 the compiler, kernel and libc. Old Linux systems do
211 not support with __thread.
212
213 This value is typically pre-configured and there is no
214 need to set it, unless you are trying to debug a
215 problem.
216
217 --with-sigaltstack=yes,no
218
5d2fdfc @migueldeicaza Update
migueldeicaza authored
219 Experimental: Use at your own risk, it is known to
220 cause problems with garbage collection and is hard to
221 reproduce those bugs.
222
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
223 This controls whether Mono will install a special
224 signal handler to handle stack overflows. If set to
225 "yes", it will turn stack overflows into the
226 StackOverflowException. Otherwise when a stack
227 overflow happens, your program will receive a
228 segmentation fault.
229
230 The configure script will try to detect if your
231 operating system supports this. Some older Linux
232 systems do not support this feature, or you might want
233 to override the auto-detection.
234
1ef0d21 @migueldeicaza Update README
migueldeicaza authored
235 --with-static_mono=yes,no
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
236
237 This controls whether `mono' should link against a
238 static library (libmono.a) or a shared library
239 (libmono.so).
240
241 This defaults to yes, and will improve the performance
242 of the `mono' program.
243
244 This only affects the `mono' binary, the shared
245 library libmono.so will always be produced for
246 developers that want to embed the runtime in their
247 application.
248
249 --with-xen-opt=yes,no
250
251 The default value for this is `yes', and it makes Mono
252 generate code which might be slightly slower on
253 average systems, but the resulting executable will run
254 faster under the Xen virtualization system.
255
256 --with-large-heap=yes,no
257
258 Enable support for GC heaps larger than 3GB.
259
260 This value is set to `no' by default.
261
262 --with-ikvm-native=yes,no
263
264 Controls whether the IKVM JNI interface library is
265 built or not. This is used if you are planning on
266 using the IKVM Java Virtual machine with Mono.
267
268 This defaults to `yes'.
269
6939546 @migueldeicaza Doc update
migueldeicaza authored
270 --with-profile2=yes,no
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
271
6939546 @migueldeicaza Doc update
migueldeicaza authored
272 Whether you want to build the 2.x libraries (support
273 for Generics and the 2.0/3.5 APIS).
274
275 It defaults to `yes'.
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
276
0ccfaa1 @migueldeicaza update
migueldeicaza authored
277 --with-moonlight=yes,no
278
279 Whether you want to generate the Silverlight/Moonlight
280 libraries and toolchain in addition to the default
281 (1.1 and 2.0 APIs).
282
283 This will produce the `smcs' compiler which will reference
ab92e1d @vargaz 2009-03-10 Zoltan Varga <vargaz@gmail.com>
vargaz authored
284 the Silverlight modified assemblies (mscorlib.dll,
0ccfaa1 @migueldeicaza update
migueldeicaza authored
285 System.dll, System.Code.dll and System.Xml.Core.dll) and turn
286 on the LINQ extensions for the compiler.
287
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
288 --with-libgdiplus=installed,sibling,<path>
289
290 This is used to configure where should Mono look for
291 libgdiplus when running the System.Drawing tests.
292
293 It defaults to `installed', which means that the
294 library is available to Mono through the regular
295 system setup.
296
297 `sibling' can be used to specify that a libgdiplus
298 that resides as a sibling of this directory (mono)
299 should be used.
300
301 Or you can specify a path to a libgdiplus.
302
c1052c3 @migueldeicaza Update
migueldeicaza authored
303 --disable-shared-memory
304
305 Use this option to disable the use of shared memory in
306 Mono (this is equivalent to setting the MONO_DISABLE_SHM
307 environment variable, although this removes the feature
308 completely).
309
310 Disabling the shared memory support will disable certain
311 features like cross-process named mutexes.
312
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
313 --enable-minimal=LIST
314
315 Use this feature to specify optional runtime
316 components that you might not want to include. This
317 is only useful for developers embedding Mono that
318 require a subset of Mono functionality.
319
320 The list is a comma-separated list of components that
321 should be removed, these are:
322
323 aot:
324 Disables support for the Ahead of Time
325 compilation.
326
3fffe7c @migueldeicaza Document and add full_messages
migueldeicaza authored
327 attach:
328 Support for the Mono.Management assembly and the
329 VMAttach API (allowing code to be injected into
330 a target VM)
331
8f0599b @migueldeicaza Sort the options in enable-minimal, and add simd
migueldeicaza authored
332 com:
333 Disables COM support.
334
335 debug:
336 Drop debugging support.
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
337
338 decimal:
339 Disables support for System.Decimal.
340
3fffe7c @migueldeicaza Document and add full_messages
migueldeicaza authored
341 full_messages:
342 By default Mono comes with a full table
343 of messages for error codes. This feature
344 turns off uncommon error messages and reduces
345 the runtime size.
346
8f0599b @migueldeicaza Sort the options in enable-minimal, and add simd
migueldeicaza authored
347 generics:
348 Generics support. Disabling this will not
349 allow Mono to run any 2.0 libraries or
350 code that contains generics.
351
352 jit:
353 Removes the JIT engine from the build, this reduces
354 the executable size, and requires that all code
355 executed by the virtual machine be compiled with
356 Full AOT before execution.
357
358 large_code:
359 Disables support for large assemblies.
360
361 logging:
362 Disables support for debug logging.
363
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
364 pinvoke:
365 Support for Platform Invocation services,
366 disabling this will drop support for any
367 libraries using DllImport.
368
9aa41aa @migueldeicaza Document
migueldeicaza authored
369 portability:
370 Removes support for MONO_IOMAP, the environment
371 variables for simplifying porting applications that
372 are case-insensitive and that mix the Unix and Windows path separators.
373
8f0599b @migueldeicaza Sort the options in enable-minimal, and add simd
migueldeicaza authored
374 profiler:
375 Disables support for the default profiler.
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
376
377 reflection_emit:
378 Drop System.Reflection.Emit support
379
acdf04c @vargaz 2008-10-11 Zoltan Varga <vargaz@gmail.com>
vargaz authored
380 reflection_emit_save:
e4c35f9 @migueldeicaza Reformat
migueldeicaza authored
381 Drop support for saving dynamically created
382 assemblies (AssemblyBuilderAccess.Save) in
383 System.Reflection.Emit.
acdf04c @vargaz 2008-10-11 Zoltan Varga <vargaz@gmail.com>
vargaz authored
384
9aa41aa @migueldeicaza Document
migueldeicaza authored
385 shadow_copy:
386 Disables support for AppDomain's shadow copies
387 (you can disable this if you do not plan on
388 using appdomains).
389
8f0599b @migueldeicaza Sort the options in enable-minimal, and add simd
migueldeicaza authored
390 simd:
391 Disables support for the Mono.SIMD intrinsics
392 library.
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
393
394 ssa:
395 Disables compilation for the SSA optimization
396 framework, and the various SSA-based
397 optimizations.
398
1ef0d21 @migueldeicaza Update README
migueldeicaza authored
399 --enable-big-arrays
400
401 This enables the use arrays whose indexes are larger
402 than Int32.MaxValue.
403
404 By default Mono has the same limitation as .NET on
405 Win32 and Win64 and limits array indexes to 32-bit
406 values (even on 64-bit systems).
407
408 In certain scenarios where large arrays are required,
409 you can pass this flag and Mono will be built to
410 support 64-bit arrays.
411
412 This is not the default as it breaks the C embedding
413 ABI that we have exposed through the Mono development
414 cycle.
415
bf32673 @migueldeicaza Update README
migueldeicaza authored
416 --enable-parallel-mark
417
418 Use this option to enable the garbage collector to use
419 multiple CPUs to do its work. This helps performance
420 on multi-CPU machines as the work is divided across CPUS.
421
422 This option is not currently the default as we have
423 not done much testing with Mono.
424
1ef0d21 @migueldeicaza Update README
migueldeicaza authored
425 --enable-dtrace
426
427 On Solaris and MacOS X builds a version of the Mono
428 runtime that contains DTrace probes and can
429 participate in the system profiling using DTrace.
430
431
ed6cb6d @migueldeicaza Update documentation
migueldeicaza authored
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
04b24f8 @migueldeicaza Updated comments
migueldeicaza authored
443 2. Using Mono
444 =============
2a8d4ab @migueldeicaza Update docs
migueldeicaza authored
445
446 Once you have installed the software, you can run a few programs:
447
448 * runtime engine
449
450 mono program.exe
451
452 * C# compiler
453
454 mcs program.cs
455
456 * CIL Disassembler
457
458 monodis program.exe
459
460 See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
461 for further details.
462
04b24f8 @migueldeicaza Updated comments
migueldeicaza authored
463 3. Directory Roadmap
464 ====================
4ca231c added mention of doc/README for those interested in editing website
cheridy authored
465
efb530c @migueldeicaza Update
migueldeicaza authored
466 docs/
467 Technical documents about the Mono runtime.
468
469 data/
470 Configuration files installed as part of the Mono runtime.
70a513e @migueldeicaza Update README
migueldeicaza authored
471
472 mono/
2a8d4ab @migueldeicaza Update docs
migueldeicaza authored
473 The core of the Mono Runtime.
70a513e @migueldeicaza Update README
migueldeicaza authored
474
475 metadata/
2a8d4ab @migueldeicaza Update docs
migueldeicaza authored
476 The object system and metadata reader.
477
690ab7e @illupus Updates.
illupus authored
478 mini/
2a8d4ab @migueldeicaza Update docs
migueldeicaza authored
479 The Just in Time Compiler.
70a513e @migueldeicaza Update README
migueldeicaza authored
480
481 dis/
482 CIL executable Disassembler
483
484 cli/
485 Common code for the JIT and the interpreter.
486
2a8d4ab @migueldeicaza Update docs
migueldeicaza authored
487 io-layer/
488 The I/O layer and system abstraction for
489 emulating the .NET IO model.
490
70a513e @migueldeicaza Update README
migueldeicaza authored
491 cil/
492 Common Intermediate Representation, XML
493 definition of the CIL bytecodes.
494
495 interp/
690ab7e @illupus Updates.
illupus authored
496 Interpreter for CLI executables (obsolete).
70a513e @migueldeicaza Update README
migueldeicaza authored
497
2a8d4ab @migueldeicaza Update docs
migueldeicaza authored
498 arch/
499 Architecture specific portions.
352ad6c @migueldeicaza testing the scripts
migueldeicaza authored
500
efb530c @migueldeicaza Update
migueldeicaza authored
501 man/
502
503 Manual pages for the various Mono commands and programs.
504
e8436c2 @migueldeicaza Update
migueldeicaza authored
505 samples/
506
507 Some simple sample programs on uses of the Mono
508 runtime as an embedded library.
509
efb530c @migueldeicaza Update
migueldeicaza authored
510 scripts/
511
512 Scripts used to invoke Mono and the corresponding program.
513
514 runtime/
515
9d22441 @harinath * README: Update with details about the new build setup.
harinath authored
516 A directory that contains the Makefiles that link the
517 mono/ and mcs/ build systems.
5c726a8 @migueldeicaza Checking out backup
migueldeicaza authored
518
e8436c2 @migueldeicaza Update
migueldeicaza authored
519 ../olive/
520
521 If the directory ../olive is present (as an
522 independent checkout) from the Mono module, that
523 directory is automatically configured to share the
524 same prefix than this module gets.
276025c @gonzalop kick buildbot
gonzalop authored
525
Something went wrong with that request. Please try again.