      Document Index

        * Building and Installing TAO from a distribution
        * Building and Installing TAO from anonymous CVS

     ----------------------------------------------------------------------

    Building and Installing TAO from a distribution

      The following table summarizes platforms on which TAO runs:

      +---------------------------------------------------------------------+
      | Fully supported, i.e.,       | Solaris 7, 8 and 9, Windows 2000/XP  |
      | continually tested and used  | (6.x, and 7.1 and Borland C++        |
      | daily                        | Builder 6), and Linux/Intel (Redhat, |
      |                              | Debian and SuSe), Linux/Alpha        |
      |                              | (SuSe).                              |
      |------------------------------+--------------------------------------|
      | Nearly fully supported,      | Windows 9x/ME, HP/UX 11.x, VxWorks   |
      | i.e., periodically tested    | 5.5.1, LynxOS, and AIX 4.x           |
      |------------------------------+--------------------------------------|
      | Partially supported, i.e.,   | FreeBSD, NetBSD, Chorus, Tandem NS,  |
      | infrequently tested          | HP/UX 10.x, DEC UNIX 6.5,            |
      |                              | Linux/Alpha (Redhat and Debian), and |
      |                              | MACOSX                               |
      |------------------------------+--------------------------------------|
      | Planned support, i.e.,       | pSoS, MVS, Windows CE, SCO,          |
      | pending                      | UnixWare, OpenVMS                    |
      |------------------------------+--------------------------------------|
      | Compilers whose support were | Borland C++ Builder 4 and 5, Sun/C++ |
      | dropped recently             | 5.1 through 5.4, and g++ prior to    |
      |                              | 2.95.x                               |
      +---------------------------------------------------------------------+

      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.

             * Change directory to $ACE_ROOT/ace and execute make.

             * Also build GPERF under $ACE_ROOT/apps/gperf

       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 beta or the release distribution will come with stock
          GNUmakefiles, project files (for VC6 and VC 7.1) and Borland
          makefiles which 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 dsp and dsw 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 TAOACE.mwc.
          (7) Run 'make'. This will create all the required libraries for TAO
          and TAO orbsvcs. In step 6, use -type vc6 if you want to generate
          VC6 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.

Explicit templates

      It is not possible to use TAO with explicit templates. Your compiler
      must support implicit templates.

     ----------------------------------------------------------------------

  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.
      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:
      $TAO_ROOT/TAO_IDL/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.

      You can override the default values by adding two lines in your
      platform_macros.GNU file, as follows:

 $ echo 'TAO_IDL := /your/path/tao_idl' \
      >> platform_macros.GNU
 $ echo 'TAO_IDLFLAGS := -g /your/path/gperf' \

      You could even use:

 $ echo 'TAO_IDL := tao_idl' \
      >> platform_macros.GNU
 $ echo 'TAO_IDLFLAGS := -g gperf' \

      if the tools are in your path.

      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
 $ 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/TAO
       5. /bin/rm -r TAO_IDL
       6. ln -s ../../SunOS5_g++/TAO/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-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 advisable to set either the ACE_ROOT environment variable as
      outlined in the ACE installation notes or the TAO_ROOT environment
      variable.

      Remember to set up ACE before building TAO.

    Visual C++ 6.0

      It works best if TAO is placed in ACE_wrappers so TAO ends up in
      ACE_wrappers\TAO because the Visual C++ 6 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++ 6.0, use ACE.dsw).

       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 workspace $TAO_ROOT\TAO.dsw and build the TAO library. This
          workspace 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 workspace tests\tests.dsw and build
          both client and server.

    Visual C++ 7.1

      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.

    Borland C++ Builder

      To build TAO using C++Builder please follow the ACE installation notes,
      with the difference being that you first build ACE and then you give
      the following command in the $ACE_ROOT\TAO directory:

        make -f Makefile.bor

      For more detailed information on building and using TAO with Borland's
      C++ Builder environment, please see the online help provided by
      Christopher Kohlhoff.

    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 _Static.dsw's and _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.

     ----------------------------------------------------------------------

  Native Exceptions

      TAO will use native exceptions if ACE_HAS_EXCEPTIONS is defined when it
      is compiled. This can be accomplished in two ways: by defining
      ACE_HAS_EXCEPTIONS in the config.h or config-*.h files (such as on
      Windows) or by using make exceptions=1 when you compile TAO.

      Take note though, that this only enables support in ACE/TAO, the
      correct compiler flags must also be given to the compiler to enable
      them.

     ----------------------------------------------------------------------

  minimumTAO

      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 in two ways: by defining TAO_HAS_MINIMUM_CORBA in the
      config.h or orbconf.h files or by using make minimum_corba=1 when you
      compile TAO.

      WARNING: Make sure that if you build liborbsvcs with minimum_corba=1 you
      also build libTAO with minimum_corba=1!

     ----------------------------------------------------------------------

     ----------------------------------------------------------------------

  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 anonymous CVS

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

        * Please see instructions above to download MPC from anon cvs
          repository

        * Please make sure that you have perl installed, preferably perl 5.8
          or higher. Users on Win32 based platforms are recommended to use
          Active State Perl . We use active state perl without problems. We
          have ran into problems trying to use the cygwin version of perl on
          Win32 based platforms.

        * If you just want to build TAO and associated tests, examples, and
          associated utility libraries, we recommend the following
          alternatives:

             * Build ACE and TAO seperately. ACE needs to be built first and
               instructins for building ACE are available at ACE-INSTALL.
               GNUmakefiles and project files for TAO can be generated by
               using the following commands:

               $ACE_ROOT/bin/mwc.pl TAO.mwc

               from $TAO_ROOT to generate GNUmakefiles. Use -type vc6 or
               -type vc71 to generate VC6 and VC71 project and solution
               files.

             * Build ACE+TAO together in one shot. To do that please issue
               the following commands:

               $ACE_ROOT/bin/mwc.pl TAOACE.mwc

               from $TAO_ROOT. This will generate GNUmakefiles for ACE,
               gperf, and core ACE+TAO libraries. Issuing a 'make' from
               $TAO_ROOT will build all of the above in one shot. You can use
               -type vc6 to generate VC6 project and workspace files.
               TAOACE.dsw can be used by users to build ACE+TAO from a single
               workspace file. Users can use -type vc71 to generate the VC71
               solutions files.

        * If you want to build CIAO and its associated libraries please see
          CIAO-INSTALL for details.

     ----------------------------------------------------------------------

      Back to the TAO home page. 
