[quake3] Mac Universal Binaries

Tony J. White tjw at webteam.net
Mon Apr 9 10:54:09 EDT 2007


On Sat, Apr 07, 2007 at 09:43:54PM -0700, Jorge Peña wrote:
> No problem, so it builds a UB right? With intel and ppc binaries in it? For
> the dependencies, did you have Intel and PPC versions? Or did you just build
> them and it worked? I'm pretty curious, I had the feeling I just had to get
> the Intel versions of the dependencies and things would work, I'll try that
> next time I get a chance to use my friend's Mac. You are building with
> dependencies curl, ogg, and vorbis, right?

cURL is included with Mac OS X, so we don't link to it by default.  It is
dynamically opened at run time.  I've never tried building ogg support.

> Anyways, I'll keep at it, kind of difficult when I don't have a Mac. I'm
> pretty sure just having Intel versions of the dependencies will work.
> Someone was nice enough to build them for me (Some random guy in #mac).
> Hopefully it works, I'm pretty sure it will because like I said before I had
> dependencies it would build perfectly, and now that I have them it complains
> about the library's architecture type, so hopefully this will solve it.
> Thanks for at least responding, anyways.

The easiest way to make universal binaries with dependencies is to link
against a a .dylib that contains both architectures.  For
an example, download the SDL source code and look at the file
build-scripts/fatbuild.sh.  This is what we use to make the universal
libSDL-1.2.0.dylib that is included with ioq3.

-Tony

> 
> On 4/7/07, Zachary Slater <zakk at timedoctor.org> wrote:
> >
> >Jorge Peña wrote:
> >> Hey guys, you probably remember me asking about how to build on Mac,
> >> well I got it and it's working perfectly! However, if you remember
> >> correctly, I had to remove the i386 targets for the bash make script
> >> because it wouldn't build. Well, it turns out that now someone else on a
> >> Mac Intel wants a copy, so I at first figured that I would have to
> >> re-build the whole thing on their computer, and well, they're not really
> >> computer oriented and they might not be as happy to have me SSH into
> >> their computer as my other friend would. So I asked if this was
> >> necessary inside #mac freenode, and they said that if they are Universal
> >> Binaries then they should work just fine. I was wondering how that was
> >> so, so I looked here [ http://en.wikipedia.org/wiki/Universal_binary ],
> >> I found out that basically it consists of binaries for both
> >> architectures within the same 'package', and the host computer
> >> automatically chooses the correct binaries. I was wondering if it was
> >> possible to build binaries for both architectures on PPC, and I read
> >> this [ http://developer.apple.com/macosx/adoptinguniversalbinaries.html
> >> ] which seemed to say it was possible. However I remembered that I
> >> removed the i386/Intel targets in the make bash script (Not the
> >> makefile, but the make mac bash script) because it wouldn't build. I
> >> found a document from Apple that helps with building a universal binary
> >> here [
> >>
> >http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary.pdf
> >> ].
> >>
> >> I think the reason that it didn't build last time was because I had PPC
> >> versions of the dependencies (I remember it arguing about mismatching
> >> architectures), so that's why I'm wondering if you guys know how to
> >> build Intel versions of the dependencies. My other question is, am I
> >> right in all of this? Does the ioquake3 Makefile usually automatically
> >> create the Universal Binaries? I think so, because I think I remember it
> >> building without complaining before I added all the dependencies. I'll
> >> try to look for 'Universal Binaries' of the dependencies in the
> >> meantime, but I first want to make sure I'm right in all this before I
> >> go through more of a waste of time. Thanks guys I really appreciate it!
> >
> >
> >Sorry I can't say much more besides that I use make-macosx-ub.sh and it
> >works perfectly.
> >--
> >- Zachary J. Slater
> >zakk at timedoctor.org
> >zacharyslater at gmail.com
> >



More information about the quake3 mailing list