How to install CASA on your Apple Mac running OS 10.3 "Panther"


How to install CASA on your Apple Mac running OS 10.3 "Panther"


Thanks to Tim Cornwell, Darrell Schiebel and Wes Young for the port and summary of installation directions. Thanks to Vince McIntyre and MalteMarquarding for providing updated generic CASA build instructions. Thanks to all the CASA/AIPS++ developers for producing such a great algorithm development environment!

You have:

  • an Apple G4 or G5 Apple Macintosh computer (hereafter your "Mac") running OS 10.3 "Panther",
  • intermediate level experience downloading and building software in a Unix environment,
  • superuser (root) access to your Mac, and
  • an hour or so of time to prepare and initiate the build.

You want:

Check versions

  • Compilers should be version 3.3 from Apple. Get these by installing Apple XCode on your Mac, and then applying the 1671 patch. XCode either ships with your operating system, or can be obtained from the Apple Developer website.
  • On my Mac, gcc -v shows gcc version 3.3 20030304 (Apple Computer, Inc. build 1671)


  • in a web browser, visit Apple and navigate to MacOSX Downloads and fetch and install DarwinPorts.
  • I installed version DarwinPorts 1.0, release date 28 Apr 2005, 4:11 PM

Modify your .cshrc file

  • add /opt/local/bin to the path
  • add /opt/local/lib to the dynamic library path
  • set the deployment target to 10.3
  • source the AIPS++/CASA init script if present

In toto, I have the following in my .cshrc file:

# enable aips++ if present...

if -e /Volumes/aips++/aipsinit.csh then

# enable DarwinPorts...

set path=(/opt/local/bin $path)

if (!(${?LD_LIBRARY_PATH})) then

setenv LD_LIBRARY_PATH /opt/local/lib


setenv LD_LIBRARY_PATH /opt/local/lib:$LD_LIBRARY_PATH


source /Volumes/aips++/aipsinit.csh


Install required libraries

Add /opt/local/bin to your path, do a rehash, and then install Tcl, Tk, g77, and OpenMotif? as follows. I include the versions I installed as comments in the commands below...

sudo port install tcl

# lang/tcl 8.4.9

sudo port install tk

# x11/tk 8.4.9

pushd /opt/local/bin

sudo ln -s /usr/bin/c++filt ./c++filt3


sudo port install g77 # takes ~1 hr #

# lang/g77 3.3.3

sudo port install openmotif

# x11/openMotif 2.2.4

Install modified required libraries

You need to install PGPLOT and CFITSIO libraries, but use modified versions of the DarwinPorts scripts. Fetch the packages at the end of this page, and then:

cd /opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dports/graphics

sudo mv pgplot pgplot.bak

zcat ~/PGPLOT.tgz | sudo tar -xvf -

cd /opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dports/devel

sudo mv cfitsio cfitsio.bak

zcat ~/CFITSIO.tgz | sudo tar -xvf -

sudo port install pgplot

# graphics/pgplot 5.2.2

sudo port install cfitsio

# devel/cfitsio 2.490

# but actually 2.502 was installed

RPFITS library (for ATNF data only)

You need a newish version of rpfits library in /usr/local/rpfits. Fetch the code (I got v. 2.8 which is provided at the end of this page) and untar it somewhere (eg. in /tmp). In the rpfits/code directory, do:

cp linux/atio.f .

cp sgi/cvt_ieee.f .

which sets things up for the endianess of the powerpc. Build by doing gmake -f GNUmakefile, and then copy librpfits.a and code/ and code/RPFITS.h to /usr/local/rpfits-2.8. Soft-link this directory to /usr/local/rpfits. Run ranlib on the installed library.

Create UFS disk for AIPS++

In DiskUtility, create a 2.6GB sparse disk image, named aips++ in MacintoshHD (ie. root dir). It will mount at /Volumes/aips++.

MAKE IT A UFS DISK, otherwise you will have trouble with glish (Makefile and makefile are degenerate on a case-preserving but case-insensitive filesystem) and building fits (FITS.h and fits.h will be the same).

This actually requires erasing the created disk with UFS as the selected new partition format.

At last: install AIPS++

In a Unix shell, with the DarwinPorts software in your path, and the MACOSX_DEPLOYMENT_TARGET variable set, do:

setenv CVSROOT

cvs login

# empty passwd

cd /Volumes/aips++

cvs -r checkout -d code casa/code

pushd /opt/local/bin

sudo ln -s /usr/bin/make ./gmake


cd code

chmod u+x install/configure.cvs


# choose darwin as arch.

# melbourne for sitename

# no comment

# 640 Megabytes, 1 processor

# edit aipsrc for "astrops" (printer) and "A4" (paper)

# for darwin/melbourne/makedefs, copy in makedefs.osx version

# (available on this page) and press enter.

# at prompt "Press return to continue" after verification of makedefs,

# press "Return" !!!

# don't reverify makedefs

# allow it to "Build the bootstrap..."

# (this is quite quick)

The file aipsinit.csh will have an error related to "limit descriptors". Fix /Volumes/aips++/aipsinit.csh yourself, or replace it with the one supplied at the end of this page. If you want to do it yourself, you need to replace the limit descriptors code with a single line like limit descriptors 1024, and you need to fix the syntax in the code that checks for the present of the DYLD_LIBRARY_PATH environment variable and sets it. Keep a backup of the file once you have it parsing correctly, as subsequent builds of AIPS++ may replace it with a system version.

source /Volumes/aips++/aipsinit.csh

cd /Volumes/aips++

mkdir logs

sneeze -l -m cumulative >& logs/sneeze-20050518-1.log &

# [this will take several hours]

You can watch progress with tail -f darwin/sneeze.log.

Within an hour or so, glish should be built and work (eg. glish -plain) and frames and pgplot displays should be functional.

There follows a long long time of building the libraries and applications.

At the end, you can verify the system (or at least a small but important part of it) by doing aqview myimage.fits.


Please notify me of mistakes/omissions/whatever in these directions.

-- DavidBarnes - 20 May 2005