THIS is old now.

GO here for latest instructions

This is what worked on RHEL 6 on NRAO's Socorro machines.

You may want to look at Scott's notes for more comprehensive info about building from source

Below is the religious version...don't question have faith


### I use tcsh ...if you use bash replace the "setenv a b" with "export a=b"

mkdir casabuild
cd casabuild

#####You have to check out the basic data repository...
####see https://safe.nrao.edu/wiki/bin/view/Software/ObtainingCasaDataRepository

####usually something like this should suffice
svn co https://svn.cv.nrao.edu/svn/casa-data/distro data
##

###As i am lazy i'll just link the data repository that came with a tarball binary distribution
###which you could too ...no need to have multiple copies of this.
#ln -s /home/casapy-test-31.0.13058-001-64b/data
#Or in Socorro
#ln -s /home/casa/data/trunk ./data

setenv CASAROOT `pwd`

setenv ARCH linux_64b

mkdir $CASAROOT/$ARCH

mkdir $CASAROOT/$ARCH/include

ln -s $CASAROOT/$ARCH/include $CASAROOT/include

svn co https://github.com/casacore/casacore/trunk casacore

svn co https://svn.cv.nrao.edu/svn/casa/trunk/code

svn co https://svn.cv.nrao.edu/svn/casa/trunk/gcwrap

svn co http://svn.atnf.csiro.au/asap/trunk asap

####important
#put the right compiler (and related libraries) at the top of the totem pole (which is gcc 4.9)
#In bash do this
source /opt/rh/devtoolset-3/enable
#otherwise if using csh...then this
bash -c 'source /opt/rh/devtoolset-3/enable; exec csh'

####

mkdir casacore/build

cd casacore/build

####Add the option "-DCMAKE_BUILD_TYPE=Debug" to the cmake line below if you want to have a debug build

cmake -DCASA_BUILD=1 -DCMAKE_INSTALL_PREFIX=$CASAROOT/$ARCH ..

###NOTE you have to use "install" for casacore
#### if you have 8 cores available for build then use make as follows

make -j 8 install

cd $CASAROOT

mkdir code/build

cd code/build

####Add the option "-DCMAKE_BUILD_TYPE=Debug" to the line below if you want to have a debug build or RelWithDebInfo for a mix

cmake -DBoost_NO_BOOST_CMAKE=1 -DCXX11=1 ..

### boost shenanigans has to be done or it complains version not being correct
###if you want to build with 03 then add -DCMAKE_BUILD_TYPE=Release
### too add extra compile flags use -DCMAKE_CXX_FLAGS, make sure to include the default flags too as this overrides them
#cmake -DBoost_NO_BOOST_CMAKE=1 -DCMAKE_CXX_FLAGS='-O3 -fcx-fortran-rules -pipe -Wall -Wextra -Wno-non-template-friend -Wcast-align -Wno-comment -fopenmp -Wno-deprecated'

make -j 8

cd $CASAROOT

mkdir asap/build

cd asap/build

### add "-DCMAKE_BUILD_TYPE=Debug" if you want a debug build

cmake -Darch=$ARCH -DCMAKE_INSTALL_PREFIX=$CASAROOT/$ARCH -DBoost_NO_BOOST_CMAKE=1 -DCXX11=1 ..


make -j 8


cd $CASAROOT

mkdir gcwrap/build

cd gcwrap/build

####Add the option "-DCMAKE_BUILD_TYPE=Debug" to the line below if you want to have a debug build
#### note the extra swig force path as it can pick the wrong version of swig first and complain
### along with boost shenanigan on RHEL6
cmake -DBoost_NO_BOOST_CMAKE=1 -DSWIG_EXECUTABLE=/usr/lib64/casa/01/bin/swig -DCMAKE_INSTALL_PREFIX=$CASAROOT/$ARCH -DCXX11=1 ..

make -j 8


