How to get Miriad working on Mac OS X 10.2 and 10.3
Also includes patches needed for big data files from SMA
Date: 18 August 2003: initial version for Jaguar Mac OS X 10.2 Date: 05 March 2004: mods for Panther Mac OS X 10.3 and large SMA data files
These notes are for Mac OS X Jaguar (10.2.6), Panther (10.3.2) and Miriad v3. According to the
Miriad website,
if you are using Miriad for production work use Version 3 and
if you are doing development work or CARMA use version 4. I have put
together a patch for OS X from various sources. This patch was needed for
building and using Miriad on OS X. In order to install Miriad you will
need the following programs:
X11, X11SDK, Developer Tools, g77 and wget. The default install of Mac OS X
10.2 will not have these installed. If you have already installed the above
programs just skip to step 5. The 10.3 version that was installed on my G5
already had X11, X11SDK, Xcode (Developer Tools) available either on the
hard drive or on the Install DVD. I also updated Xcode to version 1.1 from the
Apple deveopler website. Install g77 and wget from as in
Step 4 using Fink.
You will need X11 for Apple and the X11SDK as well. Get these from
the Apple X11 website.
The total download size for these two packages is between 40 - 50 MB.
Jaguar Mac OS 10.2 only: Install the Dec 2002 version of Mac OS X Developer Tools. You can find
this either on your OS X install CDs or download them from the
Apple
Developer Connection website. Do not install the
additional patch from Apple which includes gcc 3.3. See the
Fink - News Web Site
for more details. The news item was dated 2003-06-26. The download
size of the Developer tools is greater than 300 MB and the installed size
can be as big 1 GB. In order to download the developer tools you may need
to set up a Free Apple Developer account.
Install Fink: Fink is a package manager that allows you to add very
standard unix packages and programs in order to enhance your Mac OS X system. See the Fink website for more details. We will be using Fink for adding the programs g77 and wget. The easiest way to install
Fink is to download the binary installer (14 MB download)
from the
fink web site. Before downloading and installing fink make sure that that
you do not have Version 7.2 of the Virex program as it has conflicts with fink.
See the Fink - News Web Site
for more details. The news items were dated 2003-04-16 and 2003-02-07.
After downloading the program, just install it by double-clicking it.
Once, Fink
is installed, I find Fink
Commander (5 MB download) to be the easiest way to manage a Fink installation, that is, install and upgrade unix packages using a
graphical user interface. For command line enthusiasts there is always
'dselect'. Drag the "FinkCommander" program from the mounted image to your
Applications folder.
You need the g77 compiler in order to build
the fortran programs within
miriad as the Apple Developer Tools do not come with g77.
The 'wget' program is a command line program that is run
from the terminal and is used to download files from the internet both via
http or ftp. The wget program is needed by the program that automates the
Miriad install. For details, see the next item.
Launch Fink Commander. In the searchbox at the top next to "Name"
type g77. It should show up the g77 package. Highlight it and then select
Install from the Binary menu on the top. Install wget in a similar fashion if
you want to use the automated miriad install script.
You do not need to install wget-ssl. In order to use wget, you may need
to turn off your Mac OS X firewall. It will be found in
Preferences-->Sharing.
This procedure assumes that you do not have miriad installed currently.
If you do please backup that directory before starting.
For example 'echo $MIR' will tell you what
the MIR directory is. Also edit your .cshrc file
and comment out the MIRRC line. Then open up a fresh Terminal/Xterm and run
the remaining steps from there.
Once you have successfully completed the above steps, the remaining
install of Miriad can be automated by using the unix shell script
miriad-osx-jaguar.csh for OS X 10.2 and
miriad-osx-panther.csh for OS X 10.3. If you want to install everything manually skip the
rest of this step and go to
step 6. If you want to install using the script first turn off your
Mac OS X firewall and then launch a Terminal window
and type the following
For Jaguar OS X 10.2
cd ~
wget -N http://cfa-www.harvard.edu/~rrao/miriad-osx/miriad-osx-jaguar.csh
chmod +x miriad-osx-jaguar.csh
./miriad-osx-jaguar.csh
For Panther OS X 10.3
cd ~
wget -N http://cfa-www.harvard.edu/~rrao/miriad-osx/miriad-osx-panther.csh
chmod +x miriad-osx-panther.csh
./miriad-osx-panther.csh
The install process can take some time depending on how fast your computer is.
Hopefully, the install will have gone successfully. If you did have to turn
off the firewall, remember to turn it back on again. In order to setup to use
Miriad go to step 15 for how to do it.
Make a folder in your home directory called MIRIAD. Move the files you
have downloaded (miriad3.tar.gz and the various patch files) into this folder.
Now open up a terminal window and type the following commands at the
prompt.
cd ~/MIRIAD
tar -xvzf miriad3.tar.gz
mv miriad3_cvs miriad
setenv MIRTEMP ~/MIRIAD/miriad
set path = ( $MIRTEMP/src/sys/bin $path )
rehash
cd miriad
patch -p1 < ../miriad3-sma.patch
patch -p1 < ../miriad3-osx.patch For Panther OS X 10.3 only: patch -p1 < ../miriad3-panther.patch
mir.mkdirs $MIRTEMP
source MIRRC.darwin
mir.install
Now go get a cup of coffee and let it churn away. It should mostly build
everything except xmtv, xpanel and a few others. We will fix xmtv and xpanel
after mir.install is done.
Fix xmtv
cd ~/MIRIAD/miriad/src/spec/xmtv/
make
Fix xpanel. The second command must be entered on one long line.
No breaks!!
Optional: Compile xcorf. In order to use xcorf you will need
lesstif. Install lesstif via Fink Commander
cd ~/MIRIAD/miriad/src/spec/xcorf/
make darwin
Some scripts in $MIRBIN do not have executable permission. Set these
with
chmod +x $MIRBIN/*
I have not been able to compile the following programs due to various errors:
mxv, deproject, polargrid, pnt, mbanal, uvdecor, uvphase, atlod, hcconv,
mosaic, uvhat. Some of these programs are more relevant for Miriad data
from the Australia Telescope Compact Array (ATCA).
Finally put the line
source ~/MIRIAD/miriad/MIRRC.darwin
in your .cshrc or .tcshrc file if you run Miriad on a daily basis. Otherwise you will
need to type source ~/MIRIAD/miriad/MIRRC.darwin everytime you want
to run miriad.
Note: Some of the display programs particularly "xmtv" require an 8-bit
display for X-windows. When you double click on X11 in your Applications
Folder to start up X-windows it starts up with a higher bit display. In order
to use "xmtv" and other 8-bit programs you have to start X-windows from a
terminal window by typing the following
/Applications/X11.app/Contents/MacOS/X11 -depth 8
As far as I am aware, I don't think that you can run both regular X11 and
8-bit X11 simultaneously.