Mono Tutorial

Building Mono on Leopard

In preparation of the upcoming Mono 1.2.6 release I worked through building Mono from Subversion on Leopard (i386) with Geoff Norton (kangaroo in #mono) in order to shake the rest of the bugs out of Mono on Leopard/i386. There were a couple of caveats, specifically in acquiring the necessary tools for building Mono correctly, as Leopard and the Leopard Developer Tools ship with older versions of pkgconfig(1), autoconf(1) and automake(1).

Preparing the build environment

  • First and foremost it's important to get the necessary tools installed, I suggest using MacPorts to install autoconf(1), automake(1), pkgconfig(1) and libtool(1). You'll also need Subversion to fetch the Mono sources. After installing MacPorts you can install all five in one swoop with the following command:
    sudo port install automake autoconf libtool pkgconfig subversion
  • After the aforementioned tools are installed on your machine (typically into /opt/local) you will need install a newer version of GLib onto your machine as well, as it's a key dependency of Mono. As of now the current stable version of GLib is 2.12 which you can grab from the GTK+ FTP site. Once you have downloaded GLib, you should build and install it without replacing the system GLib which could lead to problems with other applications that depend on the system version of GLib. I recommend installing it into /opt/glib which you will later tell Mono to use directly. The following steps will take care of configuring, building and installing the latest stable GLib onto your Leopard system
    • cd glib-2.12
    • ./configure --prefix=/opt/glib
    • make
    • sudo make install
Syndicate content