Welcome to mirror list, hosted at ThFree Co, Russian Federation.

compiling « web - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 95281a93683b63120272fb9b8edc1914a76695f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
* Compiling Mono

	This document describes how to compile and install Mono from
	its source code.  If you are only interested in running Mono,
	you might want to install Mono from packages, which have been
	tested.

	The core of Mono is split in two components:

	<ul>
		* C components (available in the mono package)

		* C# components (available in the mcs package).
	</ul>

	Mono is also available in various forms:

	<dl>
		<dt>Officially <a href="download.html">released</a> packages.</dt>
		<dd>
		  <p>This is the format of choice for people to use, since these
		  have been tested and are known to build and work. 
		</dd>
		<dt><a href="daily">Daily</a> packages.</dt>
		<dd>
		  <p>This is a service offered for people who want to try out the
		  daily changes. Baked daily.</dd>
		<dt>CVS source code.</dt>
		<dd>
		  <p>These are available to Mono <a href="ccvs.html">developers</a> and
		  also for enthusiasts through <a href="anoncvs.html">anonymous CVS</a>. 
		</dd>
		<dt>CVS snapshots.</dt>
		<dd>
		  <p>Available for curious developers which do not necessarily want to 
		  install the CVS source.  Baked daily.
		</dd>
	</dl>

* Compiling the code

	There are a number of ways of compiling Mono

	<ul>
		<li>From the <a href="#scripts">scripts</A>

		<LI><a href="#install">Manually</a> for the first time. 

		<li>Manually, <a href="#upgrade">while upgrading</a> to CVS
	</ul>

	(which is an easy way to get the latest CVS information)

<a name="scripts">
* Compiling with scripts

	These scripts should be used for installing from packages, specially
	on Windows, where dependencies have not always been installed.

	There are scripts to help build mono for both Unix and Windows.  Get
	<a href="mono-build.sh">mono-build.sh</a> for Unix, or <a
	href="mono-build-w32.sh">mono-build-w32.sh</a> for Windows.
	These scripts automate the installation of GLIB and pkgconfig
	(building from source on Unix, and using binary packages
	provided by the GIMP for Windows project on Windows.)  To use
	the script, follow these simple steps:

	<ul>
		* Save the script for your platform somewhere (e.g. /usr/local/bin)
		* Make the script executable (i.e chmod 755 /usr/local/bin/mono-build.sh)
		* Create a directory to hold the mono source, and the compiled binaries (e.g. mkdir ~/mono)
		* Change to the new directory (i.e. cd ~/mono)
		* run the script (i.e. /usr/local/bin/mono-build.sh)
	</ul>

	The script requires wget on either platform, and building the
	software requires make, gcc, automake, autoconf, and libtool.
	You should install these packages from your distribution or
	with the cygwin installer. You should also take care of setting
	the right environment variables as the PKG_CONFIG_FLAGS, etc.

	The script will download required packages from
	www.go-mono.com and do a cvs checkout of mono in the current
	directory.  <b>IMPORTANT!:</b> The cvs server chosen defaults to 
	anonymous cvs;
	set your CVSROOT environment variable before running the script to
	select a particular cvs server.

<a name="install">

** Building the software manually

	You will need to obtain the Mono dependencies first: <a
	href="http://www.gtk.org">glib 2.x</a> and 
	<a href="http://www.freedesktop.org/software/pkgconfig">pkg-config</a>.

*** Building From Packages

	This applies to both the officially released packages, as well as the
	daily tarball packages.

	<ul>
		Unpack the Mono runtime distribution:
		<pre class="shell">
		tar xzvf mono-X.XX.tar.gz
		cd mono-X.XX</pre>
		<p>

		Then configure, compile and install:

		<pre class="shell">
		./configure --prefix=/usr/local
		make
		make install</pre>

		This will give you a runtime, C# compiler and runtime
		libraries.  

		If you want to recompile the runtime and the compiler,
		follow these steps, first unpack the MCS package:

		<pre class="shell">
		tar xzvf mcs-X.XX.tar.gz</pre>

		Then use the following command to compile and install:

		<pre class="shell">
		./configure --profile=atomic 
		make</pre>

		You can change /usr/local to something else if you want.
	</ul>

