Skip to content
Oleg Smirnov edited this page Jun 16, 2015 · 9 revisions

Ubuntu 12.04 installation

At time of writing (May 7, 2012), we did not have official Ubuntu 12.04 binary packages -- this will probably be targeted in the next stable release.

However, it seems that with a bit of hacking the 11.04 packages can be made to work. This requires installing some older debs (python2.6, etc.) that have been dropped by Ubuntu for 12.04. However, versions from older distros can be downloaded, and seem to work fine, see below.

Step 1 is to download and install these "legacy" packages:

sudo apt-get install libdb4.8
wget http://XX.archive.ubuntu.com/ubuntu/pool/main/p/python2.6/{python2.6{,-minimal,-dev,-dbg},libpython2.6}_2.6.7-4ubuntu1_amd64.deb \
  http://xx.archive.ubuntu.com/ubuntu/pool/main/b/boost1.42/libboost-python1.42.0_1.42.0-4ubuntu2_amd64.deb \
  http://xx.archive.ubuntu.com/ubuntu/pool/main/b/boost1.42/libboost-program-options1.42.0_1.42.0-4ubuntu2_amd64.deb \
  http://launchpadlibrarian.net/19459573/libqdbm-dev_1.8.74-1.4_amd64.deb \
  http://launchpadlibrarian.net/19459572/libqdbm14_1.8.74-1.4_amd64.deb
sudo dpkg -i *.deb

## if dpkg above reports errors, do
apt-get -f install
## ...and then once more:
sudo dpkg -i *.deb

Step 1a is to put a "hold" on the libqdbm14 and libqdbm-dev packages. The ones shipped with 12.04 are missing hovel.h for some very odd reason (see discussion here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620550), and so MeqTrees can't use them. The commands above install older working versions, you now need to tell the package manager to NOT upgrade these older versions in the future:

{{{ echo libqdbm-dev hold | sudo dpkg --set-selections echo libqdbm14 hold | sudo dpkg --set-selections }}}

Step 2 is to install the 11.04 OeRC repository, as per the Downloading page.

Step 3 is to install meqtrees & friends:

sudo apt-get install meqtrees owlcat makems

You're all set! 

NOTE: If you encounter errors similar to the following while running the [[MeqTrees|Home]] GUI, make sure that the package qt-at-spi is NOT installed (during an update or by another software)! This package may cause the [[MeqTrees|Home]] browser to crash and/or generate errors similar to: 


Got bus address: "unix:abstract=/tmp/dbus-PCZLauOt80,guid=e9f13b9f22a1afc6e8e0396d000019eb" Connected to accessibility bus at: "unix:abstract=/tmp/dbus-PCZLauOt80,guid=e9f13b9f22a1afc6e8e0396d000019eb" Registered DEC: true Registered event listener change listener: true QSpiAccessible::accessibleEvent not handled: "6" obj: QMenu(0x9f75600, name = "fileMenu") "fileMenu" QSpiAccessible::accessibleEvent not handled: "6" obj: QMenu(0x9f73e98) "" QSpiAccessible::accessibleEvent not handled: "7" obj: QMenu(0x9f73e98) "" QSpiAccessible::accessibleEvent not handled: "6" obj: QMenu(0x9f73e98) "" QSpiAccessible::accessibleEvent not handled: "7" obj: QMenu(0x9f73e98) "" QSpiAccessible::accessibleEvent not handled: "7" obj: QMenu(0x9f75600, name = "fileMenu") "fileMenu" FIXME: handle dialog start. FIXME: handle dialog end.

Thanks to Iniyan for posting the above error warning on his web site! 


## Building the development version on 12.04 using the binary as a stepping stone

The procedure is similar to (and even slightly simpler than) that outlined for 10.04 below. Install the (11.04) binaries as above. Then, you will only need to install the following packages: 

* ` sudo apt-get install subversion g++ make cmake libblas-dev liblapack-dev libfftw3-dev libcfitsio3-dev python-scipy` 
Once you have the sources checked out ([[CheckingOut|CheckingOut]]), simply do 

* ```
$ cd Timba
$ Tools/Build/bootstrap_cmake release 
$ cd build/release
$ make  # you can stick a -j2, -j4, etc. after make if you have 2, 4, etc. processors.

Rebuilding lwimager

To build casarest-1.2.0 on 12.04 (in case you want to take lwimager.cc from 1.2.1, to fix the uniform weighting bug)

$ sudo apt-get install gfortran-4.4 g++-4.4 $ svn co https://svn.astron.nl/casarest/release/casarest/release-1.2.0 casarest-1.2.0 $ svn co https://svn.astron.nl/casarest/release/casarest/release-1.2.1 casarest-1.2.1 $ cp casarest-1.2.1/synthesis/apps/lwimager.cc casarest-1.2.0/synthesis/apps $ cd casarest-1.2.0 $ mkdir build $ cd build $ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME -DLIB_EXTRA_SYNTHESIS=gfortran -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.4 $ make


# Ubuntu 10.04 build recipe using the binary version as a stepping stone

This recipe assumes a fresh Ubuntu 10.04 (64-bit) installation of MeqTrees 1.2 or higher. The binary version really takes the edge off a from-source build by installing a lot of the dependencies for you, so download and install the binary version from the OeRC repository. 

(If you don't have subversion then `sudo apt-get install subversion`). 

Once that's done, check out the source code from the svn repository following this page: [[CheckingOut|CheckingOut]]. 

Then install the following (NB: if the command below complains that `libboost-python1.40.0` is not found, try 1.42.0 instead): 

            * `$ sudo apt-get install subversion g++ cmake libblas-dev liblapack-dev libqdbm-dev libfftw3-dev libcfitsio3-dev libboost-python1.40.0 python-scipy` 
At this point it's ready to be built, so 

            * ```
