Mono-3.0.10 test version ReadMe file

Source: Internet
Author: User
Tags emit signal handler unpack

Time: May 15, 2013 18:25:36

This is Mono.

1. Installation
2. Using Mono
3. Directory Roadmap
4. git submodules maintenance

1. Compilation and Installation
====================================

A. Build Requirements
---------------------

On Itanium, you must obtain libunwind:

Http://www.hpl.hp.com/research/linux/libunwind/download.php4

On Solaris, make sure that you used GNU tar to unpack this package,
Solaris tar will not unpack this correctly, and you will get strange errors.

On Solaris, make sure that you use the GNU toolchain to build the software.

Optional dependencies:

* Libgdiplus

If you want to get support for System. Drawing, you will need to get
Libgdiplus. This library in turn requires glib and pkg-config:

* Pkg-config

Available from: http://www.freedesktop.org/Software/pkgconfig

** Glib 2.4

Available from: http://www.gtk.org/

* Libzlib

This library and the development headers are required for compression
File support in the 2.0 profile.

B. Building the Software
------------------------

If you obtained this package as an officially released tarball,
This is very simple, use configure and make:

./Configure -- prefix =/usr/local
Make
Make install

Mono supports a JIT engine on x86, iSCSI, SPARCv9, S/390,
S/390x, AMD64, ARM and PowerPC systems.

If you obtained this as a snapshot, you will need an existing
Mono installation. To upgrade your installation, unpack both
Mono and mcs:

Tar xzf mcs-XXXX.tar.gz
Tar xzf mono-XXXX.tar.gz
Mv mono-XXX mono
Mv mcs-XXX mcs
Cd mono
./Autogen. sh -- prefix =/usr/local
Make

The Mono build system is silent for most compilation commands.
To enable a more verbose compile (for example, to pinpoint
Problems in your makefiles or your system) pass the V = 1 flag to make, like this:

Make V = 1

C. Building the software from GIT
---------------------------------

If you are building the software from GIT, make sure that you
Have up-to-date mcs and mono sources:

If you are an anonymous user:
Git clone git: // github.com/mono/mono.git

If you are a Mono contributors with read/write privileges:
Git clone git@github.com: mono/mono. git

Then, go into the mono directory, and configure:

Cd mono
./Autogen. sh -- prefix =/usr/local
Make

For people with non-standard installations of the auto * utils and
Pkg-config (common on misconfigured OSX and windows boxes), you cocould get
An error like this:

./Configure: line 19176: syntax error near unexpected token 'pkg _ CHECK_MODULES (BASE_DEPENDENCIES ,'...

This means that you need to set the ACLOCAL_FLAGS environment var
When invoking autogen. sh, like this:

ACLOCAL_FLAGS = "-I $ acprefix/share/aclocal"./autogen. sh -- prefix =/usr/loca

Where $ acprefix is the prefix where aclocal has been installed.

This will automatically go into the mcs/tree and build
Binaries there.

This assumes that you have a working mono installation, and that
There's a C # compiler named 'mcs ', and a corresponding IL
Runtime called 'mono'. You can use two make variables
EXTERNAL_MCS and EXTERNAL_RUNTIME to override these. e.g., you
Can say

Make EXTERNAL_MCS =/foo/bar/mcs EXTERNAL_RUNTIME =/somewhere/else/mono

If you don't have a working Mono installation
---------------------------------------------

If you don't have a working Mono installation, an obvious choice
Is to install the latest released packages of 'mono' for your
Distribution and running autogen. sh; make install in
Mono module directory.

You can also try a slightly more risky approach: this may not work,
So start from the released tarball as detailed abve.

This works by first getting the latest version of the 'monolite'
Distribution, which contains just enough to run the 'mcs'
Compiler. You do this:

# Run the following line after./autogen. sh
Make get-monolite-latest

This will download and automatically gunzip and untar
Tarball, and place the files appropriately so that you can then
Just run:

Make EXTERNAL_MCS =$ {PWD}/mcs/class/lib/monolite/gmcs.exe

And that will use the files downloaded by 'make get-monolite-latest.

Testing and Installation
------------------------

You can run (part of) the mono and mcs testsuites with the command:

Make check

All tests shocould pass.

If you want more extensive tests, including those that test
Class libraries, you need to re-run 'configure 'with
'-- Enable-nunit-tests' flag, and try

Make-k check

Failed CT to find a few testsuite failures. As a sanity check, you
Can compare the failures you got

Https://wrench.mono-project.com/Wrench/

You can now install mono:

Make install

You can verify your installation by using the mono-test-install
Script, it can diagnose some common problems with Mono's install.

Failure to follow these steps may result in a broken installation.

D. Configuration Options
------------------------

The following are the configuration options that someone
Building Mono might want to use:

-- With-sgen = yes, no

Generational GC support: Used to enable or disable
Compilation of a Mono runtime with the SGen garbage collector.

On platforms that support it, after building Mono, you
Will have both a mono binary and a mono-sgen binary.
Mono uses Boehm, while mono-sgen uses the Simple
Generational GC.

-- With-gc = [boehm, encoded ded, sgen, none]

Selects the default Boehm garbage collector engine
Use, the default is the "encoded" value.

Included:
This is the default value, and its
The most feature complete, it will allow Mono
To use typed allocations and support
Debugger.

It is essential a slightly modified Boehm GC

Boehm:
This is used to use a system-install Boehm GC,
It is useful to test new features available in
Boehm GC, but we do not recommend that people
Use this, as it disables a few features.

None:
Disables the partition sion of a garbage
Collector.

-- With-tls =__ thread, pthread

Controls how Mono shocould access thread local storage,
Pthread forces Mono to use the pthread APIs, while
_ Thread uses compiler-optimized access to it.

Although _ thread is faster, it requires support from
The compiler, kernel and libc. Old Linux systems do
Not support with _ thread.

This value is typically pre-configured and there is no
Need to set it, unless you are trying to debug
Problem.

-- With-sigaltstack = yes, no

Experimental: Use at your own risk, it is known
Cause problems with garbage collection and is hard
Reproduce those bugs.

This controls whether Mono will install a special
Signal handler to handle stack overflows. If set
"Yes", it will turn stack overflows into
StackOverflowException. Otherwise when a stack
Overflow happens, your program will receive
Segmentation fault.

The configure script will try to detect if your
Operating system supports this. Some older Linux
Systems do not support this feature, or you might want
To override the auto-detection.

-- With-static_mono = yes, no

This controls whether 'mono' shoshould link against
Static library (libmono. a) or a shared library
(Libmono. so ).

This defaults to yes, and will improve the performance
Of the 'mono' program.

This only affects the 'mono' binary, the shared
Library libmono. so will always be produced
Developers that want to embed the runtime in their
Application.

-- With-xen-opt = yes, no

The default value for this is 'yes', and it makes Mono
Generate code which might be slightly slower on
Average systems, but the resulting executable will run
Faster under the Xen virtualization system.

-- With-large-heap = yes, no

Enable support for GC heaps larger than 3 GB.

This value is set to 'no' by default.

-- Enable-small-config = yes, no

Enable some tweaks to reduce memory usage and disk footprint
The expense of some capabilities. Typically this means that
Number of threads that can be created is limited (256), that
Maxmimum heap size is also reduced (256 MB) and other such limitations
That still make mono useful, but more suitable to embedded devices
(Like mobile phones ).

This value is set to 'no' by default.

-- With-ikvm-native = yes, no

Controls whether the ikvm jni interface library is
Built or not. This is used if you are planning on
Using the IKVM Java Virtual machine with Mono.

This defaults to 'yes '.

-- With-profile4 = yes, no

Whether you want to build the 4.x profile libraries
And runtime.

It ults to 'yes '.

-- With-moonlight = yes, no

Whether you want to generate the Silverlight/Moonlight
Libraries and toolchain in addition to the default
(1.1 and 2.0 APIs ).

This will produce the 'smcs 'compiler which will reference
The Silverlight modified assemblies (mscorlib. dll,
System. dll, System. Code. dll and System. Xml. Core. dll) and turn
On the LINQ extensions for the compiler.

-- With-moon-gc = boehm, sgen

Select the GC to use for Moonlight.

Boehm:
Selects the Boehm Garbage Collector, with the same flags
As the regular Mono build. This is the default.

Sgen:
Selects the new SGen Garbage Collector, which provides
Generational GC support, using the same flags as
Mono-sgen build.

This defaults to 'boehm '.

-- With-libgdiplus = installed, sibling, <path>

This is used to configure where shoshould Mono look
Libgdiplus when running the System. Drawing tests.

It defaults to 'installed', which means that
Library is available to Mono through the regular
System setup.

'Sibling' can be used to specify that a libgdiplus
That resides as a sibling of this directory (mono)
Shocould be used.

Or you can specify a path to a libgdiplus.

-- Disable-shared-memory

Use this option to disable the use of shared memory in
Mono (this is equivalent to setting the MONO_DISABLE_SHM
Environment variable, although this removes the feature
Completely ).

Disabling the shared memory support will disable certain
Features like cross-process named mutexes.

-- Enable-minimal = LIST

Use this feature to specify optional runtime
Components that you might not want to include. This
Is only useful for developers embedding Mono that
Require a subset of Mono functionality.

The list is a comma-separated list of components that
Shocould be removed, these are:

Aot:
Disables support for the Ahead of Time
Compilation.

