Document Index

Building and Installing TAO from a distribution

The following table summarizes platforms on which TAO runs, see the ACE installation notes for an overview of all the platforms ACE runs on, these are all candidates to run TAO on:

Fully supported, i.e., continually tested and used daily Solaris 9, Windows (Microsoft Visual C++ 7.1, 9.0, 10.0, 11.0, and 12.0), Linux/Intel (Redhat, Debian, and SuSe), OpenVMS 8.3 IA64, Android
Nearly fully supported, i.e., sometimes tested HP/UX 11.x, LynxOS
Partially supported, i.e., infrequently tested FreeBSD, NetBSD, Windows CE, MacOSX, Linux/Alpha (RedHat, SuSE, and Debian), and AIX 5.x
Planned support, i.e., pending
Support were dropped recently Embarcadero C++ Builder, Sun/C++ 5.1 through 5.4, g++ prior to 2.95.x, HP/UX 10.x, pSoS, Chorus, DEC UNIX, SCO, UnixWare, MVS, Windows 9x/ME, Chorus, Tandem NS,

Any UNIX/POSIX/Win32 variation is a potential target platform for TAO. If you have porting questions or have a problem compiling the TAO along with ACE wrappers on the platforms shown above please send email to either the Newsgroup or to the TAO 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.

TAO can be obtained electronically via the WWW and ftp. TAO is bundled with the ACE release. You'll always need the most recent version of ACE because TAO tracks and influences changes to ACE. Always use the ACE+TAO release bundle as a single piece instead of trying to mix and match things up.


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.

    TAO also uses GNUmakefiles and project files generated from MPC to compile. The full distribution will come with stock GNUmakefiles, project files (for VC9 and VC 10) awhich were all generated by MPC.

    The easiest and recommended way to compile the complete TAO distribution by simply simply executing make in the $TAO_ROOT directory.

    A smaller subset, that may be of interest to test basic TAO functionality, is: $TAO_ROOT/tao, $TAO_ROOT/TAO_IDL, $TAO_ROOT/tests/Param_Test. Then you can execute the run_test.pl script in $TAO_ROOT/tests/Param_Test and/or follow the instructions contained in the README file in the same directory.

    If you wish to compile the ORB services distributed with TAO, including the Naming Service you must include $TAO_ROOT/orbsvcs to the list above. Please see the TAO configuration documentation for a discussion on how to create a subset configuration of specific TAO ORB servcies.

    If you wish to compile all the core tao and orbsvcs, including its dependencies in ACE and ACEXML, you can do the following

    1. Unpack the distribution from DOC group's website.
    2. Set the environment variables $ACE_ROOT and $TAO_ROOT.
    3. Create config.h and platform_macros.GNU at the right places
    4. Delete all the GNUmakefiles (or sln and vproj file as the case may be) from the TAO distrbution using the 'find' command.
    5. Change directory to $TAO_ROOT.
    6. Run MPC like this, $ACE_ROOT/bin/mwc.pl TAO_ACE.mwc -type gnuace
    7. Run 'make'.

    This will create all the required libraries for TAO and TAO orbsvcs. In step 6, use -type vc71 if you want to generate VC71 project and workspace files for Win32. Please see MPC USAGE document for details on how to generate build files for other compilers and tools.

  5. To test that the TAO release is properly configured, follow instructions on executing the various examples under $TAO_ROOT/tests.

Note About g++ On Solaris for x86 Target

If you install g++/gcc from blastwave then this note is applicable for you. If you are in the habit of building g++/gcc from sources directly, please feel free to skip this section.

The distribution from blastwave has, as we believe, a bug in it. This bug manifests as compilation errors when you try to build the orbsvcs when debugging is enabled. Please remember that debugging is enabled in your platform_macros.GNU if you haven't specifically disabled it. The easiest way to address this issue is to set debug=0 in platform_macros.GNu file or build a g++ compiler for your target platform. A bug has been registered with blastwave. If you have more questions please feel to contact Bala Natarajan .

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 and binary form. Please see ACE-INSTALL.html for details from where they can be obtained.


Using cross compilation

With cross compilation you build on the so called host system for a certain target system. The host system can for example be linux and the target can for example be VxWorks, LynxOS, or Linux. 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.

If you are building TAO for an Android target, please see the notes for building and installing ACE and TAO in $ACE_ROOT/ACE-INSTALL.html.

Cross-compiling TAO is not much different than building it for a 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. There are several ways to do this, below we document the two most common approaches:

Modifying the default location for the IDL compiler

By default TAO assumes that the IDL compiler is located in: $ACE_ROOT/bin/tao_idl and that the GPERF tool is located in $ACE_ROOT/bin/gperf, this is fine for hosted builds, but not for cross-compilation. Unfortunately there is no good default for cross-compilation builds because different sites choose a different location for their tools.

The location of the IDL compiler is set when the makefiles (whether GNU, Visual Studio projects, or any other type) are generated using MPC. If you are using GNU make for the target build, you can follow the procedure below with no further steps. If, however, you are using Visual Studio for the target build, you must generate the Visual Studio projects with a specification of where the hosted IDL compiler is. One common way to do this is to use the MPC -value_template option to specify the path to the IDL compiler, either using a fully specified path or an environment variable. For example, to specify the location with the HOST_TAO_IDL environment variable, generate your projects with the MPC command line option -value_template tao_idl=$(HOST_TAO_IDL). Then before running Visual Studio to cross-build for the target, be sure that the HOST_TAO_IDL environment variable is set to the location of the host-built IDL compiler. Note that if the host-built IDL compiler requires a PATH setting different from what's set in the Visual Studio environment, you must set the PATH environment variable and specify the /USEENV option to devenv.

If your builds are using GNU make, you can override the default values by adding several lines to your platform_macros.GNU file. Assuming $(HOST_ROOT) is set to the location of your host build where you previously built gperf and tao_idl, you can change the target build by adding the following lines:

TAO_IDL := $(HOST_ROOT)/bin/tao_idl
TAO_IDLFLAGS += -g $(HOST_ROOT)/bin/gperf
TAO_IDL_DEP := $(HOST_ROOT)/bin/tao_idl$(EXEEXT)

Obviously you must first build the tools for the host platform, typically you would do this as follows:

# (1) Create a clone directory for the host:

$ cd ACE_wrappers
$ mkdir -p build/HOST
$ ./bin/create_ace_build build/HOST

# (2) Configure the host build:

$ echo '#include "ace/config-HOST.h"' > build/HOST/ace/config.h
$ echo 'include $(ACE_ROOT)/include/makeinclude/platform_HOST.GNU' \
     > build/HOST/include/makeinclude/platform_macros.GNU

# Often host builds are static:
$ echo 'static_libs_only=1' \
     >> build/HOST/include/makeinclude/platform_macros.GNU

# (3) Build the host tools

$ cd build/HOST
$ export ACE_ROOT=$PWD
$ make -C ace
$ make -C apps/gperf/src
$ make -C TAO/TAO_IDL

Then configuring the location of the tools for the target could be done as shown here:

# (4) Create a clone directory for the target:

$ cd ACE_wrappers
$ mkdir -p build/TARGET
$ ./bin/create_ace_build build/TARGET

# (5) Configure the target build:

$ echo '#include "ace/config-TARGET.h"' > build/HOST/ace/config.h
$ echo 'include $(ACE_ROOT)/include/makeinclude/platform_TARGET.GNU' \
     > build/TARGET/include/makeinclude/platform_macros.GNU

# (6) Configure the TARGET build to use the HOST IDL compiler and
#     gperf tools, as described above.

Alternative configuration, using links

Some developers prefer to set up the host tools using symbolic links (Unix) or copy of tao_idl (NT). By way of example, here is how you could setup a croos-compilation environment for Unix, the host is SunOS5/g++, the target is 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/bin
  5. /bin/rm -r tao_idl
  6. ln -s ../../SunOS5_g++/bin/tao_idl

To build on the host:

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

For Win32 hosts, please see the detailed instructions for building and installing ACE and TAO in ACE_ROOT/ACE-INSTALL.html, and Building ACE on Tornado/NT hosts for VxWorks targets

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.

Which one is right for me?

Using links to cross-compile TAO may appear simpler at first glance. However, storing the location in the platform_macros.GNU is more amenable for sites where many developers share the same configuration files, or where ACE+TAO are compiled once and used by a medium or large size group.


On Windows NT and Windows 2000 and Windows XP

TAO_IDL does not contain its own preprocessor, so it needs to use an external preprocessor. Depending on which compiler was used to build TAO_IDL, the default preprocessor will change. For example, if compiled with MSVC, TAO_IDL will look for CL.EXE in the path. There are cases where this will not work, such as in cross-compiling or if the preprocessor is not in the path. These situations require that environment variables are set on the machine to override the built-in settings. More information about these environment variables can be found in the TAO_IDL documentation.

It is also mandatory to set the ACE_ROOT environment variable as outlined in the ACE installation notes and the TAO_ROOT environment variable.

Remember to set up ACE before building TAO. Make sure that you first build $TAO_ROOT\TAO_IDL and then $TAO_ROOT\tao because in order to compile the core TAO libraries you need to have TAO_IDL compiled.

Visual C++ 7.1 and newer

It works best if TAO is placed in ACE_wrappers so TAO ends up in ACE_wrappers\TAO because the Visual C++ 7.1 Project files are setup up to work in this configuration. If you move it, then make sure you regenerate the project files to look for the include and library files in the correct place. The default place for placing the library files are $ACE_ROOT/lib. You can change this setting in this base project file.

  1. Make sure ACE is built (For Visual C++ 7.1, use ACE.sln).

  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 in the same workspace you have to be careful, since the executable name for TAO_IDL is same in debug and release builds. You can use only or the oethr in the same workspace. This shouldn't be an issue since the projects for tests and examples are set up to transparently use one or the other.

  3. Load the solution $TAO_ROOT\TAO.sln and build first the TAO_IDL compiler. After that build the TAO library. This solution has almost all the projects under TAO which can be built. Therefore please pick and choose projects that you want to build.

  4. To build the Param_Test, load the solution tests\tests.sln and build both client and server.

Visual C++ 7.0

The DOC group doesn't support TAO on VC++ 7.0 since the libraries that were shipped with VC++ 7.0 did not work well. The DOC group supports only VC++ 7.1, which is used by their sponsors. The above mentioned points are also relevant to users who are trying to use TAO with VC++ 7.1. Additionally, all required options are set for the generated .sln files. If something is missing then it is probably a bug with MPC. Please report such bugs to the tao-users newsgroups.

Upgrading From Older Releases

When a newer version of ACE/TAO is installed, rebuild all should be used to make sure everything is built correctly.

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)

Instructions for dynamic libraries apply to static libraries as well. Users will have to use the _Static.sln files for creating static libraries and linking with them.

MinGW and Cygwin

First, follow the build instructions in the ACE installation notes. When building with MinGW and Cygwin you are using the GNU make under Windows. When you use make from the commandline, make sure that TAO_ROOT is set to a full path or to %ACE_ROOT%/TAO, which will also result in setting a full path. Setting it with the Unix style to $ACE_ROOT/TAO will not work, setting it using the make style to $(ACE_ROOT)/TAO looks to work but will cause problems when building the TAO services, so don't do that. The correct way is:

set TAO_ROOT=%ACE_ROOT%/TAO

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.


Minimum CORBA

By default, all components in TAO will be compiled. If you only want support for minimumTAO, define TAO_HAS_MINIMUM_CORBA. This can be accomplished by the following: create ACE_wrappers/bin/MakeProjectCreator/config/default.features with the contents:

minimum_corba=1

Then regenerate the project files with MPC using perl bin/mwc.pl, see also ACE-INSTALL.html for more info about the MPC generation. This miminum_corba=1 will add compiler flags to the C++ compiler and the IDL compiler to indicate that minimum corba is enabled. For your own project code you can define TAO_HAS_MINIMUM_CORBA in the ace/config.h file or by using make minimum_corba=1 when you compile TAO after that.

WARNING: Make sure that if you build the orbsvcs with minimum_corba=1 you also build the core libraries with minimum_corba=1!


CORBA/e compact and micro

By default, all components in TAO will be compiled. If you only want support for CORBA/e compact or micro you must regenerate the makefiles shipped with the distribution. This can be accomplished by the following: create ACE_wrappers/bin/MakeProjectCreator/config/default.features with the contents:

corba_e_compact=1

or

corba_e_micro=1

Then regenerate the project files with MPC using perl bin/mwc.pl, see also ACE-INSTALL.html for more info about the MPC generation. This corba_e_x=1 will add compiler flags to the C++ compiler and the IDL compiler to indicate that CORBA/e is enabled. For your own project code you can define CORBA_E_COMPACT or CORBA_E_MICRO in the ace/config.h file.


System Resource Requirements

Please see the ACE-INSTALL.html System Resource Requirements discussion for information on system resources required to build ACE and TAO.


Building and Installing TAO from subversion

If users are building from our subversion archive the GNUmakefiles, and project files for building on various platforms will not be available. Users from subversion are expected to generate them using MPC before building ACE, TAO or CIAO. We point out some suggestions below to get bootstrapped quickly.

Back to the TAO home page.