$ cd Timba
$ Tools/Build/bootstrap_cmake release -DBLITZ_INCLUDE_DIR=/opt/mpp/blitz/0.9/include/
$ cd build/release
$ make  # you can stick a -j2, -j4, etc. after make if you have 2, 4, etc. processors.

Note the BLITZ_INCLUDE_DIR specification above. Newer Ubuntus tend to include a very slow version of libblitz, so we're shipping our own custom-built version with MeqTrees, in a package called blitz-mpp, which will have been installed for you when you originally did a full install of MeqTrees from the OeRC repositories. The specification above tells cmake to build MeqTrees against this custom version.

After the build you'll have to add a few things to your ~/.bashrc file to setup various paths to point to the repository versions, and set up the 'release' version of MeqTrees. I have the following:

        * ```

export PYTHONPATH=/home/ianh/trunk/:/home/ianh/trunk/Owlcat/:/home/ianh/trunk/Purr/ export TIMBA_PATH=/home/ianh/trunk/Timba export MEQTREES_CATTERY_PATH=/home/ianh/trunk/Frameworks/Cattery/ export PATH=/home/ianh/casapy-32.0.15111-002-64b:/home/ianh/trunk/Tigger/bin:/home/ianh/trunk/Purr:/home/ianh/trunk/Owlcat/:$PATH source $TIMBA_PATH/install/timba-init.sh > /dev/null timba-setup release > /dev/null

(As you might have spotted, all this can also co-exist with CASA.) After this, I believe you are good to go. Visit the forum if you have questions, comments or there is a mistake in the above. 

You might also have to rebuild the symlinks if things like meqtree-pipeliner.py aren't available straight from your command prompt. Details on how to do this are available here: /trunk/Timba/README_build.txt 


## Issues with CUDA and NVidia Graphics Cards (experimental feature only)

_NB: this section is only applicable if you plan to play with the experimental new CUDA code. For normal MeqTrees usage, this is entirely unnecessary, so skip this section._  

Ubuntu 10.04 shipped with Nvidia graphics card driver Version 195.36. Some MeqTrees nodes are now being developed to make use of Nvidia graphics cards for GPU programming. The developer is using Nvidia's cuda toolkit v4. This basically means that you have to upgrade your graphics card driver to make use of cuda toolkit V4 if you're not using the latest and greatest Ubuntu.  

I used the following sequence of commands to upgrade an Ubuntu 10.04 system to the latest graphics card driver supported by Ubuntu (see www.ubuntugeek.com/how-to-install-nvidia-260-19-12-drivers-in-ubuntu-10-1010-04-using-ppa.html for details and comments.) WARNING: Executing the following commands has the potential to blow away your system so its a do at your own risk affair. 

               * ```
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings

The system then upgraded my driver to Version 290.10 (as of January 7, 2012). Whether or not this upgrade actually allows you to make use of the MeqTrees GPU nodes will depend on the power of your graphics card: it should have what Nvidia refers to as compute capability >= 1.3. Note that Ubuntu does not seem to play nicely with the `run' packages available on the Nvidia site to update graphics drivers and you can indeed end with a non-working graphics driver and a big headache.

Additional steps for MeqTrees versions prior to 1.2

Prior to the 1.2 release, a couple of extra steps were required for a successful build: you needed to rebuild pyfits (since the Ubuntu one is broken), and you needed to install astLib. As of 1.2, MeqTrees includes a workaround for the pyfits bug, and ships its own astLib (which will have been installed for you from the OeRC repositories), so neither step is necessary anymore.

pyfits issues

There's an issue with the version of Pyfits that comes with 10.04, meddling with affairs it has no right to. As of 1.2, MeqTrees includes a workaround. If you happen to be building an older version, then remove the standard package

        * `sudo apt-get remove python-pyfits` 

then download the source from here:

        * `http://www.stsci.edu/resources/software_hardware/pyfits/Download` 

extract the archive and:

        * `sudo python setup.py install` 

astLib install

To get Tigger to work you'll also need to install astLib: http://astlib.sourceforge.net/ -- download, unzip and untar, then from the extracted folder:

        * `sudo python setup.py install --prefix=/usr/local` 

10.04 and up

