MIDAS on Mac OS X

Keywords: MIDAS, Mac OS X 10.4, Tiger, Intel
 
This page primarily describes my experiences getting ESO's MIDAS to run on my MacBook Pro. But I have tried to generalise it as much as possible.
There are several ways to get MIDAS up and running on Mac OS X:

SciSoft

The official SciSoft for Mac is here.
For Power PC SciSoft has been working well for many years.
For Intel a (almost) full SciSoft release was announced on Monday, October 2, 2006 after 5months of development.

Compile locally

I have prepared a script to download all the required source files, extract, patch, build, setup and finally verify

Dependancies

sudo port install gcc42

MIDAS

Download the installation script from here, then in a terminal:
chmod u+rx macOSX.installMIDAS
./macOSX.installMIDAS --demo --calib --superVerify --sudo
By default this script will try to install MIDAS version 06SEPpl1.3. Any other version can be specified via the -V command line option, but it explicitly supports only the following versions:
To get the script to work with another version you will need to prepare a generic patch file (<SRCDIR>/patch.<MIDVERS>.gen), or else modify the code directly but then be sure to use the build step options otherwise the first build step (extraction) will delete the <MIDVERS> directory and extract the source tar file!

To see all command line options:
./macOSX.installMIDAS -h

Source Files

TBD...
MIDAS source files.



Below are some of the the details of the script but not all, these details are obsolete since I started developing the script:
export MIDASHOME=/midas
export MIDVERS=06SEPpl1.0
export SRCDIR=${HOME}/src/midas
wget -O ${SRCDIR}/${MIDVERS}.tar.gz ftp://ftphost.hq.eso.org/pub/midaspub/${MIDVERS:0:5}/sources/${MIDVERS}.tar.gz
[ ! -d ${MIDASHOME} ] && mkdir -pv ${MIDASHOME}
cd ${MIDASHOME}
tar -zxvf ${SRCDIR}/06SEPpl1.0.tar.gz
mkdir ${MIDASHOME}/${MIDVERS}/incl/netat
If you have Mac OSX  Developer tools installed, then do:
ln -s /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/netat/sysglue.h ${MIDASHOME}/${MIDVERS}/incl/netat/
...but if not...
wget -O ${MIDASHOME}/${MIDVERS}/incl/netat/sysglue.h http://www.hq.eso.org/~jpritcha/midas/sysglue.h
If the version is 06SEPpl1.0 apply this patch as follows:
wget -O ${SRCDIR}/patch.06SEP1.0.macOSX-10.4 http://www.hq.eso.org/~jpritcha/midas/patch.06SEP1.0.macOSX-10.4
patch -p0 < ${SRCDIR}/patch.06SEP1.0.macOSX-10.4
If you are using gcc42 from MacPorts then apply this patch as follows:
wget -O ${SRCDIR}/patch.06SEP1.0.gcc-dp-4.2 http://www.hq.eso.org/~jpritcha/midas/patch.06SEP1.0.gcc-dp-4.2
patch -p0 < ${SRCDIR}/patch.06SEP1.0.gcc-dp-4.2
If you are using some other gfortran (and possibly gcc compiler) then try this patch, then edit the file:
wget -O ${SRCDIR}/patch.06SEP1.0.gcc+gfortran http://www.hq.eso.org/~jpritcha/midas/patch.06SEP1.0.gcc+gfortran
patch -p0 < ${SRCDIR}/patch.06SEP1.0.gcc+gfortran
Warning: The above patch is untested. You may need to edit manully the file:
${MIDASHOME}/${MIDVERS}/install/unix/systems/Darwin/make_options
Note, be sure to execute step 5 of the MIDAS config script whenenver you make changes to the above file, otherwise edit the file:
${MIDASHOME}/${MIDVERS}/local/make_options
to have changes applied directly, but note that if you do then execute step 5 of the MIDAS config script you will loose these changes.
If you do manage to get MIDAS to compile using different C and/or Fortran compilers than the MacPorts gcc42 compilers please send me an email with your make_options file attached.

Then follow the rest of instructions in installunix.ps.gz, alternatively for the impatient:
cd ${MIDASHOME}/${MIDVERS}/install/unix
./config
3
5 ## follow prompts...
6 ## follow prompts...
q
tail -f `ls -tr1 $MIDASHOME/$MIDVERS/tmp/install.* | tail -n 1`
## When it's finished, Ctrl-C then...
ln -s ${MIDASHOME}/${MIDVERS}/system/unix/{inmidas,gomidas,helpmidas,drs} /usr/local/bin
cd ${MIDASHOME}/${MIDVERS}/tmp
inmidas
And you're done...

Last updated October, 2006 john.pritchard@eso.org