-
Notifications
You must be signed in to change notification settings - Fork 2
BlitzBuildNotes
Development seems to have stopped with version 0.9. This is what we use for MeqTrees. Get it from http://sourceforge.net/projects/blitz/.
Ubuntu 10.04 seems to have a very slow version of blitz. However, to build 0.9 yourself from source, you'll need to edit a couple of files:
-
Strip out the system version:
$ sudo apt-get remove libblitz-dev libblitz0ldbl
-
Download and unpack blitz-0.9. Configure with:
$ ./configure --prefix=/usr/local --enable-shared CXXFLAGS=-fPIC
-
For newer versions of g++, you need to add
#include <cstdlib>
at the beginning ofblitz/funcs.h
andblitz/mathfunc.h
. Alternatively, if you have g++-4.1 available on your system, you can use it to compile blitz by addingCXX=g++-4.1
to the configure arguments above. -
Build with:
-
$ make && sudo make install
Note that if you're rebuilding Timba which was previously configured for the standard Ubuntu blitz package, you'll need to clear out your build/release directory and redo cmake as follows: -
-
$ cd Timba/build/release $ rm -fr * $ cd ../.. $ Tools/build/bootstrap_cmake release $ cd build/release $ make """]]
Ubuntus prior to 10.04 ship a perfectly functional libblitz-dev package, so I never had cause to build it.
(This information very likely only applies to the old build system.)
-
Configure & build with:
-
./configure --prefix=/usr/local/blitz/gnu3 && make && make install
Under amd64, you will also need to give the --enable-shared flag to configure. If you use a non-default compiler for Timba (e.g. gcc-3.4), specify your compiler with CXX=/path/to/compiler on the configure command-line. -
The make install script of Blitz is slightly broken (as of version 0.8 or 0.9 at least), you may need to copy an additional file over manually. Note that this issue may have been solved, so only do this if your Timba build fails with a blitz-related error:
-
{{{ # (assuming blitz++ sources are in /usr/local/src/blitz-0.8) $ cp -a /usr/local/src/blitz-0.8/blitz/gnu /usr/local/blitz/gnu3/include/blitz }}}
-
Blitz is somewhat sensitive to compilers, hence you need to keep different versions of the include file if you use different compilers, hence the strange install path (the LOFAR build system will look for it there).
-
If you've installed blitz under /usr/local (as in the example above), the Timba lofarconf script should be able to locate it automatically. Should you use a non-standard path (or if you have another version of blitz that lofarconf incorrectly latches on), you can tell lofarconf where to find it by supplying it with the --with-blitz=/path/to/blitz option. You can also add this option to the compiler configuration in your variants.hostname file.
-
Note that under amd64 (at least the Debian version), lofarconf will look for libblitz.a in
/path/to/blitz/lib64/libblitz.a
. Themake install
command above installs it underlib/
, so you may have to make a symlink fromlib64
tolib
.