[Mono-list] Installing multiiple Versions of mono

Jonathan Pryor jonpryor@vt.edu
Wed, 10 Nov 2004 06:39:44 -0500


On Wed, 2004-11-10 at 05:25, Philipp Knecht wrote:
> Hi
> 
> I wanna use 1.0.4 (stable) and latest on the same box.
> I use Ubuntu 4.10. I've already compiled and installed
> 1.0.4 (libgdiplus,mono,mcs,xsp,gtk# in this particular
> order) with the prefix /usr/local.
> Now i'll download the latest tarball and
> compile/install it too. Are there any pitfalls when i
> use ./configure --prefix=/usr/local/monolatest?
> Are there any enviroment variables to set? if yes
> where?

Of course there are pitfalls.  There's always pitfalls. :-)

The primary pitfall is maintaining your sanity.  Since you have to
modify environment variables to switch between the two versions of mono,
your entire build environment then depends on the environment
variables.  Change environments, and things change -- for example, CVS
mono won't build from Mono 1.0.4 (sorta), so if Mono 1.0.4 is found in
your path, you get lots of build errors about how the runtime versions
differ.

Once you stay consistent with the environments, you only need to worry
about the environment variables.  You'll need to modify:

	MONO_PREFIX=/usr/local/monolatest
	export PATH=$MONO_PREFIX/bin:$PATH
	export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
	export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MONO_PREFIX/lib

I do the same thing with my own build environment, and things
work...when I remember to use the right environment. :-)

You may also need to set MONO_GAC_PREFIX, so that when you're using
"monolatest" you can continue to use the Mono 1.0.4-installed assemblies
(such as Gtk# 1.0.x when monolatest has Gtk# 1.9.x).  Set
MONO_GAC_PREFIX to the prefix directory of your Mono 1.0.4 install:

	export MONO_GAC_PREFIX=/usr
	  # or whatever the prefix of your 1.0.4 install is

 - Jon