OSCON: Customizing MacOS X with Open Source Software

DarwinPorts Building Darwin Default Compiler Version(s) - All of these gcc versions have been the default compiler in one release of MacOS X or another. Environment Variables Build Aliases - same sources, different results (client vs. server, for example)

Need to download private headers. Apple really discourages the use of static libraries, to make the system more flexible, and easier to patch. Sometimes static libraries are needed by the system itself, so it is possible to build them. But Apple doesn't ship any static libraries by default.

Some internal tools are also needed: kextsymboltool, for example.

The good news is that DarwinBuild can track all of these potential problems, and can download all of the necessary bits to make compiling Darwin easy. It automatically sets up a chroot() environment, for example, so that build can be done without mucking with currently running system. You give DarwinBuild a release number (8C42, for example, which is 10.4.2), and it will fetch a plist file, which describes details of the build.

DarwinBuild can be used to build individual components, like bash for example. Just type 'darwinbuild bash', and it will fetch the latest sources, and do a build.

Next, we got a demo of using DarwinBuild to build a version of talk that has Bonjour support. Fairly nifty stuff. Using DarwinBuild, you can target specific releases of MacOS X -- building talk for a friend that is still running Panther, for example.