public:user_software:ubuntu_14_4

This is an old revision of the document!


Installing the new LOFAR Software on a fresh Ubuntu 14.04

This are my private, unedited notes on installing the LOFAR Software on a fresh Ubuntu 14.04. They are an update on the notes for Ubuntu 12.04 including the changes needed for building the new awimager2. (23.9.2015 Andreas Horneffer)

########## packets to install with apt-get, aptitude or whatever
libgtkmm-2.4-dev python-matplotlib python-pyfits libatlas-base-dev 
mpi-default-bin mpi-default-dev libfreetype6-dev python-setuptools
libxml2-dev libpng12-dev libcfitsio3 libcfitsio3-dev libboost-all-dev
autoconf autoconf-archive autogen automake binutils-dev cmake cmake-curses-gui
cvs doxygen flex gfortran git guile-1.8-dev ipython libblas-dev libblitz0-dev
libboost-all-dev libboost-dev libfftw3-dev libfftw3-doc libgfortran3
libglib2.0-dev libgsl0-dev liblapack-dev liblog4cxx10 liblog4cxx10-dev 
libopenmpi-dev libpqxx3-dev libx11-dev mgdiff patch pgplot5 
python-dev python-numpy python-scipy scons subversion-tools 
swig bison libbison-dev tcl tcl-dev tk tk-dev tk8.5-dev tcl8.5-dev
libhdf5-dev liblog4cplus-dev liblog4cplus-1.0-4 cython
###for parmdbplot:
python-sip python-qt4
#####for losoto:
python-tables 
#####for casasynthesis:
libdbus-c++-dev libdbus-1-dev
#####for factor and its dependencies
python-astropy python-jinja2 python-shapely

Download packages:
##################
  mkdir /opt/soft/lofar-stuff/Downloads
  cd /opt/soft/lofar-stuff/Downloads
  wget ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar
  wget ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-4.24.tar.bz2
  
Build wcslib (with pgsbox!)
###########################
  tar -xjf ../Downloads/wcslib-4.24.tar.bz2
  cd wcslib-4.24
  export FFLAGS=-fPIC
  ./configure --prefix=/opt/soft/lofar-stuff
  #no parallel make!
  make 
  make install

