[Mono-osx] Universal Binary support for mono
bryan at imeem.com
Thu Mar 23 23:04:55 EST 2006
I'm pleased to share some work I've been doing on creating a
Universal Binary version of the Mono framework. Attached is a set
of patches and shell scripts that will build Mono, its dependancies,
and related packages Universal. They do not build an installer yet
(though could be capable of doing so... for some reason it just
doesn't seem to work.)
The scripts are available for download here:
They are modeled off of the older shell-script based build system. I
wasn't able to easily get the newer build system to work properly, and
when I started, I wasn't even sure if this was possible, so I figured
I'd try to make some serious progress before attempting to integrate
with the newer build system. I would be happy to help and/or take on
the work required to get Universal building into the upstream mono
builds, if I can get some guidance from Wade or someone who's worked
directly with it.
There are some important caveats:
* First, there are new patches to both glib and mono to get them to
cross-compile correctly. libjpeg is also patched but was patched
before as well. The new patches largely remove AC_TRY_RUN from
* mono: hardcode enabling of LARGE_FILE support.
* mono: hardcode check for sizeof(sockaddr_un.sun_path) to be 104,
my empirically discovered value on 10.4.5.
* mono: remove $(LDFLAGS) from monoburg's build, because they
contain cross-compile-specific stuff and monoburg runs at compile
None of these are particularly good things to hard code, and we
should almost certainly come up with a more permanent solution to
* This script builds mono twice and mcs once, and uses genmdesc
built on the native arch to create the cpu-*.h files for the
non-native architectures. Zoltan committed a patch to
mini/mini-ops.h (r57962) which effectively broke the universal
build. I spoke with him on IRC and he said I could safely revert
that file to r57961 and the build would work (which it did.)
* The glib build generates an architecture-specific glibconfig.h
file, and the build scripts split it into i386/ppc versions and
then create an placeholder file that loads the correct
architecture version at compile-time.
* There is still an X11 dependancy -- make sure you have X11
installed when you compile.
* I've tested the script building on both i386 and ppc, so either
platform should be able to build a fully universal mono.
I would love, love, love to see the 1.2 release end up as a universal
release, 1.1.14 (if there is one) would be even better! As I said,
I'm very willing to do any integration work necessary.
If anyone gives this building a shot, let me know--also, if you have
any comments on the mono build patches (which are probably not
mainline appropriate) please let me know!
Bryan Berg <bryan at imeem.com>
285 Hamilton Avenue, Suite 460
Palo Alto, CA 94301
More information about the Mono-osx