Search


DASWG LAL Doxygen

Docs

How-To's
Technical
Software Docs
Minutes

Download

Browse CVS, Git, or SVN
Software Repositories
OS Security Updates
LIGO software virtual machine
VMware SL6 Install

Participate

SCCB - Software Change Control Board
Edit these pages
Sub-committees
Mailing List
Telecon

Projects

DMT
DQSEGDB
Glue
GraceDB
gstlal
LALSuite
LDAS Tools
LDG Client/Server
LDR
ligoDV
LIGOtools
LVAlert Administration
LVAlert
MatApps
Metaio
NDS Client
PyLAL
LSCSOFT VM

Legacy Projects

geopp
LDAS
LDM
LIGOtools
LSCGIS
Onasys
OSG-LIGO

gstlal Installation

gstlal Installation

Overview

Back to project page.

gstlal is a project that links together LAL and its associated libraries with GStreamer and so requires all of those tools to be installed, including the normally optional development-related components.  Once the dependencies are installed, the installation of gstlal itself should be very simple.

Preparing the Filesystem

The following is the filesystem layout I (Kipp) use.  Of course other arrangements are possible, and you are welcome to experiment, but if you have problems please try this arrangement before reporting problems.

The top level directory is local/ in which is found a normal collection of unix install directorys: bin/, lib/, etc..  The /path/to/local/ will be used as the install prefix for all software components.  Also in local/ is a directory named src/, and this is where we will keep the source code for the software.  For reference the tree looks like this, but do not try to make this by hand, it will be constructed for you as you download and install softare.

Prepare the filesystem by doing the following.  Choose where you want local/ to go (I put it in my home directory, but you might prefer to be more organized than that), then in that directory type

$ mkdir local
$ mkdir local/src

The rest of the tree will be created as software is downloaded and installed.

Preparing the Environment

Disable the system-wide lscsoft installation by doing

$ cd ${HOME}
$ touch .nolscsoft

then, on Debian systems, manually re-enable libframe and libmetaio by adding

export PKG_CONFIG_PATH="/opt/lscsoft/libframe/lib/pkgconfig:${PKG_CONFIG_PATH}"
export PKG_CONFIG_PATH="/opt/lscsoft/libmetaio/lib/pkgconfig:${PKG_CONFIG_PATH}"

to ${HOME}/.bash_profile, or wherever you set variables like this.  On RedHat derived systems like CentOS, use lib64/ instead of lib/ in these two paths.  Log out of your account and log back in again and confirm that pkg-config returns the correct directories for these two libraries with

$ pkg-config --cflags libframe libmetaio
-I/opt/lscsoft/libmetaio/include -I/opt/lscsoft/libframe/include

Now create the environment setup script for the software to be installed in your home directory with

$ cd /path/to/local/
$ cat >environment.sh <<_EOF_
export PATH="/path/to/local/bin:\${PATH}"
export PKG_CONFIG_PATH="/path/to/local/lib/pkgconfig:\${PKG_CONFIG_PATH}"
export PYTHONPATH="/path/to/local/lib/python2.5/site-packages:\${PYTHONPATH}"
export GST_PLUGIN_PATH="/path/to/local/lib/gstreamer-0.10:\${GST_PLUGIN_PATH}"
_EOF_

Those environment variables are appropriate for Debian systems (e.g., the Atlas cluster).  For RedHat-derived systems (e.g., the CIT, etc., clusters), PYTHONPATH needs to have /path/to/local/lib64/python2.5/site-packages pre-pended as well, and if your system is older the "python2.5" part of the paths might need to be replaced with "python2.4", or if it's newer you might need to change it to "python2.6".  So, take a look at your system and figure this out.

Once you have constructed environment.sh with those four environment variables in it,

$ source /path/to/local/environment.sh

You will need to do this everytime you wish to use or do development work with the software.  It might make sense to put this in your login scripts (but remember you have done this, if you choose to).

Downloading and Installing Dependencies

As we develop gstlal we sometimes find and fix bugs in and add new features to gstreamer itself.  Using gstlal requires a version of gstreamer that has our patches included, so in the instructions below we will be using the head of gstreamer's master branch, not an official source release (we do not expect to work this way in the long run, this is a start-up transient).  Because, for now, we will be using the newest version of gstreamer available, some of the software dependencies might be a little ahead of what is provided by your operating system.  Building gstreamer from git clone on Debian lenny (the current stable release, the OS found on the Atlas cluster) will require you to install

in your home directory.  The following instructions will download and install these three software packages into your /path/to/local prefix.

$ cd /path/to/local/src
$ wget http://liboil.freedesktop.org/download/liboil-0.3.14.tar.gz
$ wget http://ftp.gnome.org/pub/GNOME/sources/glib/2.18/glib-2.18.4.tar.gz
$ wget http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.14/pygobject-2.14.2.tar.gz
$ wget http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.8/pygtk-2.8.6.tar.gz

$ tar -xzf liboil-0.3.14.tar.gz
$ pushd liboil-0.3.14
$ ./configure --prefix=/path/to/local && make install
$ popd

$ tar -xzf glib-2.18.4.tar.gz
$ pushd glib-2.18.4
$ ./configure --prefix=/path/to/local && make install
$ popd

$ tar -xzf pygobject-2.14.2.tar.gz
$ pushd pygobject-2.14.2
$ CFLAGS="-Wl,-rpath -Wl,/path/to/local/lib" ./configure --prefix=/path/to/local && make install
$ popd

$ tar -xzf pygtk-2.8.6.tar.gz
$ pushd pygtk-2.8.6
$ CFLAGS="-Wl,-rpath -Wl,/path/to/local/lib" ./configure --prefix=/path/to/local && make install
$ popd