Install Casacore data:
############################
(The WSRT measures don't include the data sub-directory)
  mkdir -p /opt/soft/lofar-stuff/data
  cd /opt/soft/lofar-stuff/data
  tar -xzvf ../Downloads/WSRT_Measures.ztar
  
Download and Build Casacore2:
#############################
  mkdir -p BuildDir/casacore2
  cd BuildDir/casacore2
  svn co https://github.com/casacore/casacore/tags/v2.0.3 source
  mkdir -p build/opt
  cd build/opt
  cmake -DBUILD_TESTING=NO -DCMAKE_INSTALL_PREFIX=/opt/soft/lofar-stuff -DUSE_FFTW3=Yes -DUSE_THREADS=YES -DWCSLIB_ROOT_DIR=/opt/soft/lofar-stuff -DBUILD_PYTHON=True -DDATA_DIR=/opt/soft/lofar-stuff/data ../../source
  make -j12
  make install

Download and Build python-casacore
##################################
  mkdir /opt/soft/lofar-stuff/BuildDir/python-casacore
  cd /opt/soft/lofar-stuff/BuildDir/python-casacore
  svn co https://github.com/casacore/python-casacore/trunk source
  export PATH=$PATH:/opt/soft/lofar-stuff/bin
  export LD_LIBRARY_PATH=/opt/soft/lofar-stuff/lib
  export PYTHONPATH=/opt/soft/lofar-stuff/lib/python2.7/site-packages/
  ln -s /opt/soft/lofar-stuff/lib /opt/soft/lofar-stuff/lib64
  mkdir -p /opt/soft/lofar-stuff/lib/python2.7/site-packages/
  cd source/
  ./setup.py build_ext -I/opt/soft/lofar-stuff/include -L/opt/soft/lofar-stuff/lib
  ./setup.py install --prefix=/opt/soft/lofar-stuff 

Download and Build casarest
###########################
  # casarest is needed for awimager (without the "2")
  mkdir  /opt/soft/lofar-stuff/BuildDir/casarest
  cd /opt/soft/lofar-stuff/BuildDir/casarest
  #svn co svn://lofar9.astron.nl/var/svn/repos/trunk/casarest source
  svn co https://github.com/pkgw/casarest/trunk source
  mkdir build
  cd build
  cmake -DCASACORE_ROOT_DIR=/opt/soft/lofar-stuff -DBUILD_ALL=1 -DCMAKE_INSTALL_PREFIX:PATH=/opt/soft/lofar-stuff ../source
  make -j12
  make install

Download and Build casasynthesis
################################
  # casasynthesis is needed for awimager2 (with the "2")
  mkdir  /opt/soft/lofar-stuff/BuildDir/casasynthesis
  cd /opt/soft/lofar-stuff/BuildDir/casasynthesis
  svn co https://github.com/radio-astro/casasynthesis/trunk source
  mkdir build
  cd build
  cmake -DCASACORE_ROOT_DIR=/opt/soft/lofar-stuff -DWCSLIB_ROOT_DIR=/opt/soft/lofar-stuff -DCMAKE_INSTALL_PREFIX:PATH=/opt/soft/lofar-stuff ../source
  make -j12
  make install

Download and Build the LOFAR Software
#####################################
  mkdir /opt/soft/lofar-stuff/BuildDir/lofarsoft
  cd /opt/soft/lofar-stuff/BuildDir/lofarsoft
  svn checkout --ignore-externals https://svn.astron.nl/LOFAR/trunk LOFAR
  #if it asks for an account: username: lofar-guest  password: lofar-guest
  mkdir -p build/gnu_opt
  cd build/gnu_opt
  cmake -DCASACORE_ROOT_DIR=/opt/soft/lofar-stuff -DWCSLIB_ROOT_DIR=/opt/soft/lofar-stuff -DBUILD_TESTING=NO -DBUILD_SHARED_LIBS=ON -DUSE_OPENMP=ON -DBUILD_PACKAGES="Offline" -DCMAKE_INSTALL_PREFIX:PATH=/opt/soft/lofar-stuff ../../LOFAR/
  make -j12
  make install

Download and Build LoSoTo
#########################
  mkdir /opt/soft/lofar-stuff/BuildDir/losoto
  cd /opt/soft/lofar-stuff/BuildDir/losoto
  git clone https://github.com/revoltek/losoto.git source  
  cd source
  export PYTHONPATH=/opt/soft/lofar-stuff/lib/python2.7/site-packages/
  python ./setup.py install --prefix=/opt/soft/lofar-stuff 

Download and Build WSClean
##########################
  cd /opt/soft/lofar-stuff/Download
  wget https://downloads.sourceforge.net/project/wsclean/wsclean-1.9/wsclean-1.9.tar.bz2
  cd /opt/soft/lofar-stuff/BuildDir
  tar -xjf ../Download/wsclean-1.9.tar.bz2
  # fix wsclean-1.9/lofar/lbeamevaluator.h
  #   add "#define HAVE_BOOST" before including "StationResponse/Station.h"
  mkdir wsclean-1.9/build
  cd wsclean-1.9/build
  cmake -DCMAKE_PREFIX_PATH=/opt/soft/lofar-stuff -DCMAKE_INSTALL_PREFIX:PATH=/opt/soft/lofar-stuff -DCASA_INCLUDE_DIR=/opt/soft/lofar-stuff/include/casacore  ../
  make -j12
  make install
  
Download and Build LSMTool
#########################
  mkdir /opt/soft/lofar-stuff/BuildDir/lsmtool
  cd /opt/soft/lofar-stuff/BuildDir/lsmtool
  git clone https://github.com/darafferty/LSMTool.git source
  cd source
  export PYTHONPATH=/opt/soft/lofar-stuff/lib/python2.7/site-packages/
  python ./setup.py install --prefix=/opt/soft/lofar-stuff 

Download factor
###############
  mkdir /opt/soft/lofar-stuff/BuildDir/factor
  cd /opt/soft/lofar-stuff/BuildDir/factor
  git clone https://github.com/revoltek/factor source
  
  • Last modified: 2015-09-23 15:17
  • by Andreas Horneffer