[Mono-list] Compiling mono from source on mac

Edmund Kapusniak edmund.kapusniak at hotmail.com
Thu Oct 27 03:28:24 EDT 2011

Hello again,

Okay so now I am trying to compile mono from source on my mac.  I followed the
instructions to fork on github and clone both mono and libgdiplus.

I compiled libgdiplus by doing:

ACLOCAL_FLAGS="-I /usr/X11/share/aclocal" ./autogen.sh --prefix=$MONO_PREFIX
make install

and mono with:

./autogen.sh --prefix=$MONO_PREFIX --with-glib=embedded --enable-nls=no
make install

After this I appear to get a working mono in $MONO_PREFIX.  However, when I
try and run a Windows Forms application I get a DllNotFoundException for

libgdiplus.dylib appears to install correctly into $MONO_PREFIX/lib.

I did get some warnings during the libgdiplus build which read like:

ld: warning: ignoring file /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/libglib-2.0.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64)

I don't know if these are normal.

Adding $MONO_PREFIX/lib to DYLD_LIBRARY_PATH before running mono makes no

otool -L libgdiplus.dylib reads:

	/Users/edmundkapusniak/Documents/mono/mono-build/lib/libgdiplus.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

Which seems kind of sparse, especially when compared to the output when running
tool on the libgdiplus from my mono 2.10.6 installation, which lists a few dozen
dependencies.  This makes me think that perhaps libgdiplus did not compile
correctly - but there were no errors during the make process.

Can anyone help?

-- Edmund

More information about the Mono-list mailing list