OS X Notes

General

This page contains my notes on installing software for Apple's OS X 10.3 (Panther). I've found this software to be useful for software development and document preparation. All of this software is free.

Apple provides two of the main packages that I use: Xcode Tools and Apple's X11 implementation. The Xcode Tools package contains a version of the gcc compiler and the Xcode development environment, among other things.

I make heavy use of the Fink package-management system. The Fink project ports open source software to the OS X platform, and provides a central location for installing and maintaining packages.

I have a few other things installed as well. I use TeXShop for creating documents with LaTex typesetting. I've also installed PETSc, which is the Portable, Extensible Toolkit for Scientific Computation

Apple Packages

  • Apple's Xcode Tools 1.5
  • Apple's GCC November 2004 update
  • Apple's X11

These packages should be installed first, before installing Fink. Otherwise, Fink may install its own version of X11 (XFree86). I prefer to have only one version of these installed, and I'm going with Apple's versions.

Xcode Tools 1.5 can be obtained at Apple's Developer Connection Member Site, here. You need an ID to enter the site, but it's free. Once you enter the site, go to the Download Software section and click on Development Tools. (Note: the Download Software section is not the same as the Purchase Software section.) When installing Xcode Tools 1.5, you should customize the installation to include the X11 SDK and the CHUD Tools.

Apple's GCC November 2004 Update is also available in the Download Software section of the Developer Site. Install this after installing Xcode Tools 1.5.

The final Apple package that I've installed is Apple's implementation of the X11 windows system. X11 is the de facto graphics system for unix/linux systems, and having it installed allows you to run the graphical interfaces for many open-source programs on your Mac. There are several versions of X11 available for OS X 10.3. XFree86 is available through Fink, but I prefer Apple's implementation, which is available here. The download link is on the right-hand side. Apple's implementation is very well integrated with OS X, and even maintains much of the Aqua look and feel.

A great feature of the Xcode development environment is its ability to build with external makefiles. This is very handy for cross-platform projects. I've also had some success compiling old fortran projects in Xcode using makefiles and g77. I wrote up a short description of using Xcode with makefiles here.

Fink

The Fink project wants to bring the full world of Unix Open Source software to Darwin and Mac OS X. Fink provides a very nice package-management system, which can be obtained at their web site here. Their site gives clear instructions for downloading, installing, and updating Fink.

Here is some of the software I've installed through Fink:

  • tetex
  • doxygen
  • g77
  • cmake
  • xemacs
  • bluefish
  • python 2.3 with numeric-py23
  • svn-client
  • OpenDX

X11 is required when running GUI-based applications installed via Fink, so /sw/bin/ needs to be in your PATH.

A note on configuration files: the regular Terminal is a "login" shell, and hence reads .bash_profile, whereas xterm is not a "login" shell, and therefore reads .bashrc. To get the same behavior under both terminals, I have identical files for .bashrc and .bash_profile. This is ugly but effective.

Example file for .bashrc and .bash_profile:

# set aliases
alias rm="rm -i"

# set environmental variables for PETSc
export PETSC_DIR=/usr/local/petsc/petsc-2.2.1
export PETSC_ARCH=macx

# set up the Fink hierarchy
test -r /sw/bin/init.sh && . /sw/bin/init.sh

TeXShop

TeXShop is an excellent editor for preparing LaTex documents. It can be obtained here. Note that if you have installed the Fink version of tetex, then you do not need to install the TeXLive-teTex provided at the TeXShop website. Instead, just point TeXShop to your existing tetex installation by listing /sw/bin in the path settings under TeXShop -> Preferences -> Engine.

PETSc

PETSc is the Portable, Extensible Toolkit for Scientific Computation, developed at Argonne National Laboratory (PETSc homepage). It contains a large number of numerical tools, mainly for solving partial differential equations numerically. It is designed to be used in serial programs as well as fully parallel applications. I've written up a few notes on setting up PETSc on OS X 10.3. Notes for PETSc 2.1.0 are here, and notes for PETSc 2.2.1 are here.