How To Install CCA Problems

From CSDMS

Typical Problems installing CCA tools

Not using bash (version 3+)

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.


libpython2.5 not found during babel make

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>


tclsh not found during ccaffeine build

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>


babel build fails with "-Wno-long-double" on Mac

The build process fails when building babel with errors that look like, <geshi> cc1: error: unrecognized command line option "-Wno-long-double" </geshi> Use an older version of gcc. Although this looks as though it is a problem with the c compiler, it is actually a problem with the Python distutils module. distutils adds its own set of compile flags and unfortunately, there is no way to override this. Setting CFLAGS, will only add flags, not replace them. The easiest solution is to use another version of gcc. If you are using version 4.2, try 4.0. You should use whatever version of gcc built the Python you are using. Notice that in my install script I specify /usr/bin/gcc-4.0.


How do I check compiler versions?

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).