Installing the LSC Software Stack with MacPorts
The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading open-source software on the Mac OS X operating system. It provides a command-line driven tool that greatly simplifies the task of compiling and installing open-source software on your Mac.
Officially MacPorts is supported on the current and immediately previous Mac OS X releases, so at the time that is 10.7 (Lion) and 10.6 (Snow Leopard), earlier releases are supported on a best effort basis.
Installing, and updating MacPorts
There is detailed documentation on how to install MacPorts on the project page. It is a simple process, you can either download a binary installer for your platform or download and build the source code yourself. Once MacPorts has been installed you need to apply available updates by running the following:
sudo port -d selfupdate
This checks to see if there is a newer version of MacPorts base available, installing it if appropriate, and updates your ports tree to the latest version. This step should be done every now and again to ensure you are running the latest version, of both MacPorts base and the ports tree.
Installing the LSC Software Stack
With the MacPorts base system now installed, and up to date, it is a straightforward process to install the LSC Software Stack. There is a meta-port that installs all the dependencies required for developing Glue and LALSuite, which can be installed by running:
sudo port install lscsoft-deps
This will then install all the dependencies required for running and developing Glue, LALSuite, and PyLAL from the Git development repositories:
lscsoft-deps @20130604 (science) Description: This is a meta-port that depends on all the ports needed for developing Software used within the LIGO Scientific Collaboration. Homepage: http://www.lsc-group.phys.uwm.edu/daswg Runtime Dependencies: python27, py27-numpy, py27-pyrxp, py27-m2crypto, py27-cjson, py27-pyxmpp, py27-scipy, py27-matplotlib, py27-matplotlib-basemap, pkgconfig, fftw-3, fftw-3-single, libframe, metaio, gsl, libxml2, glib2, git-core, autoconf, automake, libtool
Note: this will take a long time to install as one of the dependencies is py27-scipy which, in turn, requires a fortran compiler to be available, as Xcode does not provide a fortran compiler one must be built from source.
After installation you will need to make the MacPorts python the active version, so the appropriate modules can be found, by running:
sudo port select --set python python27
Installing release versions of Glue and LALSuite
The release version of Glue is also available in MacPorts and can be installed with:
sudo port install glue
The release versions of the LALSuite packages, LAL, LALFrame, LALMetaIO, ..., LALApps, etc... can be installed with:
sudo port install lalapps
Or specific packages can be installed by replacing lalapps, in the above command, with the required package.
Note: Having the release versions of LALSuite installed from MacPorts will lead to build errors if you try and build LALSuite from the git repository. If you are planning on building LALSuite from git do not installed these ports.
PyLAL can be installed by running:
sudo port install pylal
Note: the current release of PyLAL only contains the library code, if you require the applications from PyLAL you need to build from source.
There are packages which, whilst they are not required for using LSC Software, make things easier. One of these is ipython, an interactive python shell, this can be installed with:
sudo port install py27-ipython -scientific sudo port select --set ipython ipython27
Keeping your system up-to-date
Periodically you should check that your system is up-to-date and install all appropriate updates, this can be done by running the following:
sudo port -d selfupdate sudo port -u upgrade outdated
Enabled LSCSoft Testing
There is a MacPorts testing repository available that contains versions of the LSCSoft Suite before they have been approved for production use by the SCCB. If you want to enable this simply edit the /opt/local/etc/macports/sources.conf and add the following:
rsync://gravity.phys.uwm.edu/macports/testingso that it is before the default macports.org entry, i.e.:
rsync://gravity.phys.uwm.edu/macports/testing rsync://rsync.macports.org/release/tarballs/ports.tar [default]
Then simply sync your ports tree, and upgrade any outdated ports.
If you run into any problems building any of the above ports then the quickest way to get this to the attention of the relative MacPorts maintainer is to file a ticket at http://trac.macports.org/newticket. Making sure you add ram @ macports.org to the CC field.
For other questions please ask on the LIGOMac mailing list.