(Optional) NDS Support

gstlal includes an optional source element for retrieving live data from an NDS server. To enable NDS support, ensure that you have the NDS2 client installed before building gstlal. This requires you to install

To support Kerberos authentication, you will need to make sure that your system has libsasl2 and the gssapi module for libsasl2. In Debian these are the packages

$ wget http://ldas-jobs.ligo.caltech.edu/~jzweizig/nds2-release/nds2-client-0.5.2.tar.gz
$ tar -xzf nds2-client-0.5.2.tar.gz
$ pushd nds2-client-0.5.2
$ ./configure --prefix=/path/to/local && make install
$ popd

Downloading the Software

The following will clone the GStreamer source trees giving you read-only access.

$ cd /path/to/local/src/
$ git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad
$ git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-base
$ git clone git://anongit.freedesktop.org/git/gstreamer/gst-plugins-good
$ git clone git://anongit.freedesktop.org/git/gstreamer/gst-python
$ git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer

The following will clone the gstlal source tree giving you read-only access

$ cd /path/to/local/src/
$ git clone git://ligo-vcs.phys.uwm.edu/gstlal.git

OR, those with ligo.org credentials can obtain a read-write clone of the gstlal source tree by using

$ cd /path/to/local/src/
$ git clone ssh://albert.einstein@ligo-vcs.phys.uwm.edu/usr/local/git/gstlal.git

You must also clone lalsuite by following the instructions on the LALSuite project page.

Patching gst-plugins-base

To improve performance, some of the example pipelines provided with gstlal use an experimental patch that adds gap support to gstreamer's stock audioresample element.  We are in the process of preparing the patch for inclusion in the upstream source tree but the patch is not ready yet.  To use the programs included in gstlal you will need to apply the audioresample patch to your gst-plugins-base source tree locally.

$ cd /path/to/local/src
$ pushd gst-plugins-base
$ wget https://www.lsc-group.phys.uwm.edu/daswg/projects/gstlal/audioresample.patch
$ patch -p1 <audioresample.patch
$ popd

Patching gst-plugins-bad

Our pipelines get bitten by a long-standing bug in the glib library (166020).  I have opened a new bug report with a patch to gst-plugins-bad to work around the problem (607513), but hopefully progress can be made on fixing the real problem in glib.  In the meantime, you need to apply the patch locally to eliminate some segfaults from the input-selector element.

The patch was briefly accepted into the main source tree but was found to create lock-ups in totem, the Gnome media player, and so because a release is pending the patch has been reverted.  git can be used to retrieve and re-apply the original patch locally to allow our pipelines to work.

$ cd /path/to/local/src
$ pushd gst-plugins-bad
$ git cherry-pick 7e067615ffb5614f068f7753c10dde99afe49c3c
$ popd

Installing the Software

  1. $ cd /path/to/local/src
  2. Install the components of lalsuite in the order glue, lal, lalframe, lalmetaio, lalburst, lalinspiral, lalpulsar, lalstochastic, lalapps, pylal, using
    • $ pushd lalsuite
      • For C components:
        $ pushd directory
        $ ./00boot && ./configure --prefix=/path/to/local && make -j install
        $ popd
      • For Python components:
        $ pushd directory
        $ python setup.py install --prefix=/path/to/local
        $ popd
      $ popd
    • do not set any environment variables except as instructed above,
    • do not source any "user-env" scripts.
  3. Install the components of gstreamer in the order gstreamer, gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-python, using
    $ pushd directory
    $ ./autogen.sh --noconfigure && ./configure --prefix=/path/to/local && make -j install
    $ popd
    Note:  ignore warnings about "failed to install schema", these appear to be harmless.
  4. Install gstlal with
    $ pushd gstlal
    $ ./00init.sh && ./configure --prefix=/path/to/local && make -j install
    $ popd

Verifying the Installation

To check that each component is installed correctly, do the following.  NOTE:  do not run these commands from inside any of the respective source trees as the presence of files in those directories with names matching those referred to in these commands will confuse the tests.

glue
$ python -c "from glue import segments ; print segments.__file__"
should not produce an error, and should print a filename located in the /path/to/local/ directory tree.
pylal
$ python -c "from pylal import datatypes ; print datatypes.__file__"
should not produce an error, and should print a filename located in the /path/to/local/ directory tree, and
$ ldd /path/to/local/lib*/python*/site-packages/pylal/xlal/fft.so
should not produce an error, and should show that liblal.so.0 is provided by a file located in the /path/to/local directory tree.
gstreamer
$ which gst-inspect
should print /path/to/local/bin/gst-inspect, and
$ gst-inspect coreelements
should indicate that the Filename is in /path/to/local/lib/... .  To test for the audioresampler's gap-aware patch,
$ gst-inspect audioresample
should list gap-aware under Element Properties.
gstlal
$ gst-inspect gstlal
should report information on the gstlal plugin, showing a Filename in the /path/to/local/lib/... tree, and there should be several elements provided by the plugin;  and
$ ldd /path/to/local/lib/libgstlal.so
should not produce an error, and should show that libgstbase-0.10.so.0, libgstreamer-0.10.so.0, libgobject-2.0.so.0, libgmodule-2.0.so.0, libgthread-2.0.so.0 and libglib-2.0.so.0 are all provided by files located in the /path/to/local directory tree;  and
$ python -c "from gstlal import pipeparts ; print pipeparts.__file__"
should not produce an error, and should print a filename located in the /path/to/local/ directory tree.

$Id$