10.04 appears to ship and excruciatingly slow version of libblitz (probably because it was compiled with thread-safety enabled, which causes all array accesses to be really slow. MeqTrees is supposed to provide thread-safety at a higher level, and so can use a single-threaded version of blitz.) You will need to rebuild blitz from source, or else (as of ~MeqTrees 1.2) install the blitz-mpp package from the OeRC repositories. The latter will be done for you if you install the binary MeqTrees packages.

8.10 and up

Sep 2009: new cmake build system in place. To build from source, first install the meqtrees package from the Oxford repository (see Downloading.) This automatically pulls in all runtime prerequisites, plus casacore and other goodies. For compiling, I further had to install:

  • sudo apt-get install g++ cmake make subversion libqdbm-dev libcfitsio3-dev libfftw3-dev liblapack-dev If you're building from source, you may now want to remove the meqtrees package pulled in from the repository, so as to avoid confusion with the built versions.

8.04

Mar 2010: support dropped (Qt 4.4 now required for MeqTrees, which 8.04 doesn't ship.)

Sep 2009: See 9.04 instructions above. cmake 2.6 will install from the Oxford repository for the 1.1 release (pre-release at time of writing, but out soon).

7.10

June 2008: On Ubuntu 7.10 32 bit machines you can compile the casacore package with the g++ 4.1.3 compiler, but (at least on my machine) you need to build the Timba package with g++ 3.4 rather than g++ 4.1. If you build Timba with g++ 4.1 the kernel tends to crash in strange and mysterious ways with scripts that run fine with the g++ 3.4 compile.

February 2008: I have done a fresh install of 32-bit Ubuntu Linux V7.10 on a Dell Latitude D830 with a Intel 2.6 GHz dual-core and 4GB of memory. For starters, the lofarconf script looks for a small program called 'arch' which returns the type of architecture you have. As of Ubuntu V7.10 this program is not provided anywhere by Ubuntu. However you can code up the following two-liner to get the equivalent functionality:

#!/bin/bash
uname -m

and put it, say, /usr/local/bin.

(By the way, if your Timba/autoconf_share/variants script says that you will be using ccache make sure that you have it installed! Otherwise lofarconf will fail with entirely misleading errors that it can't make pthreads work properly!)

As above I still had to compile PyQwt4.2.2 and Blitz manually. Ubuntu V7.10 does come with a PyQwt4.2.3 package but we can't use it because it was compiled without numarray support, only Numeric and numpy. See the page for notes about a fix you should put into PyQwt4.2.2. Unfortunately one can't directly compile the source code for PyQwt4.2.3 because it requires a later version of 'sip' than is provided by the package manager in this version of Ubuntu.

Recently I've also upgraded my aips++ on 32 bit Ubuntu to V 19.1980. Most things would compile but occasionally I would get errors when linking of the form:

Remaking functionals (opt) because of functionals.cc tmplinst DOfunctionals.cc
libtasking.a libtables.a libscimath.a libscimath_f.a libcasa.a
`.L2759' referenced in section `.rodata' of
/aips++/linux_gnu/lib/libscimath.a(FunctionHolder_1060.o): defined in discarded
section

This turns out to be a g++ 3.4 bug. The way to get around it is to build and install binutils-2.16 and put the gnu 'ld' linker from that build in your path ahead of the Ubuntu supplied linker. Then you will still get the same errors reported but that version of the linker just treats the errors as a warning and the link will go to completion. (Unfortunately this fix doesn't seem to work on 64-bit Ubuntu - sigh.)

7.04

June 2007: I installed a 64-bit Ubuntu Linux V7.04 on my home machine (HP AMD-64 athlon dual 4200+ processors) after some serious head banging. This version comes with python 2.5.1 so I'm a bit ahead of the curve ... Note that since the Timba system makes extensive use of the Qt widget set you should install Kubuntu - this variant comes with the KDE desktop as the default; then most Qt related packages will be automagically installed for you.

The only packages I had to install manually were PyQwt4.2.2 and Blitz++ 0.9. The Ubuntu 'Synaptic' package manager was a big help in finding the packages I needed to get things up and running. I end up with basically the same package configuration as is given in the ScientificLinuxNotes page. Of course, aips++ was the usual pain-in-the-butt; I could compile V19.1556 but glish would always hang at start up (glish is still needed for aips++ imaging etc) - somehow it could not digest the tcl-tk libraries supplied with ubuntu. My final solution was just to tarball up the entire working aips++ that I had on my AMD opteron computer at work, after first putting the pgplot and tcl-tk shared libraries from the AMD opteron in /aips++/linux_gnu/lib. I then downloaded the whole thing into the local /aips++ directory, and amazingly the whole thing basically 'just worked'.

Kumar Golap suggested that the glish tcl/tk `freezeup' could be solved by compiling these libraries with threading disabled, but that didn't seem to help. Of course Oleg has provided the answer - just start up glish without tk - e.g . glish -notk, et. voila

The Timba install (I used gcc 3.4) was relatively straightforward. The lofarconf step complained about not finding a few header files etc - but these complaints were resolved with the aid of a few soft links or downloading of some additional 'dev' packages with the 'Synaptic' package manager.

et voila - things are working - python2.5.1 seems to have digested all Timba python code with no complaints whatsoever.

Clone this wiki locally