Miriad on Mac
From CARMA
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.
Two important steps are still needed to be able to use/install miriad:
Contents |
Xcode
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 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 [1]. 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 earlier releases Xcode 3 appears to be available still, see e.g. [2] if you have access to chara's repository.
Fortran compiler
- 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
export PATH=/usr/local/bin:$PATH
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 [3] 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
(Login) Shell
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?)
Finally
Now you are ready to install or use miriad.
