Building the OOF package: worked solutions

Below are some fully worked out solutions for building the OOF package on computer installations. They may be useful for a wider audience than just the target institution, so they are collated here together.

JAO Santiago/OSF

The script below should work both on sco-red and osf-red. I’ve tried it on sco-red and it compiles through to the end and provides a runnable installation.

# Script to build the OOF software on ALMA "red" computers, i.e., the
# reduction machines osf-red and sco-red

# This is the installation directory
export INSTALLDIR=/users/bnikolic/p/bnoof

# Pre-requisites. If 1 this will build the often-used libraries listed
# below that for some reason are not installed on the ALMA computers. 
export DOPREREQ=0

if [ "${DOPREREQ}" -gt "0" ]; then
# First install GSL
    wget http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gsl/gsl-1.13.tar.gz
    tar xzvf gsl-1.13.tar.gz
    cd gsl-1.13
    ./configure --prefix=$INSTALLDIR
    make && make install && cd ..
    
    # Install swig. 
    wget "http://downloads.sourceforge.net/project/swig/swig/swig-1.3.40/swig-1.3.40.tar.gz?use_mirror=kent"
    tar xzvf swig-1.3.40.tar.gz
    cd swig-1.3.40
    ./configure --prefix=$INSTALLDIR
    make && make install && cd ..
    
    wget "http://downloads.sourceforge.net/project/boost/boost/1.41.0/boost_1_41_0.tar.bz2?use_mirror=sunet"
    tar xjvf "boost_1_41_0.tar.bz2"
    cd boost_1_41_0/tools/jam/src/
    ./build.sh 
    cp bin.*/bjam ../../../
    cd ../../../
    ./bjam --prefix=$INSTALLDIR install

fi    


export BOOSTFLAG="--with-boost=${INSTALLDIR}"

export BNLIBVER=bnlib-1.3.2
export BNFITSVER=bnfits-1.2
export ASTROMAPVER=astromap-1.5b6
export BNMINVER=bnmin1-1.11
export OOFVER=oof-1.4b7

export COMPS="$BNLIBVER $BNFITSVER $BNMINVER $ASTROMAPVER $OOFVER"

for x in ${COMPS}
do
    wget -nc http://www.mrao.cam.ac.uk/~bn204/soft/${x}.tar.bz2
    tar xvjf ${x}.tar.bz2
    (cd ${x} &&
     PYTHON=python2.5 PYTHON_LDFLAGS="-L/usr/lib64/casapy/lib -lpython2.5"  PKG_CONFIG_PATH=${INSTALLDIR}/lib/pkgconfig/ LD_LIBRARY_PATH=$INSTALLDIR/lib PATH=$INSTALLDIR/bin:$PATH CFLAGS=-I${INSTALLDIR}/include CPPFLAGS="-I${INSTALLDIR}/include -I/usr/include/cfitsio" LDFLAGS=-L${INSTALLDIR}/lib ./configure --prefix=${INSTALLDIR} ${BOOSTFLAG} --with-gsl-prefix=${INSTALLDIR} &&
     make install)
done

wget http://www.mrao.cam.ac.uk/~bn204/soft/iofits4.py
cp iofits4.py ${INSTALLDIR}/bin

export LD_LIBRARY_PATH=${INSTALLDIR}/lib:${LD_LIBRARY_PATH}
export PYTHONPATH=${INSTALLDIR}/bin:${INSTALLDIR}/lib:${PYTHONPATH}

Building on Debian 8

The following script shows how to compile the programs on Debian 8

# Packages to install. Must enable non-free for pgplot
sudo apt-get install libgsl0-dev swig gfortran libboost-all-dev fftw3-dev libcfitsio-dev make g++ pkg-config pgplot5 libpng-dev xorg-dev

BNLIB=bnlib-1.3.3
BNFITS=bnfits-1.2
ASTROMAP=astromap-1.5
BNMIN1=bnmin1-1.12
OOF=oof-1.4

wget http://www.mrao.cam.ac.uk/~bn204/soft/${BNLIB}.tar.bz2
wget http://www.mrao.cam.ac.uk/~bn204/soft/${BNFITS}.tar.bz2
wget http://www.mrao.cam.ac.uk/~bn204/soft/${ASTROMAP}.tar.bz2
wget http://www.mrao.cam.ac.uk/~bn204/soft/${BNMIN1}.tar.bz2
wget http://www.mrao.cam.ac.uk/~bn204/soft/${OOF}.tar.bz2

export OOFPREFIX=/home/bnikolic/ooftest

export PKG_CONFIG_PATH=${OOFPREFIX}/lib/pkgconfig/

# Note this is for 32bit arch!
export BOOSTFLAG="--with-boost-libdir=/usr/lib/i386-linux-gnu"

export COMPS="${BNLIB} ${BNFITS} ${BNMIN1} ${ASTROMAP} ${OOF}"

for x in ${COMPS}
do
    if  [ -e ${x}.tar.bz2 ] ;  then
	tar xvjf ${x}.tar.bz2  &&
	    (cd ${x} &&
		    ./configure --prefix=${OOFPREFIX}  ${BOOSTFLAG} FFLAGS="-fno-range-check" &&
		    make install
	    )
    else
	echo "Cant find ${x} !!!"
	break
    fi
done

Table Of Contents

Previous topic

BNMin1

Next topic

De-convolution of a Gaussian beam from planetary observations