Help:Doc CCA Install Ubuntu
Installing CCA Tools on Ubuntu
The CCA tools have been successfully built and installed on Ubuntu 7 and 8. Below are additional instructions for installing on Ubuntu 8 (the steps for Ubuntu 7 will be similar).
Before starting, please read over the generic install instructions.
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/libxml2.py and packages/ccafe_gui.py 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 libxml2.py: <geshi lang=python> libxml2_version = "2.6.32" </geshi> In ccafe_gui.py: <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.
- Do this to make /bin/sh be bash
- ( cd /bin && tar cvf ~/sh.tar sh ) && sudo cp /bin/bash /bin/sh
- Install the CCA tools here
- 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
- Put the installation directory in your PATH so that
- libxml2-config can be found
- Configure the installation
./contract.py --configure \
prefix=$PREFIX \ python=$PYTHON \ java=$JAVA \ cc=$CC \ cxx=$CXX \ f77=$F77 \ f90=$F90
- Run contractor
- Do this to return /bin/sh back to how it was
- sudo rm /bin/sh && ( cd /bin && sudo tar xvf ~/sh.tar )