Attach:
Support for the Mono. Management assembly and
VMAttach API (allowing code to be injected
A target VM)

Com:
Disables COM support.

Debug:
Drop debugging support.

Decimal:
Disables support for System. Decimal.

Full_messages:
By default Mono comes with a full table
Of messages for error codes. This feature
Turns off uncommon error messages and CES
The runtime size.

Generics:
Generics support. Disabling this will not
Allow Mono to run any 2.0 libraries or
Code that contains generics.

Jit:
Removes the JIT engine from the build, this has CES
The executable size, and requires that all code
Executed by the virtual machine be compiled
Full AOT before execution.

Large_code:
Disables support for large assemblies.

Logging:
Disables support for debug logging.

Pinvoke:
Support for Platform Invocation services,
Disabling this will drop support for any
Libraries using DllImport.

Portability:
Removes support for MONO_IOMAP, the environment
Variables for simplifying porting applications that
Are case-insensitive and that mix the Unix and Windows path separators.

Profiler:
Disables support for the default profiler.

Reflection_emit:
Drop System. Reflection. Emit support

Reflection_emit_save:
Drop support for saving dynamically created
Assemblies (AssemblyBuilderAccess. Save) in
System. Reflection. Emit.

Shadow_copy:
Disables support for AppDomain's shadow copies
(You can disable this if you do not plan on
Using appdomains ).

Simd:
Disables support for the Mono. SIMD intrinsics
Library.

Ssa:
Disables compilation for the SSA optimization
Framework, and the varous SSA-based
Optimizations.

-- Enable-llvm
-- Enable-loadedllvm

This enables the use of LLVM as a code generation engine
For Mono. The LLVM code generator and optimizer will be
Used instead of Mono's built-in code generator for both
Just in Time and Ahead of Time compilations.

See the http://www.mono-project.com/Mono_LLVM for
Full details and up-to-date information on this feature.

You will need to have an LLVM built that Mono can link
Against,

The -- enable-loadedllvm variant will make the llvm backend
Into a runtime-loadable module instead of linking it directly
Into the main mono binary.

-- Enable-big-arrays

This enables the use arrays whose indexes are larger
Than Int32.MaxValue.

By default Mono has the same limitation as. NET on
Win32 and Win64 and limits array indexes to 32-bit
Values (even on 64-bit systems ).

In certain scenarios where large arrays are required,
You can pass this flag and Mono will be built
Support 64-bit arrays.

This is not the default as it breaks the C embedding
ABI that we have exposed through the Mono development
Cycle.

-- Enable-parallel-mark

Use this option to enable the garbage collector to use
Multiple CPUs to do its work. This helps performance
On multi-CPU machines as the work is divided into ss cpus.

This option is not currently the default as we have
Not done much testing with Mono.

-- Enable-dtrace

On Solaris and MacOS X builds a version of the Mono
Runtime that contains DTrace probes and can
Participant in the system profiling using DTrace.

-- Disable-dev-random

Mono uses/dev/random to obtain good random data
Any source that requires random numbers. If your
System does not support this, you might want
Disable it.

There are a number of runtime options to control this
Also, see the man page.

-- Enable-nacl

This configures the Mono compiler to generate code
Suitable to be used by Google's Native Client:

Http://code.google.com/p/nativeclient/

Currently this is used with Mono's AOT engine
Native Client does not support JIT engines yet.

2. Using Mono
==================

Once you have installed the software, you can run a few programs:

* Runtime engine

Mono program.exe

* C # compiler

Mcs program. cs

* Cel Disassembler

Monodis program.exe

See the man pages for mono (1), mint (1), monodis (1) and mcs (2)
For further details.

3. Directory Roadmap
================================

Docs/
Technical documents about the Mono runtime.

Data/
Configuration files installed as part of the Mono runtime.

Mono/
The core of the Mono Runtime.

Metadata/
The object system and metadata reader.

Mini/
The Just in Time Compiler.

Dis/
Cel executable Disassembler

Cli/
Common code for the JIT and the interpreter.

Io-layer/
The I/O layer and system defined action
Emulating the. net io model.

Pencil/
Common Intermediate Representation, XML
Definition of the pencil bytecodes.

Interp/
Interpreter for CLI executables (obsolete ).

Arch/
Architecture specific portions.

Man/

Manual pages for the various Mono commands and programs.

Samples/

Some simple sample programs on uses of the Mono
Runtime as an embedded library.

Scripts/

Scripts used to invoke Mono and the corresponding program.

Runtime/

A directory that contains the Makefiles that link
Mono/and mcs/build systems.

../Olive/

If the directory ../olive is present (as
Independent checkout) from the Mono module, that
Directory is automatically configured to share
Same prefix than this module gets.

4. Git submodules maintenance
==================================

Read documentation at http://mono-project.com/Git_Submodule_Maintenance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.