Unix style development on MacOSX

  1. The first most important thing is that you install the BSD tools if they aren’t already. They should be included by default, but they can be turned off in the OSX installer if you wanted to.
  2. Next, install the Developer tools package. This might have been included in /Applications/Installers/. If not, you can download it for free from apple’s dev site.
  3. Install X11.app, also free, from http://apple.com. (X11.app is included with OSX 10.4.)
  4. Next, you have to decide which of three package managers you want to use (if at all, but they really make it easier). Fink, Darwinports, or Gentoo-osx.
    • Fink is roughly similar to Debian. It mostly works by downloading binary packages.
    • Darwinports is very similar to *BSD’s port system. It downloads and compiles source tarballs.
    • Gentoo works just like Gentoo on Linux.

    I’m using darwinports because it suits my needs the best. I plan to be doing a bunch of packaging, and need to build static libraries. While this is as easy as setting +static in gentoo’s USE flag, Gentoo installs into / and overwrites existing files. Fink uses binary packages, so I’m stuck with whatever the packager decided was appropriate. Darwinports defaults to disabling static libraries, but it installs into /opt/local, and I just have to modify the PortConf file for the package to include –enable-static.

  5. The first packages you should install after getting your package manager setup are:
    1. autoconf
    2. automake
    3. pkgconfig
    4. libtool
    5. gettext

    I don’t know about the other package managers, but for some reason, darwinports’ versions of libtool and libtoolize are named glibtool and glibtoolize. I’ve created softlinks to them in /opt/local/bin so that autogen.sh scripts can find them.

  6. MacOSX-10.3 uses bash as the default shell. Previous versions used csh. In ~/.profile, I’ve put the following:

    export CVS_RSH=ssh

    export PATH=/usr/local/bin:/opt/local/bin:$PATH
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig

    This sets up my path to search for packages I’ve compiled myself and installed in /usr/local/ first, then search in darwinports’ /opt/local/. Apple doesn’t provide pkg-config files for libraries it installs, so even though your system has libxml installed, you might need to install it just for a configure script to locate it.

  7. If you use locate, you should setup a cronscript to run /usr/libexec/locate.updatedb nightly. It won’t be run otherwise.
Oct 27 2006 10:53 am | Uncategorized | 1 Comment »

One Response to “Unix style development on MacOSX”

  1. on 01 Jun 2009 at 10:05 pm Marko

    Hi taybin, I couldn’t find you’re email anywhere so hopefully you get this. I was wondering if you could help me how to compile a ladspa plugin. I keep having issues with that -shared flag. I saw you made an installer for the tap plugins and swh plugins and had the same problem. I’m trying to build the ladspa vocoder plugin. or the lv2 vocoder plugin and the lv2zyn plugin. All raise the same -shared flag error. I’ll have more details if you reply. Thanks!

    p.s. – just email me

Leave a Reply