How To Install CCA: Difference between revisions

From CSDMS
(Move OS specific instructions to separate pages)
(Pare down CCA install instructions)
Line 5: Line 5:
* [http://www.cca-forum.org/download/cca-tools/nightly/cca-tools-contractor.tar.gz Download the CCA tools installer]
* [http://www.cca-forum.org/download/cca-tools/nightly/cca-tools-contractor.tar.gz Download the CCA tools installer]


 
=== System and Software Requirements ===
==== System and Software Requirements ====


'''Supported Operating Systems''':
'''Supported Operating Systems''':
* OS X v10.5.x
* [[How_To_Install_CCA_Mac | OS X v10.5.x]]
* Fedora 8 and 9
* [[How_To_Install_CCA_Fedora | Fedora 8 and 9]]
* Ubuntu 7 and 8
* [[How_To_Install_CCA_Ubuntu | Ubuntu 7 and 8]]
* Solaris 5.8
* [[How_To_Install_CCA_Solaris | Solaris 5.8]]
This most likely is not an exclusive list.  The CCA tools have been successfully installed on each of the these operating systems.  Really, most any flavor of Unix ''should'' work.
This most likely is not an exclusive list.  The CCA tools have been successfully installed on each of the these operating systems.  Really, most any flavor of Unix ''should'' work.  If you are installing on one of these operating systems, please read the OS-specific instructions by following the above links.  If you are installing on another OS, please pass along any information about problems/successes to [mailto:huttone@colorado.edu me] or create a new wiki page to help others with their install.


'''Required software''':
'''Required software''':
Line 23: Line 22:
Note that you can do without Fortran or Python but if they are excluded, babel will not be able to build bindings for those languages.
Note that you can do without Fortran or Python but if they are excluded, babel will not be able to build bindings for those languages.


===== Check compiler versions =====
=== Configure ===
 
You can determine the version of your GNU compilers with the following command:
<geshi lang=bash>
$ gcc --version | head -n 1
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5488)
</geshi>
Your output may look slightly different but should be similar to the above.  Similarly, to get your java and python versions type:
<geshi lang=bash>
$ java -version | head -n 1
java version "1.5.0_16"
$ python --version
Python 2.5.1
</geshi>
Check if you have numpy installed,
<geshi lang=bash>
$ python -c "import numpy"
</geshi>
If nothing is printed to the screen, numpy is installed (replace numpy with Numeric if that is what you are using instead).
 
=== OS Specific Instructions ===
 
If you are installing on one of the following operating systems, please read the OS-specific instructions.
* [[How_To_Install_CCA_Mac | OS X v10.5.x]]
* [[How_To_Install_CCA_Fedora | Fedora 8 and 9]]
* [[How_To_Install_CCA_Ubuntu | Ubuntu 7 and 8]]
* [[How_To_Install_CCA_Solaris | Solaris 5.8]]
If you are installing on another OS, please pass along any information about problems/successes to [mailto:huttone@colorado.edu me] or create a new wiki page to help others with their install.
 
==== Configure ====


Unpack the installer,
Unpack the installer,
Line 80: Line 50:
You are now ready to build and install the CCA tools.
You are now ready to build and install the CCA tools.


==== Build/Install ====
=== Build/Install ===


If everything has been configured properly, the build should be easy (just a little time consuming).  Before going further, make sure that your install directory exists and that you can write to it.  To build and install the CCA tools,
If everything has been configured properly, the build should be easy (just a little time consuming).  Before going further, make sure that your install directory exists and that you can write to it.  To build and install the CCA tools,
Line 105: Line 75:
This prints a list of all supported language bindings.  If you don't see all of the languages you expect, please have a look at the troubleshooting section.
This prints a list of all supported language bindings.  If you don't see all of the languages you expect, please have a look at the troubleshooting section.


If you successfully build CCA on your machine, please add it to the [[How_To_Install_CCA#Successful_CCA_Builds | list of successful build platforms]] (if it's not already there).  If you are unsuccessful, please submit it as an issue to [mailto:huttone@colorado.edu me].
If you successfully build CCA on your machine, please add it to the [[How_To_Install_CCA#_Success | list of successful build platforms]] (if it's not already there).  If you are unsuccessful, please submit it as an issue to [mailto:huttone@colorado.edu me].
 
 
 
=== Troubleshooting ===
 
From my experience, most CCA build problems arise from the assumption that `/bin/sh` is GNU bash (version 3 or greater).  Make sure that this is the case for you by running the following command
<geshi lang=bash>
/bin/sh --version
</geshi>
This should print something like,
<geshi lang=bash>
GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0)
Copyright (C) 2005 Free Software Foundation, Inc.
</geshi>
If you get an error message, or a version lesser than 3, you'll probably have build problems.  The easiest solution is to link `/bin/sh` to an up-to-date version of bash.  If this is not possible, you can run a `sed` script to replace all occurrences of `/bin/sh` in the source files with the correct bash version.  Although not the most elegant solution, it's worked for me.
 
 
 
'''Problem''': Can't find libpython2.5 during babel make.
 
'''Solution''':  libpython2.5 probably isn't in a usual place.  On my machine it is found in `/usr/local/python/lib`.  You can tell the compiler where to look by defining the environment variable LDFLAGS,
<geshi lang=bash>
export LDFLAGS="-L/path/to/python/library:$LDFLAGS"
</geshi>
 
 
'''Problem''': Can't find `tclsh` during ccaffeine build.
 
'''Solution''':  First, make sure tcl is installed on you machine.  If not, install it.  If it is, make sure that tclsh is in you path.  On my machine it's located in `/usr/local/tcl-tk/bin`,
<geshi lang=bash>
export PATH=/usr/local/tcl-tk/bin:$PATH
</geshi>
 
=== Successful CCA Builds ===
 
CCA Tools Contractor Build version 0.2.2
 
{| border=1 cellspacing=0 cellpadding=5
! Operating System
! colspan=6 | Compiler (version)
|-
!
! c
! c++
! Python
! Java
! Fortran 77
! Fortran 90
|-
| OS X 10.5.x
| gcc (4.0.1)
| g++ (4.0.1)
| python (2.5.1)
| java (1.5)
| gfortran (4.1.2)
| gfortran (4.1.2)
|-
| OS X 10.5.x
| gcc (4.0.1)
| g++ (4.0.1)
| python (2.5.1)
| java (1.5)
| gfortran (4.2.1)
| gfortran (4.2.1)
|-
| Fedora 8
| gcc (4.1.2)
| g++ (4.1.2)
| python (2.5.1)
| java (1.6)
| gfortran (4.2.2)
| gfortran (4.2.2)
|-
| Ubuntu 7.10
| gcc (4.1.3)
| g++ (4.1.3)
| python (2.5.1)
| java (1.6)
| gfortran (4.1.3)
| gfortran (4.1.3)
|-
| Solaris 5.8
| gcc (4.1.2)
| g++ (4.1.2)
| python (2.5)
| java (1.6)
| gfortran (4.1.2)
| gfortran (4.1.2)
|-|}

Revision as of 18:15, 11 November 2008

Installing the CCA Tools

This page describes how to install the collection of Common Component Architecture tools. If you haven't downloaded the installer, you can use the link below to get started. After doing so, please read the rest of the document to learn how to build, and install the complete CCA tools package.

System and Software Requirements

Supported Operating Systems:

This most likely is not an exclusive list. The CCA tools have been successfully installed on each of the these operating systems. Really, most any flavor of Unix should work. If you are installing on one of these operating systems, please read the OS-specific instructions by following the above links. If you are installing on another OS, please pass along any information about problems/successes to me or create a new wiki page to help others with their install.

Required software:

  • GNU compilers: gcc, g++, and gfortran (>4.0, but less than 4.3)
  • Java (1.5)
  • Python (>2.3) with either Numeric 24.2 or numpy
  • Bourne shell
  • tclsh

Note that you can do without Fortran or Python but if they are excluded, babel will not be able to build bindings for those languages.

Configure

Unpack the installer, <geshi lang=bash> > tar xvfz cca-tools-contractor.tar.gz </geshi> This creates the directory `cca-tools-contractor` that contains the necessary installer, called contractor.

Move into the `cca-tools-contractor` directory to configure the build system. This is done by running `./contract.py` with the appropriate flags that specify the location of your various compilers and the final installation directory. For a generic configuration, something like the following command should work. <geshi lang=bash> > ./contract.py --configure

               prefix=/usr/local/cca
               python=/usr/bin/python
               java=/usr/bin/java 
               cc=/usr/bin/gcc-4.0
               cxx=/usr/bin/g++-4.0 
               f77=/usr/local/gnu/bin/gfortran
               f90=/usr/local/gnu/bin/gfortran

</geshi> This specifies where to install CCA on your machine (/usr/local/cca, in this example), and the location of various compilers. Note that your compilers may be in different locations. If this does not work exactly as presented for your particular machine, please refer to the specific OS notes that follow.

For help on the various options of contractor type, <geshi lang=bash> > ./contract.py --help </geshi>

You are now ready to build and install the CCA tools.

Build/Install

If everything has been configured properly, the build should be easy (just a little time consuming). Before going further, make sure that your install directory exists and that you can write to it. To build and install the CCA tools, <geshi lang=bash> > ./contract.py </geshi>

This will download, build, and install the required packages. Installed packages include,

After the installation process is complete, it's a good idea to double-check that babel has been compiled to generate the bindings you want it to. Sometimes the babel configure process will silently disable certain bindings. Use the babel-config command (located in the bin directory under your install location) to check this: <geshi lang=bash> > babel-config --with-bindings c c++ f77 f90 java python </geshi> This prints a list of all supported language bindings. If you don't see all of the languages you expect, please have a look at the troubleshooting section.

If you successfully build CCA on your machine, please add it to the list of successful build platforms (if it's not already there). If you are unsuccessful, please submit it as an issue to me.