*** Building from CVS

	To upgrade your Mono installation from CVS, it is very
	important that you update your Mono and MCS modules from CVS
	at the same time.  Failure to do so might result in a
	problematic installation as the runtime and the class
	libraries will be out of sync.

	Run the following commands to update your CVS tree (more
	details in <a href="ccvs.html">Cvs and Mono</a> and the <A
	href="anoncvs.html">AnonCVS and Mono</a> pages). 

	<pre>
	(cd mono; cvs update -dP .)
	(cd mcs; cvs update -dP .)
	</pre>

	Then you can run:

	<pre>
	(cd mono; make bootstrap)
	</pre>

	Now you can install the result:

	<pre>
	(cd mono; make install)
	</pre>

	Notice that following the above procedure does not require you
	to manually install the software in the `mcs' directory, as
	the relevant files will be copied by the `mono' makefiles.

* Software resources and notes

		The required and additional software can be downloaded here:

		* Microsoft's .NET Framework SDK from 
		  <a href="http://msdn.microsoft.com/downloads">
		  msdn.microsoft.com/downloads</a>.

		* Cygwin and the GNU Make tools from  
		  <a href="http://www.cygwin.com">www.cygwin.com</a>.
		  Some people observed problems with autoconf 2.52. Installing 
		  autoconf 2.13 helped in those cases.

		* Precompiled GLIB 2.0 and pkg-config packages (and
		  their dependencies) by the <a href="http://www.gimp.org/~tml/gimp/win32//index.html">GIMP for Windows</a> project from
		  <a href="http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip">http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip</a><br>
		  <a href="http://www.go-mono.com/archive/glib-2.0.4-20020703.zip">http://www.go-mono.com/archive/glib-2.0.4-20020703.zip</a> <br>
		  <a href="http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip">http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip</a> <br>
		  <a href="http://www.go-mono.com/archive/libiconv-1.7.zip">http://www.go-mono.com/archive/libiconv-1.7.zip</a> <br>
		  <a href="http://www.go-mono.com/archive/libiconv-dev-1.7.zip">http://www.go-mono.com/archive/libiconv-dev-1.7-20020101.zip</a> <br>
		  <a href="http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip">http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip</a><br>


		* Download the Mono source code from the
		  <a href="download.html">packaged versions</a> or
		  the <a href="http://www.go-mono.com/snapshots">
		  nightly snapshots</a> or the <a href="anoncvs.html">
		  Anonymous CVS</a>.  The nightly snapshots are done every 
		  night at 10pm EST (Boston Time). The nightly snapshots are 
		  not guaranteed to build, but most of the time they should.
	</ul>


*** Notes on compiling GLIB 2.0 and pkg-config from source:


	<ul>

		* Some people observed problems with autoconf 2.52. Installing 
		  autoconf 2.13 helped in those cases (don't forget to do a
		  `make maintainer-clean' after the update).

		* Download, compile and install <a href="http://www.freedesktop.org/software/pkgconfig">pkg-config</a> from source.
              (I had to change line 674 of
              <nobr><tt>pkg-config-0.8.0/glib-1.2.8/gstrfuncs.c</tt></nobr> from 
		  <nobr><tt>extern char *strsignal (int sig);</tt></nobr> to
		  <nobr><tt>extern const char *strsignal (int sig);</tt></nobr>.

<pre class="shell">
tar xzvf pkg-config-0.8.0.tar.gz
cd pkg-config-0.8.0
./configure --prefix=/usr
make
make install
</pre>

		* Download, compile and install <a href="ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.7.tar.gz">libiconv</a> from source.<br>
		  If you dont have MS Visual C/C++ 4.0 or 5.0 or 6.0 you can also try
		  the binary package available at <a
		  href="http://www.gimp.org/~tml/gimp/win32/libiconv-1.9.1.bin.woe32.zip">
		  http://www.gimp.org/~tml/gimp/win32/libiconv-1.9.1.bin.woe32.zip</a>


		* Download, compile and install the 
		  <a href="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.6.tar.gz">
		  glib 2.0</a> from source.

	</ul>