Building mono from source

From LSDevLinux
Revision as of 18:25, 11 February 2010 by Mayhewn (talk | contribs) (Get, patch, build, install mono: Better explanation of why /usr/local/bin is in PATH)

Jump to: navigation, search

Dependencies

$ sudo apt-get install bison mono-devel libgif-dev git-core

Get, patch, build, install mono

To build the custom mono, do these steps:

$ git clone git://git.lsdev.sil.org/mono-calgary.git
$ cd mono-calgary
mono-calgary$ ./checkout-and-build-mono

The script will download mono from the mono svn repo, patch mono, build and install mono. The installation will prompt for your sudo password to install into /usr/local.

To ensure the use of the custom version of mono in /usr/local when you run applications, make sure /usr/local/bin is in your PATH before /usr/bin is, or (better) use /usr/local/bin/mono application.exe whenever you run an application. On most Linux distros, /usr/local/bin is already included in your PATH. You can check to see what your current PATH is by typing:

$ echo $PATH

Note that the binfmt system that allows you to execute interpreted programs without specifying the interpreter on the command line (eg by typing just application.exe) will still use /usr/bin/mono unless you reconfigure it.

Warning: The checkout-and-build-mono script runs a svn revert -R . and svn-clean, so if you make any of your own changes to the svn trees, they would be lost.

Update custom mono

To get the latest custom mono:

mono-calgary$ git pull
mono-calgary$ ./checkout-and-build-mono