
      Document Index

     * [1]Building and Installing TAO from a distribution
     * [2]Building and Installing TAO from subversion
     _________________________________________________________________

    Building and Installing TAO from a distribution

    The following table summarizes platforms on which TAO runs, see the [3]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 7, 8 and 9,
   Windows 2000/XP (7.1, and 8.0 and Borland C++ Builder 6/2006), Linux/Intel
   (Redhat, Debian and SuSe), Linux/Alpha (SuSe), VxWorks 5.5.1/6.2/6.3,
   OpenVMS 8.2
   Nearly fully supported, i.e., periodically tested Windows 9x/ME, HP/UX 11.x,
   LynxOS, and AIX 4.x
   Partially supported, i.e., infrequently tested FreeBSD, NetBSD, Chorus,
   Tandem NS, DEC UNIX 6.5, Linux/Alpha (Redhat and Debian), and MACOSX
   Planned support, i.e., pending MVS, Windows CE, SCO, UnixWare
   Compilers whose support were dropped recently Borland C++ Builder 4 and 5,
   Sun/C++ 5.1 through 5.4, g++ prior to 2.95.x, HP/UX 10.x, pSoS, Chorus

   Any UNIX/POSIX/Win32 variation is a potential target platform for TAO. If
   you have [4]porting questions or have a problem compiling the TAO along with
   ACE wrappers on the platforms shown above please send email to either the
   [5]Newsgroup or to the [6]TAO mailing list and we'll try to help you fix the
   problems. You can also submit bug reports and enhancement requests in our
   [7]bug tracking system.

   TAO can be obtained [8]electronically via the WWW and ftp. [9]TAO is bundled
   with the [10]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 [11]ACE
       installation notes.
    2. Build and install ACE under $ACE_ROOT.
          + Change directory to $ACE_ROOT/ace and execute [12]make.
          + Also build GPERF under $ACE_ROOT/apps/gperf/src
    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 VC7.1 and VC 8) and Borland makefiles
       which were all generated by MPC.
       The easiest and recommended way to compile the complete TAO distribution
       by simply simply executing [13]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 [14]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 [15]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 [16]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 [17]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 [18]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.
     _________________________________________________________________

  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 [19]$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:
   $TAO_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.

   You can override the default values by adding several new lines in your
   platform_macros.GNU file assuming $(HOST_ROOT) is set to the location of
   your host build where you have build gperf and tao_idl, as follows:
$ echo 'TAO_IDL := $(HOST_ROOT)/bin/tao_idl' \
$ echo 'TAO_IDLFLAGS += -g $(HOST_ROOT)/bin/gperf' \
$ echo 'TAO_IDL_DEP := $(HOST_ROOT)/bin/tao_idl$(EXEEXT)' \
     >> platform_macros.GNU

   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 [20]../ACE-INSTALL.html, and [21]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 [22]TAO_IDL documentation.

   It is also advisable to set either the ACE_ROOT environment variable as
   outlined in the [23]ACE installation notes or the TAO_ROOT environment
   variable.
   Remember to [24]set up ACE before building TAO.

    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 [25]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 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.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 [26]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  [27]online  help  provided by
   [28]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 the _Static.sln files for creating static libraries and
   linking with them.

    MinGW and Cygwin

   First, follow the build instructions in the [29]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.
     _________________________________________________________________

  Minimum CORBA

   By default, all components in TAO will be compiled. If you only want support
   for [30]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
   [31]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
   [32]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 [33]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
    [34]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 [35]MPC before building ACE, TAO or CIAO. We point
    out some suggestions below to get bootstrapped quickly.

     * Please  see  [36]instructions  above to download MPC from anon cvs
       repository
     * Please make sure that you have [37]perl installed, preferably perl 5.8
       or  higher.  Users on Win32 based platforms are recommended to use
       [38]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 [39]ACE-INSTALL.
            GNUmakefiles and project files for TAO can be generated by using
            the following commands:
            $ACE_ROOT/bin/mwc.pl TAO.mwc -type gnuace
            from $TAO_ROOT to generate GNUmakefiles. Use -type vc71 or -type
            vc8 to generate VC71 and VC8 project and solution files.
          + Build ACE+TAO together in one shot. To do that please issue the
            following commands:
            $ACE_ROOT/bin/mwc.pl TAO_ACE.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 vc71 to generate
            VC71 project and workspace files. TAO_ACE.sln can be used by users
            to build ACE+TAO from a single workspace file. Users can use -type
            vc8 to generate the VC8 solutions files.
     * If  you want to build CIAO and its associated libraries please see
       [40]CIAO-INSTALL for details.
     _________________________________________________________________

   Back to the [41]TAO home page.

References

   1. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/TAO-INSTALL.html#build
   2. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/TAO-INSTALL.html#svn
   3. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#platforms
   4. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/docs/ACE-porting.html
   5. news:comp.soft-sys.ace
   6. mailto:tao-users@cs.wustl.edu
   7. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/docs/usage-bugzilla.html
   8. http://download.dre.vanderbilt.edu/
   9. http://www.dre.vanderbilt.edu/TAO
  10. http://www.dre.vanderbilt.edu/ACE
  11. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html
  12. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/TAO-INSTALL.html#makenotes
  13. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/TAO-INSTALL.html#makenotes
  14. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/docs/configurations.html#orbsvcs
  15. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/MPC/docs/USAGE
  16. http://www.blastwave.org/
  17. http://www.blastwave.org/
  18. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html
  19. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#vxworks
  20. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#vxworks
  21. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#VxWorks/NT
  22. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/docs/compiler.html#idl_env
  23. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html
  24. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html
  25. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/bin/MakeProjectCreator/config/acedefaults.mpb
  26. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#borland
  27. http://www.tenermerx.com/programming/corba/tao_bcb/index.html
  28. mailto:chris@kohlhoff.com
  29. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#mingw
  30. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/docs/minimumTAO.html
  31. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#MPC
  32. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#MPC
  33. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#resource_requirements
  34. https://svn.dre.vanderbilt.edu/viewvc/Middleware/trunk/
  35. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/MPC/docs/README
  36. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/TAO-INSTALL.html#MPC
  37. http://www.perl.org/
  38. http://www.activestate.com/Products/ActivePerl/
  39. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/ACE-INSTALL.html#MPC
  40. file://localhost/export/anduriltmp/bczar/ACE_wrappers_stage-15856/ACE_wrappers/TAO/CIAO/CIAO-INSTALL.html
  41. http://www.cs.wustl.edu/~schmidt/TAO.html
