Casacore installation on Ubuntu

Here are some steps to install casacore on Ubuntu (specifically 10.04 LTS ran as a virtual machine with VirtualBox on Ubuntu 11.10). This posting uses provided packages where possible and avoids, if necessary the installation of packages from source. This is mostly meant as a reference for myself and hence includes a few things that I had to specifically do and probably won’t work for anyone else, I hope it does, but we all know what computers are like! Of course, you should go and see the latest on the [google code casacore] page. This is using casacore version 1.3.0.
wget casacore (see link above) and unpack.
sudo apt-get install build-essential
sudo apt-get install scons fort77 subversion g++ cmake libblas-dev liblapack-dev libqdbm-dev libfftw3-dev libcfitsio3-dev libboost-python-dev slang-cfitsio flex bison gfortran libhdf5-serial-dev libreadline5-dev python-scipy python-matplotlib python-pyfits
Download wcslib – and run make, make install
wget ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib.tar.bz2
tar -xf wcslib.tar.bz2
cd wcslib-4.8.2
./configure –prefix=/usr/local/include/wcslib/
make && make install && cd ..
When compiling casacore I had a specific problem where a header file couldn’t be found from wcslib, so quick fix;
sudo cp -r wcsconfig.h /usr/local/include/wcslib #from the wcslib dir
and that seemed to fix it.
Now install casacore with scons:
scons –prefix=/usr/local –enable-shared
sudo scons install
There are many different options available for the compilation – all the above does is make the shared libraries too… you should look into this but remember that the options.cache file needs to be removed if you do another make.

Advertisements

4 responses to “Casacore installation on Ubuntu”

  1. Krioma.net Blog says :

    Creating FITS files in c++

    A simple example, very similar to that given in the CFITSIO guidebook, on how to create a FITS file using CFITSIO. In this case I’m also building against some casacore libraries, but these aren’t going to be used in this…

  2. Krioma.net Blog says :

    Setting up a Virtual Webserver

    This is a quick guide on how to setup a webserver in a virtual machine. This is based on using Virtualbox and Ubuntu, so it might not work with all version of linux and though the install instructions inside the…

  3. Krioma.net Blog says :

    Casacore installation: Addendum

    So I was installing Casacore (as described here) on another machine and found I needed to do: sudo cp -r lib/libcasa_*.so /usr/lib sudo cp -r /usr/local/lib/libwcs*.so* /usr/lib/ To allow me to use some of the libraries. Bit odd but all…

  4. krioma says :

    I recently had to reinstall this and thought it prudent to post a quick update based on this installation.
    This time I did basically the same as above but with a few changes. Mostly due to some oddities with the installation of wcslib.
    sudo apt-get install python-scipy python-matplotlib python-pyfits scons fort77 subversion g++ cmake libblas-dev liblapack-dev libqdbm-dev libfftw3-dev libcfitsio3-dev libboost-python1.42.0 slang-cfitsio flex bison gfortran libhdf5-serial-dev libreadline5-dev libboost-python-dev
    #download wcslib
    wget ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib.tar.bz2
    tar xfj wcslib.tar.bz2
    cd wcslib-4.8.2 #this might vary.
    #make it
    make
    make check
    sudo make -n install
    sudo ln -s /usr/local/include/wcslib-4.3 /usr/local/include/wcslib
    #now more to the casacore directory
    scons –enable-shared –disable-static
    for me this failed to find one of the wcs headers, this was easily resolved by:
    sudo cp -r wcslib-4.8.2/wcsconfig.h /usr/local/include/wcslib
    #and try again:
    scons –enable-shared –disable-static
    sudo scons install
    #all now worked.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: