Building and Installing TAO

If you can help port TAO to other platforms we'd appreciate it.

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

WARNING: For users who have used ACE with other ORBs, linking TAO with a version of ACE that is also linked against another ORB vendor's library, e.g., liborbix.so, will produce undefined and most likely unpredictable and erroneous results.


On UNIX platforms

  1. Set ACE_ROOT environment variable as outlined in the ACE installation notes.

  2. Build and install ACE under $ACE_ROOT.

  3. Set TAO_ROOT environment variable to $ACE_ROOT/TAO.

  4. Build and install the TAO release under $TAO_ROOT.

  5. Change directory to $TAO_ROOT/tests and execute make.

  6. Follow instructions on executing the various examples under $TAO_ROOT/tests.

A Note On Make

Since TAO is built atop ACE, TAO re-uses ACE's Makefile structure as well. Thus, just like ACE requires GNU Make, so too does TAO. More exactly, versions of make which are known to not work include those from Solaris 4.x and 5.x, HP-UX, the latest BSD, etc.

GNU Make can be obtained from various places in source form.


For Cross-Compiled Targets, such as VxWorks and LynxOS

If you are building TAO for a VxWorks target, please see the detailed instructions for building and installing ACE and TAO in $ACE_ROOT/ACE-INSTALL.html.

Cross-compiling TAO is not much different than building it for self-host. The one major difference is that TAO's IDL compiler must be built and run on the host; it's not necessary to run it on the target. It's easiest to set this up by using a symlink (Unix) or copy of tao_idl (NT). By way of example, here is how I setup my Unix (SunOS5, using g++) workspace to support cross-compilation (for VxWorks). It assumes that the ACE+TAO distribution has been unpacked, with TAO below ACE_wrappers. It uses the ACE_wrappers/bin/create_ace_build script to create a shadow build tree:

  1. cd ACE_wrappers
  2. bin/create_ace_build SunOS5_g++
  3. bin/create_ace_build vxworks
  4. cd build/vxworks/TAO
  5. /bin/rm -r TAO_IDL
  6. ln -s ../../SunOS5_g++/TAO/TAO_IDL

To build, first on the host, then on the target:

  1. cd build/SunOS5_g++
  2. export ACE_ROOT=`pwd`; export LD_LIBRARY_PATH=`pwd`/ace:$LD_LIBRARY_PATH
  3. (cd ace; make && cd ../tests; make && cd ../TAO; make) > make.log 2>&1
  4. cd ../vxworks
  5. export ACE_ROOT=`pwd`
  6. (cd ace; make && cd ../tests; make && cd ../TAO; make) > make.log 2>&1

For NT host, please see the detailed instructions for building and installing ACE and TAO in ../ACE-INSTALL.html.

Please note that dynamic loading of libraries is not supported by TAO for any cross-compiled target. Therefore, dynamic service configuration of the TAO ORB is not supported.

If using perfect hashing, TAO_IDL needs gperf to be built on the host. That's the default on many platforms. First, build gperf in the ACE_wrappers/apps/gperf/src/ directory. Then, add a symlink or copy to the bin/ directory for the target.


On Windows NT

TAO_IDL on NT will look for the Microsoft Visual C++ compiler as "C:\Program Files\DevStudio\VC\bin\CL.EXE". If this compiler is located elsewhere (or if using a different compiler) add a variable CPP_LOCATION to your environment and set it to the compiler you want to use. This variable will override the default.

Remember to set up ACE before building TAO.

Visual C++ 5.0

It works best if TAO is placed in ACE_wrappers so TAO ends up in ACE_wrappers\TAO because the Visual C++ 5 Project files are set up to work in this configuration. If you move it, then make sure you change the project files to look for the include and library files in the correct place.

  1. Make sure ACE is built (For Visual C++ 5.0, use ace.dsw or ace-vc50.dsw, whichever is in your copy of ACE).

  2. First make sure ACE_wrappers\bin is listed in the Executable Directories in Tools|Options. This is needed if using the TAO_IDL compiler under MSVC. If you intend to also use the release version of the libraries, also add ACE_wrappers\bin\Release to the directories. Note: The order that these are listed is important. If your main development is with the debug versions, make sure \bin is before \bin\Release, otherwise put the \bin\Release first. Because the output names for the release and debug versions of TAO_IDL are the same, extra care must be taken when both versions are generated simulataneously.

  3. Load the workspace tao\TAO.dsw and build the TAO library.

  4. To build the Cubit test, load the workspace tests\Cubit\TAO\IDL_Cubit\IDL_Cubit.dsw and build both client and server.

TAOACE.dsw

TAOACE.dsw is a Visual C++ 5 workspace that loads the projects ACE, TAO, TAO_IDL (the compiler), orbsvcs, gperf and the Naming Service. The dependencies are set up to correctly between the projects so for example, ACE will be built automatically when TAO is built. An easy way to compile everything is to just compile the debug or release version of the Naming Service.

Visual C++ 4.x

  1. In Tools|Options, go to the Directories page and make sure that include files paths includes ACE_wrappers\ and the root directory of TAO (which can be ACE_wrappers\TAO if installed there). The library files paths should include ACE_wrappers\ace.

  2. Load the project file tao\TAO.mdp and build the TAO library.

  3. To build the Cubit test, load the project file tests\Cubit\TAO\test.mdp and build both client and server.

Changing Include Paths

If you prefer #include <corba.h> over #include <tao/corba.h> then you will need to change your Project Settings to also contain the TAO/tao directory. You'll find this in the C/C++ settings under Input.

Creating Static Libraries (*.lib)

TAO, orbsvcs, TAO_IDL, and the Simple Test all have extra project files for static library builds. TAOACE_static.dsw contains all these projects, and is set up much like TAOACE.dsw. To use the static libraries in a project, make sure to the following settings are used in the Project Settings.


How to add IDL files into your Visual C++ projects

Point of contact: Nanbor Wang.

Each IDL file generates .h, .i and .cpp files. Here is an example of adding an IDL file named foobar.idl into a VC project.

  1. Create/open the workspace. Create server project and client project if you haven't had them ready. Add the IDL file <foobar.idl> and other non-IDL generated files into both client and server projects.
  2. Added foobarC.h, foobarC.i, foobarC.cpp, foobarS.h, foobarS.i, and foobarS.cpp into both server and client projects.
  3. Now open the project setting window (Project -> Setting... or just press Alt-F7.) Select the IDL files in both client and server projects. Choose to set the setting for "All Configuration." Make sure the "Always use custom build step" is checked and "Exclude from build" is unchecked.
  4. Click on the "Custom Build" tab. Add this entry as the build command for IDL files:

    tao_idl $(InputName).idl
    Notice that your absolute path to TAO_IDL may vary.
  5. Now add the following entries as "Output file(s)."

          $(InputName)S.h
          $(InputName)C.h
          $(InputName)C.i
          $(InputName)C.cpp
          $(InputName)S.i
          $(InputName)S.cpp
          $(InputName)S_T.h
          $(InputName)S_T.i
          $(InputName)S_T.cpp
          
    Add only one entry in each line.
  6. You might also want to add the TAO_IDL compiler in as a dependency here if you update TAO often. That way, if the compiler is changed, the IDL files are recompiled automatically in the next build.
  7. We are all set. Click OK.
  8. Add foobarC.cpp and foobarS.cpp to both the client and server project.

Notice that these procedures only setup the IDL compiler to perform correctly.

P.S. If anyone knows how to set a default setting in VC so we don't need to perform these procedures every time a new project gets set up, please let us know. Thanks.


Perl Scripts

Several of TAO's tests and examples contain perl scripts that automate the execution of these tests. The scripts are found as "run_test.pl" in the directory of the test.

The versions of perl that we use are 5.005_02 on NT and 5.003 on Solaris. The scripts may work on earlier versions of perl, but we cannot say for sure that they do.


Back to the TAO home page.