Doug Bryant

Tech thoughts and notes

Customizing Mac OSX Using Opensource

by Jordan Hubbard + Kevin Van Vechten

recompiling software which come pre-built w/ osx

Darwin is the os core of osx. Includes kernel, IOKit families, and BSD commands and libraries.

Darwin source – ||
.tar.gz snapshots organized by release.

OpenDarwin – community run site w/ standard opensource tools (bugzilla, cvs, irc, etc)

Webkit – Based on khtml/kjs
can progress live

DarwinPorts – similar to FreeBSD ports system. 2,500+ ports. Easy customization wiht “Variants”

Fink – Based on debian packages. 5K+ ports – offers pre-built packages.

Building Darwin

  • know objective
  • only replace system when necessary
  • beware of software updates (have to re-apply mods)
  • make backups

Potential Problems

  • Default compiler problems (different gcc version)
  • environment variables
  • build aliases
  • no private headers
  • no static libraries

user __gcc_select__ to change and report compiler versions

environment variables (where system looks for some things)

  • SRCROOT (src files)
  • OBJROOT (object files)
  • SYSROOT (debug bin)
  • DSTROOT (final bin)

Variables (compile)

  • RC_RELEASE (Tiger)
  • RC_ARCH (ppci386)
  • RC_ProjectName (name of project being built)

And many more compile time variables

Missing header files – private headers (ex. /usr/local/streams/streams.h /usr/local/lib/libkld.a)

No internal tools /usrl/local/kextool? – for building kernel modules

DarwinBuild – handles all the above incompatibilities


  1. darwinbuild -init AC46 (ac46 is engineering build number)
  2. darwinbuild project_name
  3. darwinbuild bash
    This will download sources build (missed point in which you could patch source) and install new binary