[Mono-osx] Universal Binary support for mono

Bryan Berg bryan at imeem.com
Fri Mar 31 20:07:16 EST 2006

Hi Wade,

On Mar 28, 2006, at 12:52 PM, Wade Berrier wrote:
> 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...

I built a mono package, so it looks like I can at least  
build the mono-1.1 target from a released tarball, which is great!   
I'm still running the build scripts on my Linux box and having it SSH  
over to my Mac.

> 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.

This should be fine--since they're noarch packages, they obviously  
don't need to build any differently for Universal.

> 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?

They sure do.  You don't need to run otool/install_name_tool twice;  
that stuff is stored in the shared metadata.

> 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).

Sounds good--this is probably one of the first (and easiest) things  
to do.  Do you have a set of scripts that you use to build the  
dependencies, or were you manually building & zipping?  If it's  
manual, it should be trivial to adapt the bash script I posted to  
only build the dependencies, and create the zipped packages.  Getting  
all of the dependencies to build universal was arguably harder but  
that work is pretty much done.

> 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...

I absolutely agree that it would be good to get this into HEAD.   
Paolo was nice enough to say that he'd take a look at the patches-- 
and they are a little heinous, but maybe they can be worked around.   
I also still haven't opened that bug as Zoltan requested :-)  so that  
will need to be fixed.

Long story short, it seems like three things need to happen:

1) Get universal dependencies built and the appropriate zip packages  
2) Get necessary build changes integrated into HEAD
3) Update build scripts to build mono/libgdiplus as universal  
binaries (hopefully without any patching at all)

Let me know what you think about getting the dependencies built, and  
I'll modify that shell script if that seems like a good idea.


More information about the Mono-osx mailing list