How To Install CCA Ubuntu


Ubuntu 8

The biggest problem with installing the CCA tool chain on Ubuntu is that /bin/sh was not bash. To fix this, I copied /bin/bash to /bin/sh. Note that setting the BASH environment variable to /bin/bash helped solve some problems but still was not enough for a successful build as some scripts use /bin/sh rather than $BASH.

<geshi lang=bash> ( cd /bin && tar cvf ~/sh.tar sh ) && sudo cp /bin/bash /bin/sh </geshi>

To undo, <geshi lang=bash> sudo rm /bin/sh && ( cd /bin && sudo tar xvf ~/sh.tar ) </geshi>

The GNU java compiler doesn't seem to work with the CCA tools, so I installed the full sun version. You can find this with the package manager as sun-java6-jdk. You may also need to uninstall the GNU version (gij).

I needed to add the bin directory of the CCA install path to my PATH as well. Because I used an internal installation of libxml2, xml2-config, which is needed by the babel configuration, could not be found.

Finally, I had to edit the python files, packages/ and packages/ to indicate different versions of these packages. libxml2 version 2.6.28, and ccafe_gui version 0.5.7 are no longer available for download. In <geshi lang=python> libxml2_version = "2.6.32" </geshi> In <geshi lang=python> ccafe_gui_default_version = "0.5.6" </geshi>

With these changes, I used the following script to build and install the CCA tools.

<geshi lang=bash>

  1. !/bin/sh
  1. Do this to make /bin/sh be bash
  2. ( cd /bin && tar cvf ~/sh.tar sh ) && sudo cp /bin/bash /bin/sh
  1. Install the CCA tools here


  1. Use these compilers

PYTHON=/usr/bin/python JAVA=/usr/bin/java CC=/usr/bin/gcc CXX=/usr/bin/g++ F77=/usr/bin/gfortran F90=/usr/bin/gfortran

  1. Put the installation directory in your PATH so that
  2. libxml2-config can be found

export PATH=$PREFIX/bin:$PATH

  1. Configure the installation

./ --configure \

             prefix=$PREFIX \
             python=$PYTHON \
             java=$JAVA \
             cc=$CC \
             cxx=$CXX \
             f77=$F77 \
  1. Run contractor


  1. Do this to return /bin/sh back to how it was
  2. sudo rm /bin/sh && ( cd /bin && sudo tar xvf ~/sh.tar )