Miriad on Mac
When you get a fresh virgin Mac from Apple, you've obtained a fine but otherwise useless toy. When you have upgraded from for example 10.6 to 10.7, you have turned your wonderful programmable Mac into a useless brick again. Many people have written pages and pages how you can get more astronomy mileage out of your mac.
We will list a few here:
* AstroBetter tips and tricks for professional astronomers. * homebrew The missing package manager for OS X *  how to install fortran on a mac (a discussion item)
Two important steps are still needed to be able to use/install miriad:
Xcode is Apple's suite of development tools. You need it to run , and optionally recompile, miriad. If the commands cvs and make don't exist, you will probably have to go through these steps.
- You can look on chara.astro.umd.edu:/chara6/teuben/mac if we have any old copies. You can check out the file (on your mac) called /Developer/Applications/Xcode.app/Contents/version.plist to see which version of Xcode you have. If you are not sure how to install these dmg files, simply copy them to your desktop and double click on them and follow the instructions.
- For 10.7 (Lion) Xcode 4.1 has been made freely available again for developers. See . On Lion, with XCode 4.3 you will need to download the command-line tools as an additional step. You will find the option to download the command-line tools in XCode 4.3's Preferences.
- For 10.8 (ML) you will now need to do a special install of XCode, don't forget the additional step for the command line tools, and in addition Apple will not give you X11 either, so that's another step as well.
- For earlier releases Xcode 3 appears to be available still, see e.g.  if you have access to chara's repository.
- Apple loves to give cat-like names to their distro's, but for those like me who have an easier way with numbers, here's the sequence:
- 10.4.x tiger (2005) - first one also for Intel
- 10.5.x leopard (2007)
- 10.6.x snow leopard (2009) - now more PowerPC
- 10.7.x lion (2011) - only 64bit
- 10.8.x mountain-lion (2012)
- The GNU compiler team is now making binaries available for GFortran : 
- My recommendation is still HPC, because of the simplicity of installing the compiler. Make sure you install the correct matching gcc and gfortran,and you need to install them as follows: (this example for 10.5 a.k.a. leopard)
sudo tar -C / -zxf gcc-leopard-intel-bin.tar.gz sudo tar -C / -zxf gfortran-leopard-intel-bin.tar.gz
make sure gfortran and gcc from /usr/local/bin are both first in your path (this applies to any method you use to install the fortran compiler):
which gfortran which gcc (if you've done it wrong, this will often show /usr/bin/gcc)
Modify your .bashrc with
or .cshrc file
set path=(/usr/local/bin $path) ; rehash
to make sure your shell will have this properly set.
- an alternative to the HPC compiler suite is the slightly more involved MacPorts. Grab the correct pkg from  and install this. Any new shell (you might have to kill Terminal or X11 for this) should now have the command port in your path, normally from /opt/local/bin. Now sit back and relax, since a number of packages need to be installed, and each is compiled from scratch. The following commands should be sufficient to compile miriad:
sudo port install gcc45 sudo port install automake autoconf libtool sudo port install gcc_select ... (possibly more, TBA)
Sadly after installing the compiler, gcc is still the system version, you will need to run the command
sudo gcc_select mp-gcc45
to enable your selected compiler. If you look closely, the compiler executable turns out to be gcc-mp-4.5
If you want to list the packages that are installed, use
sudo port list installed
- another alternative to get a Fortran compiler is FINK, but it has not been as well maintained lately as MacPorts, so we don't recommend this for the more recent versions of the OS. FINK will install its binaries in /sw/bin
You will to have /bin/csh (and/or /bin/tcsh) installed, otherwise a number of shell scripts will not work. If you prefer to also use this shell as your login shell, be ready for some surprises. I have written about this elsewhere (link to come?)
Now you are ready to install or use miriad.