This is what worked on RHEL 6 on NRAO's Socorro machines.

You may want to look at Scott's notes for more comprehensive info about building from source

Below is the religious version...don't question have faith

### I use tcsh ...if you use bash replace the "setenv a  b" with "export a=b" 

mkdir casabuild
cd casabuild

#####You have to check out the basic data repository...
####see  https://safe.nrao.edu/wiki/bin/view/Software/ObtainingCasaDataRepository

####usually something  like this should suffice 
svn co https://svn.cv.nrao.edu/svn/casa-data/distro data
## 

###As i am lazy i'll just link the data repository that came with a tarball binary distribution 
###which you could too ...no need to have multiple copies of this. 
#ln -s /home/casapy-test-31.0.13058-001-64b/data
#Or in Socorro
#ln -s /home/casa/data/trunk ./data

setenv CASAROOT `pwd`

setenv ARCH linux_64b

mkdir $CASAROOT/$ARCH

mkdir $CASAROOT/$ARCH/include

ln -s $CASAROOT/$ARCH/include $CASAROOT/include  

svn co https://github.com/casacore/casacore/trunk casacore

svn co https://svn.cv.nrao.edu/svn/casa/trunk/code 

svn co https://svn.cv.nrao.edu/svn/casa/trunk/gcwrap

svn co http://svn.atnf.csiro.au/asap/trunk asap

####important
#put the right compiler (and related libraries) at the top of the totem pole (which is gcc 4.9)
#In bash do this
source /opt/rh/devtoolset-3/enable
#otherwise if using  csh...then this
bash -c 'source /opt/rh/devtoolset-3/enable; exec csh'

#### 

mkdir casacore/build

cd casacore/build

####Add the option "-DCMAKE_BUILD_TYPE=Debug" to the cmake  line below if you want to have a debug build

cmake -DCASA_BUILD=1 -DCMAKE_INSTALL_PREFIX=$CASAROOT/$ARCH ..

###NOTE you have to use "install" for casacore
#### if you have 8 cores available for build then use make as follows

make -j 8 install

cd $CASAROOT

mkdir code/build

cd code/build

####Add the option "-DCMAKE_BUILD_TYPE=Debug" to the line below if you want to have a debug build or RelWithDebInfo for a mix

cmake  -DBoost_NO_BOOST_CMAKE=1 -DCXX11=1 ..

### boost shenanigans has to be done or it complains version not being correct
###if you want to build with 03 then add -DCMAKE_BUILD_TYPE=Release
### too add extra compile flags use -DCMAKE_CXX_FLAGS, make sure to include the default flags too as this overrides them
#cmake -DBoost_NO_BOOST_CMAKE=1 -DCMAKE_CXX_FLAGS='-O3 -fcx-fortran-rules -pipe -Wall -Wextra -Wno-non-template-friend -Wcast-align -Wno-comment -fopenmp -Wno-deprecated'
make -j 8

cd $CASAROOT

mkdir asap/build

cd asap/build

### add "-DCMAKE_BUILD_TYPE=Debug" if you want a debug build

cmake -Darch=$ARCH -DCMAKE_INSTALL_PREFIX=$CASAROOT/$ARCH  -DBoost_NO_BOOST_CMAKE=1 -DCXX11=1 ..


make -j 8


cd $CASAROOT

mkdir gcwrap/build

cd gcwrap/build

####Add the option "-DCMAKE_BUILD_TYPE=Debug" to the line below if you want to have a debug build 
#### note the extra swig force path as it can pick the wrong version of swig first and complain
### along with boost shenanigan on RHEL6
cmake  -DBoost_NO_BOOST_CMAKE=1 -DSWIG_EXECUTABLE=/usr/lib64/casa/01/bin/swig -DCMAKE_INSTALL_PREFIX=$CASAROOT/$ARCH -DCXX11=1  ..

make -j 8


Topic revision: r54 - 2018-04-19, KumarGolap
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback