### Building and Installing CIAO

The first thing you should do to install CIAO is to set the environment variable `CIAO_ROOT` to be `$TAO_ROOT/CIAO`, or whereever you have installed the CIAO sources. The `DANCE_ROOT` environment variable should also be set to `$CIAO_ROOT/DAnCE`, or wherever you have installed the DAnCE sources. Please refer to the ACE installation notes and TAO installation notes for instructions on setting `$ACE_ROOT` and `$TAO_ROOT`, respectively. They are needed since CIAO sits on top of ACE+TAO. Compiling ACE+TAO successfully is the first requirement for compiling CIAO.

CIAO is divided into several parts, so different installation/building rules apply to different parts of CIAO.

1. CIAO core/examples: This part of CIAO include following directories: `$CIAO_ROOT/ciao`, `$CIAO_ROOT/examples`.
2. CIDL Compiler: This part of CIAO include `$CIAO_ROOT/CCF` and `$CIAO_ROOT/CIDLC`.
3. CIAO Deployment and Configuration Framework: This part of CIAO includes all the directories in `$CIAO_ROOT/DAnCE`. DAnCE is an implementation of the new Deployment and Configuration specification. We refer, henceforth, to all pieces as CIAO in general. The above two pieces will be referred specifically by their names as CIDLC and DAnCE though they are part of CIAO.

### Supported Platforms for CIAO

CIAO should be usable on all platforms that TAO runs on. Please see TAO's installation pages for details

### Supported Platforms for CIDLC

CIDLC is supported only on a small subset of platforms. Please refer to this for details on how to build CIDLC.

For Building CIAO CIDLC Compiler

Fully supported, i.e., continually tested and used daily | Windows 2000/XP (VC 7.1), Linux(GCC 3.2 or higher)
Binaries available intermittently, no automatic builds or tests | MacOS, Solaris

If you have porting questions or have a problem compiling CIAO with TAO and ACE on the platforms shown above please send email to either ACE Newsgroup or the CIAO mailing list and we'll try to help you fix the problems. You can also submit bug reports and enhancement requests in our bug tracking system.

CIAO can be obtained electronically via the WWW and ftp. CIAO is bundled with the ACE and TAO release. You'll always need the most recent version of ACE and TAO because CIAO tracks changes to ACE and TAO very closely.

### Install CIDL Compiler

We suggest you download the prebuilt binary `cidlc(.exe)` from here or, if you are using Windows or Linux, you can build it by yourself.

MPC is used to build the CIDL compiler on Linux. The procedure is outlined below.

- Open up `$ACE_ROOT/bin/MakeProjectCreator/config/default.features` and set `cidl=1` and `boost=1`, each on its own line.
- Make sure you set cidl=1, boost=1, and exceptions=1 in `$ACE_ROOT/include/makeinclude/platfrom_macros.GNU`.
- Install `boost_filesystem`, `boost_regex` and `Utility Library`. For how to do that please see Build.html.
- In `$CIAO_ROOT/CIDLC` run `$ACE_ROOT/bin/mwc.pl CIDLC.mwc -type gnuace`
- In `$CIAO_ROOT/CIDLC` run `make`.
  Note: The linking time is a bit long (more than 5 Minutes with an Intel XEON 1.90GHZ CPU, please be patient).

MPC is used to build the CIDL compiler on Windows. The procedure is outlined below.

- If you have not created it already, create the file `%ACE_ROOT%/bin/MakeProjectCreator/config/default.features` and add `cidl=1` and `boost=1` to it, each on its own line.
- Install the Boost libraries on your machine. For Windows, you can download either the Windows-specific .exe file or the platform-independent .zip file. Use version 1.32.0 or later. The accompanying documentation on how to build and install Boost is pretty straightforward. Another option is to use the intsaller from BoostPro Computing. Install the latest boost version and select the Multi Threaded Static version, also make sure you select FileSystem, Regex and System.
- Set the following environment variables:
  - `ACE_ROOT` - [path ending with ACE_wrappers directory] (this should already be set if you're using CIAO) `BOOST_ROOT` - [path ending with Boost directory]
  - `BOOST_VERSION` - [name of the directory under `%BOOST_ROOT%\include`, for ex. `boost-1_32`, for Boost version 1.32.0]
- In `%CIAO_ROOT%\CIDLC` run `%ACE_ROOT%\bin\mwc.pl -type vc71 CIDLC.mwc`
- Open `CIDLC.sln` and build as usual. Within the solution, the CIDLC project is the top-level one, which depends on all the other projects, and produces `cidlc.exe` in `%CIAO_ROOT%\bin`.

### Obtaining and Installing Xerces-C

The Xerces-C XML parsing library is a necessary component to build parts of DAnCE that need to process XML based descriptor files, which include the Plan Launcher and the Repository Manager. Currently, the only Xerces-C versions supported by the DOC group is version 2.6 or later or 3.0 or later. Earlier versions of the Xerces-C library may work.

#### Building Xerces-C

You may check here to see if there is a prebuilt binary available for your platform. Otherwise, you will have to obtain the source from the Xerces-C webpage and build it. Building Xerces-C is fairly straightfoward. Please see the documentation available here for instructions particular to your platform.

- NOTE: Some of the provided projects with Xerces-C attach inconsistant library decorators onto the end of the Xerces-C libraries. The MPC build tool will expect these libraries to be named xerces-c for non debug versions, and xerces-cd for debug versions.

#### Xerces-C Environment Settings

If the Xerces includes and libraries are in your system include and library paths, respectively, then you need not set up any environment and may proceed to the next step. If not, you will need to set an environment variable named XERCESCROOT to a path such that $XERCESCROOT/include points to the includes and $XERCESCROOT/lib points to the libraries. Also make sure that $XERCESCROOT/lib is in the appropriate environment variable that your platform uses to search for dynamically linked libraries.

### Install CIAO core/tools/examples

Most of the GNUmakefiles/project files/solution files required to build CIAO are available in the release. If you don't like the configurations used, please feel free to regenerate them using MPC. Please see this for more details.

To build CIAO core/tools/examples:

1. Make sure ACE and TAO are built.
2. Make sure you have the Xerces-C libraries installed/built
3. Enable Xerces-C in default.features by setting `xerces3=1` or `xerces2=1`, depending on your version Xerces-C libraries.
4. Make sure all ACE/TAO/etc. generated libs are in `$ACE_ROOT/lib`. To build CIAO you will need:
   - `ACE`
   - `TAO`
   - `TAO_IDL`
   - `IFR_Client`
   - `IORTable`
   - `Valuetype`
   - `Security`
   - `ACEXML`
5. Make sure you have cidlc or cidlc.exe in `$CIAO_ROOT\bin` with the right permission setting (executable).
6. Generate the Makefile/Solution/Project files and build

   For the supported build tools please see MPC manual.

   You have to execute the MPC command in the following directories if you only want to build the examples and have a peek at CIAO:

   - `$CIAO_ROOT/DAnCE/`

   On Linux: do `$ACE_ROOT/bin/mwc.pl -type gnuace` at the locations specified above then `make`.

   On Windows/VC71: do `%ACE_ROOT%/bin/mwc.pl -type vc71` at the locations specified above then Open the solution file and build.

   Note: You can run `mwc.pl` at `$CIAO_ROOT` as long as you don't intend to build CIDL compiler with MPC. If this is the case(default), you can run the mwc.pl command with proper augment once then you can do `make` at `$CIAO_ROOT` (Linux) or open the workspace/solution file at `$CIAO_ROOT` (Windows) to build.

Building CIAO quickly : You can build CIAO quickly by doing the following:

- Remove all the GNUmakefiles or project files that are shipped with the release.
- Open up `$CIAO_ROOT/CIAO_TAO.mwc` .
- Run `$ACE_ROOT/bin/mwc.pl CIAO_TAO.mwc -type gnuace` from `$CIAO_ROOT` .
- Type 'make'
- This will build all the required ACE+TAO libraries including CIAO libraries and tools.

Back to the CIAO home page.