Appendix C. Building the Tutorial Code Tree

$Revision: 1.1 $

$Date: 2007/08/22 22:40:47 $

The file tutorial-src-version.tar.gz at http://www.cca-forum.org/tutorials/#sources has the full code for all of the components created in this Guide as well as a number of others. These components are used in Chapter 2, Assembling and Running a CCA Application (once the they are built) to give you some experience working with existing components. In later chapters, the code itself can serve as a model and a reference for the components you're writing.

[Note] Note

At the time this particular version of the Hands-On Guide was generated, the version was 0.5.1_rc1. If there's a more recent version available, you should probably use it, but you should also look for a more current version of this Guide to go with it. Both should have the same base version number (i.e. 0.5.1) perhaps with different release numbers. Take the highest available release number. Note too that because both the CCA tools and the tutorial code are evolving over time, you should make sure to use the version of the CCA tools distribution that is recommended for the particular tutorial version you're working with.

If you're participating in an organized tutorial, we will have built the tutorial-src tree for you in advance in a common location, whereas if you're working through these exercises on your own, you'll need to build it yourself.

[Tip] Tip

Make sure you've setup your login environment per Section B.3, “Setting Up Your Login Environment”. To complete the procedures in this section, you will need to have Babel and Ccaffeine in your execution path, and your LD_LIBRARY_PATH.

  1. Download the file you need from the location above.

  2. Untar the file in a convenient place with tar zxf tutorial-src-version.tar.gz. When it completes, change directories into the new code tree.

  3. Run ./configure to configure the tree for the build location.

  4. Once the tree is configured, type make to build it. This step may take several minutes. At the end of the build output, you should see a list of components that were successfully built, such as:

    SUCCESS building drivers.PYDriver
    

    and when it finally completes, you should see this message:

    ################ Finished building everything #################
    ####### You can run some simple tests with 'make check' #######
    

    If the build terminates with an error message instead, please ask for assistance.

  5. Once the build is complete, you can type make check to perform a basic check that the component have been built correctly. This is a convenience of the Makefile system generated by bocca that tries to instantiate each component within the Ccaffeine framework. This provides a basic check that the software you've built are “well-formed” CCA components. You should see a message like this, along with a couple of lines of output from make itself:

     
    ### Test library load and instantiation for the following languages: c cxx f90 f77 python
    Running instantiation tests only
    Test script: tutorial-src/components/tests/test_rc
    ==> Instantiation tests passed for all built components (see tutorial-src/components/tests/test_rc.log).
    make[1]: Leaving directory `tutorial-src/components'