Skip to content
Gijs Molenaar edited this page Feb 13, 2014 · 5 revisions

This information only applies if you want to build Timba prior to svn revision 7155.

Prerequisites (prior to r7155)

  • A Linux system. Our development machines run Debian/stable or testing with a 2.6.x kernel. Any reasonably up-to-date system should serve. (I've managed to build MeqTimba on a decrepit RedHat 7.3 system with a 2.4 series kernel, but your mileage may vary...)
  • Access to our subversion server, lofar9.astron.nl. See ../ActualBuild for details.
  • gcc-3.4.x or 4.1.x. Debian packages g++-3.4, g++-4.1, or see ../BuildingGcc if you build from source. Note: gcc-4.x won't compile Timba prior to repository revision 4338 (20/12/2006), but should be fine for later versions. gcc-3.3 has a number of unfortunate bugs, so stay away.
  • GNU make 3.79 or higher (Debian stable). Some distributions were shipping 3.80beta at some point, this had a bug which made it incompatible with Timba, but 3.81 should be good.
  • Prior to repository version 6972 (12/06/2009), the old build system required GNU autotools: automake 1.9 or higher, autoconf 2.53 or higher, libtool 1.5.6 or higher. Prior to repository revision 4338 (20/12/2006), Timba required libtool version 1.5.6 and did not build properly with later versions. Later revisions work fine with all libtools.
  • As of revision 6972, a new cmake-based build system is available. This requires cmake 2.6 or higher. The old build system is not supported as of revision 6972 (but may remain in working order for some time.)
  • casacore, pyrap and casarest (as of 03/06/2008), or AIPS++ (prior dates).
    * For casacore & co., see build instructions on LinkingWithCasaCore. This is a lot easier to build and install than aips++ ever was, so this is the preferred solution as of the date above. * If you still use AIPS++ (welcome to Hell On Earth): A recent (2006) build of AIPS++. We only link against a small subset of relatively stable AIPS++ libraries, so the exact version does not really matter. I currently (November 2006) link Timba against aips++ build 1574, but run build 1109 when I need the imager (since later builds have problems...). See also AipsppNotes. * LAPACK3 and BLAS libraries and headers (Debian packages: either lapack3-dev blas-dev, or atlas3-base atlas3-base-dev atlas3-headers atlas3-sse2-dev) will be required by AIPS++ and casacore
  • CFITSIO 2.x or 3.x (Debian packages libcfitsio-dev libcfitsio2/3) is required both by casacore and AIPS++ and by Timba. 3.x is preferred.
  • fftw 3.x (http://www.fftw.org/) (Debian packages: fftw3 fftw3-dev)
  • Blitz++ 0.8 or higher (http://sourceforge.net/projects/blitz/) (Debian package blitz++). If you build blitz++ from source, please refer to .BlitzBuildNotes. Note that as of May 2007, the Debian amd64 version of blitz++ (0.9-x) is NOT suitable for building Timba, as it was compiled without the -fPIC flag. You will have to build blitz++ from source if you're running amd64.
  • Qdbm (http://qdbm.sourceforge.net/) libraries and headers. (Debian packages: libqdbm-dev.)

Python and friends (only applicable to versions prior to r7155)

If building these from source, then build in the order listed. Debian provides packages for everything, see ../DebianNotes.

  • Python 2.3.x or 2.4.x.

    • Version or Python to link against is specified in the Timba/autoconf_share/variants.HOST file. See variants.birch for an example. The default (as of Jan 2007) looks for Python 2.3, to link against 2.4 you may need to specify something like the following in your variants file: {{{python.var: --with-python-version=2.4 --with-python=/usr/include/+pkg+vers --with-python-libdir=/usr/lib }}}
  • I would recommend starting with Python 2.4 as there's less problems getting other stuff to build with it.

  • numarray-1.5 (or higher), with extensions (go to http://numpy.scipy.org/#older_array, and click on the Sourceforge Numarray Download Page' link there. ) * If building from source: run python setup.py install ` using the python built above, it should figure out the rest. Older versions of numarray have various bugs which may make them incompatible with Timba.

  • numpy-1.0 (or higher) (http://sourceforge.net/projects/numpy). * As of Timba revision 5351, algorithms which make use of the most recent python numerical library `numpy', are creeping into the system. If you do not have numpy installed, these algorithms will not be run and no results from them will be displayed.

  • Qt 3.3.2 or higher (but not Qt 4). Any decent distribution ships this.

  • PyQt 3.x (http://www.riverbankcomputing.co.uk/pyqt/) with QScintilla extensions (qtext) compiled in. Avoid version 3.17.1, it has a serious bug not present in 3.17 and 3.17.2. Note: the !PyQt/QScintilla dependency has caused people a lot of unnecessary irritation. Some distributions don't ship it at all, some ship a version without qtext, etc... and to make things worse, PyQt will refuse to compile without the right version of sip. To check if your system has the right kind of PyQt, fire up python and type:

import qt import qtext """]]and if no errors are reported, you're all set. If not, then under Debian all you have to do is install python2.3-qtext (or something like that...) With another distribution, you may be able to find the right combination of packages, but don't try too hard -- compiling from source is usually straightforward:

  1. Remove any existing sip, sip4 and PyQt packages. If some other packages depend on them and you don't want to remove them, then my sincerest sympathies, but you're going to have to go back to looking for a working combination of packages for your distribution that provides both qt and qtext.
  2. Download the latest QScintilla source from http://www.riverbankcomputing.co.uk/qscintilla/index.php. I last compiled version 1.71. Unpack, cd into it, and run cd qt && qmake qscintilla.pro && make && make install followed by ldconfig.
  3. Download the latest sip and PyQt sources from http://www.riverbankcomputing.co.uk/pyqt/index.php. Unpack both, cd into the sip directory, and run python configure.py && make && make install
  4. Now cd into the PyQt directory, and run python configure.py. Make sure it says something along the lines of "QScintilla 1.x is being used". If it complains about a missing QScintilla, stop and figure out why -- you did install it at step 2, didn't you? Otherwise, run make && make install.

Installing VTK (experimental, currently only available prior to r7155)

Note: If you install from the latest VTK source distribution (5.2.1) none of the editing mentioned in the following paragraphs is necessary.

This is for the experimental 3D-viewer plugins. If you'd like to try these plugins, you'll need to install VTK 4 or 5 on your system. Be warned, it is quite the unwieldy monster. Under Debian/Ubuntu, packages are provided, but some of the fixes below may need to be applied:

  • # apt-get install python-vtk

  • (Only with VTK4) There's then a bug in pyvtk that needs to be corrected (at least as of 10/04/2005). Go to /usr/lib/python2.x/site-packages. In the following two files:

    * ```
    

vtk_python/vtk/qt/QVTKRenderWidget.py vtk_python/vtk/qt/QVTKRenderWindowInteractor.py

* find 
      * ```
apply(QWidget.__init__, (self,parent,name) + args, kw)
"""]]and replace it with: 
      * ```
apply(QWidget.__init__, (self,parent,name) + args)
  • With some versions of PyQt (e.g. PyQt 3.17) and BOTH VTK4 and VTK5, you still need to edit the following lines in QVTKRenderWindowInteractor.py:

  • At about line 152 you need to change self.setBackgroundMode(2) """]]to self.setBackgroundMode(qt.Qt.NoBackground) """]]And at about line 155 you need to change self.setFocusPolicy(2) """]]to self.setFocusPolicy(qt.QWidget.ClickFocus)

* If you are using **python2.4**  with VTK 4, you need to edit **vtk_python/vtk/\_\_helper.py** and change line 12  


del sys.modules['vtk.%s'%mod_name]

to 

try: del sys.modules['vtk.%s'%mod_name] except: pass

* VTK uses the GL graphics library to do the actual 3-D displays. Depending on your system you may need to make sure that your linux kernel is using the appropriate device drivers. 

* Update for September 2008. I encountered some VTK 5.0 problems when I migrated the VTK code from using numarray to using numpy. Under VTK 5.0 if you select the option to show a 3-D display the VTK render window may try to overwrite the slider control window. This is annoying, but the problem goes away if you float the graphics display window from the meqbrowser. However if your version of linux comes with a VTK 5.2 package, you are in luck - things should work properly and its no longer necessary to do any of the above mentioned editing adjustments to python code. I've added instructions for building VTK5.2 from source to the [[InstallingVtk|InstallingVtk]] page. 

For more details (including building VTK from scratch), see [[InstallingVtk|InstallingVtk]]. 
Clone this wiki locally