[Mono-osx] Universal Binary support for mono

Wade Berrier wberrier at novell.com
Tue Mar 28 15:52:53 EST 2006


Hi Bryan,

Great work!  Here's how I'd suggest we proceed.

Let's try to get the newer build system running on your box.  I run all
the builds remotely, but I've been planning on enabling the system to
run locally.  Just haven't gotten there yet...

Make sure you check out the whole release module from svn.  Then, edit
release/packaging/conf/macos-10-ppc:  change target_host to:

target_host=localhost

Then, you'll have to set up ssh authorized_keys for your user to be able
to connect to the local machine without a password.  (Yeah, this is
kinda dumb, and that's what I mentioned above about fixing.  It's just
that I use all of these scripts to run all the builds for all the
platforms).

The other thing about my build system is that I use the linux noarch
rpms in the installers (mac, win32, and solaris).  This is so I don't
have to rebuild them all the time for each platform.  For now, you can
edit the new mac build script (packages_to_include) to only contain
mono-1.1.

Also, another thing, with the new mac build, I don't rebuild all deps
each time.  The new scripts will relocate them...  hmm... I'm hoping
install_name_tool and otool will work with fat binaries?

But, assuming it does work, we could just build the glib and the other
needed libraries once and post those builds as zipped up libraries.
(Look in release/packaging/defs/mono-1.1 under the macos-10-ppc sections
for what zip files I've posted and what I download each time).

Then, I think that the appropriate autotools magic needs to happen in
the mono build to take care of the changes.  We could do the patch each
time initially, but it'd be better to get it into HEAD.  But, if we do
the patching, the actual build is also listed in
release/packaging/defs/mono-1.1 under macos_10_ppc_ZIP_BUILD.  We would
probably just download the patches with wget from there and patch before
running ./configure, etc...

So, then we'd run ./build from release/packaging .  An example would be:

/build macos-10-ppc mono-1.1 1.1.13.4

Then the new mac build script simply takes files that were built
with ./build (or that are in the def file to be downloaded), lays them
down, and runs the necessary scripts to create the installer.

So, let's first try getting the new system working on your box.  It
hasn't really been used outside of my build machine.  But, I'm on IRC
(wberrier) and we should be able to get it up and running pretty
quickly.

Wade


On Thu, 2006-03-23 at 20:04 -0800, Bryan Berg wrote:
> Hello all,
> 
> 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:
> 
> http://www.strangecargo.org/~bdb/mono/universal/build-20060323.tar.gz
> 
> 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
>    autoconf scripts.
> 
>      * 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
>      time.
> 
>      None of these are particularly good things to hard code, and we
>      should almost certainly come up with a more permanent solution to
>      them.
> 
>    * 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20060328/2e635e3d/attachment-0001.bin


More information about the Mono-osx mailing list