Problems
On my Debian etch (ia32) laptop, the following problems were encountered:
0. scons 0.97 or higher is required, etch includes 0.96. Solution: Installed 0.98 from the testing branch.
1. svn version build (2/6/2008) failed with:
#Building package: casa scons prefix=/home/oms/casacore install casacoreroot=/home/oms/casacore scons: Reading SConscript files ... KeyError: 'linux2': File "/home/oms/casacore/casacore/casa/SConstruct", line 44: env.Tool('casa', env["casashrdir"])
This is supposed to have been fixed as of 3/6/2008.
2. Downloaded casacore-0.3.0 release from website. Build failed with:
File "/home/oms/casacore/share/casacore/buildenv.py", line 3, in BuildEnv AttributeError: SConsEnvironment instance has no attribute 'CXXFile':
Solution: install flex.
3. Next problem:
scons: *** While building `['build_linux_i686/opt/Tables/RecordGram.ycc']' from `['tables/Tables/RecordGram.yy']': Don't know how to build from a source file with suffix `.yy'. Expected a suffix in this list: ['.lm', '.ll'].
Solution: install bison.
4. Next problem:
Building package: scimath scons prefix=/home/oms/casacore install casacoreroot=/home/oms/casacore scons: Reading SConscript files ... A custom fortran compiler also needs f2clib defined
See also: http://code.google.com/p/casacore/issues/detail?id=8&can=1&q=fortran Removed FORTRAN variable from scimath/options.cfg, this helped. (As the discussion at the link says, this appears to be an scons 0.98 problem. If you're using scons 0.97 the problem probably won't appear.)
5. wcslib not found. Solution: specify paths via:
./batchbuild.py prefix=/home/oms/casacore wcsincdir=/usr/local/include wcslibdir=/usr/local/lib/ install
6. wcsconfig.,h not found! Somehow the wcslib distribution fails to install it. Need to copy wcsconfig.h from the wcslib source directory.
7. On some systems,scons may occasionally stop the build with error messages similar to:
scons: *** DirNodeInfo instance has no attribute 'csig' scons: building terminated because of errors.
This can happen if you are trying to directly install casacore into a system (root owned) directory such as /usr/local. The present workaround is to install into some directory owned by you (non-root) and later as root copy things over manually into a system directory.
8. Here is a later example of building casacore-1.0.1 with scons 1.2
[casacore-1.0.1]> scons --prefix=/home/gmims/twillis/local --enable-shared --cfitsio-incdir=/usr/include/cfitsio --wcsroot=/home/gmims/twillis/local
follow the above command by
scons install
9. The current pyrap (February 3, 2010) can then be built by following the sequence
svn co http://pyrap.googlecode.com/svn/trunk pyrap cd pyrap Then build: ./batchbuild-trunk.py --casacore-root=/home/gmims/twillis/local --boost-root=/home/gmims/twillis/local --boost-lib=boost_python --prefix=/home/gmims/twillis/local (NOTE: the specification of various parameters to batchbuild-trunk.py is obviously machine specific; run ./batchbuild-trunk.py --help to see all the parameters you can specify.) pyrap then appears to start up OK: [gmims_1 11:21am] [pyrap]> python Python 2.6.4 (r264:75706, Jan 22 2010, 17:20:59) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pyrap.tables import * >>> NOTE: At the moment the batchbuild.py script does nothing but give you a message: ./batchbuild.py The 'current' release is broken until the next full release of pyrap. Please use batchbuild-trunk.py (to use trunk) for now
10: From the casarest directory, casarest can then be built with the command
cmake .. -DCASACORE_ROOT_DIR=/home/gmims/twillis/local -DCMAKE_INSTALL_PREFIX=/home/gmims/twillis/local -DLIB_EXTRA_SYNTHESIS=gfortran -DBUILD_ALL=1 -DCFITSIO_INCLUDE_DIR=/usr/include/cfitsio
