CASA in very easy to build. One basically needs to do the following:
make -j 100
make -j 100
The above has assumed that the CASA source code and data has been installed in directory <casasrc>
svn co https://svn.cv.nrao.edu/svn/casa/active/casacore casacore
svn co https://svn.cv.nrao.edu/svn/casa/active/code code
svn co https://svn.cv.nrao.edu/svn/casa/active/asap asap
svn co https://svn.cv.nrao.edu/svn/casa/active/aatm aatm
svn co https://svn.cv.nrao.edu/svn/casa-data/distro data
Everything should work out-of-box if one has working compilers gcc and gfortran and is on a supported platform. That means, one has either
- /usr/lib/casapy rpms installed on 32b Linux el5 i386, or
- /usr/lib64/casapy rpms installed on 64b Linux el5 x86_64, or
- /opt/casa/darwin10-64b dmg installed on a mac that can run 64b.
If no proper third party packages are available for the platform (only linux or unix type), the make procedure will fail at the 'cmake ..' stage. In such case, one has to install the required binary package or build the package from source and install it. Then one need to let the cmake know where the package is. For example, if one installs cfitsio at /usr/local/cfitsio, then one can run cmake by
cmake -DCFITSIO_ROOT_DIR=/usr/local/cfitsio ..
If one has many packages that are not at the standard locations, the cmake commandline can become very long, that is not very convenient. One way of avoiding long cmake commandline is to set these in the /casacore/cmake/UsePrivatePath.cmake or /code/install/UsePrivatePath.cmake. For example,
set (CFITSIO_ROOT_DIR /usr/local/cfitsio)
Here is the step-by-step instructions for building every casa dependency package. Normally, after a package is installed, its bin directory should be added to PATH, its lib directory should be added to LD_LIBRATY_PATH or DYLD_LIBRARY_PATH, and its include directory should be added to the compilation flag.
-- HonglinYe - 2011-07-07