1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
<!-- $Id$ -->
<HTML>
<HEAD>
<TITLE>Building and Installing TAO</TITLE>
<link rev=made href="mailto:schmidt@cs.wustl.edu">
</HEAD>
<BODY text = "#000000"
link = "#000fff"
vlink = "#ff0f0f"
bgcolor = "#ffffff">
<HR>
<H3>Building and Installing TAO</H3>
<p>The following table summarizes platforms on which TAO runs:<P>
<table width="100%" border=1>
<tr valign=top>
<td><b>Fully supported, i.e., continually tested and used daily</b></td>
<td>Solaris 2.5, 2.6, 7, and 8, Windows NT/2000 (MSVC 5.x, 6.x, and 7.x and
Borland C++ Builder 5), Linux/Intel, Linux/Alpha, VxWorks, LynxOS,
Digital UNIX 4.0 and 5.0, IRIX 6.x, and QNX Neutrino 2.0
</td>
</tr>
<tr valign=top bgcolor="#AFAFAF">
<td><b>Nearly fully supported, i.e., periodically tested</b></td>
<td>Windows 9x/ME, HP/UX 10.x and 11.x, AIX 4.x
</td>
</tr>
<tr valign=top>
<td><b>Partially supported, i.e., infrequently tested</b></td>
<td> FreeBSD, NetBSD, SunOS 4.x, Chorus
</td>
</tr>
<tr valign=top bgcolor="#AFAFAF">
<td><b>Planned support, i.e., pending</b></td>
<td> pSoS, MVS, Windows CE, Tandem, SCO, UnixWare </td>
</tr>
</table>
<P>Any UNIX/POSIX/Win32 variation is a potential target platform for
ACE. If you have <A
HREF="../docs/ACE-porting.html">porting
questions</A> or have a problem compiling the ACE wrappers on the
platforms shown above please send email to either <A
HREF="news:comp.soft-sys.ace">ACE Newsgroup</A> or the <A
HREF="mailto:ace-users@cs.wustl.edu">ACE mailing list</A> and we'll
try to help you fix the problems. You can also submit bug reports and
enhancement requests in our
<a href="../docs/usage-bugzilla.html">bug tracking system</a>.<P>
TAO can be obtained <A
HREF="http://www.cs.wustl.edu/~schmidt/TAO-obtain.html">electronically</A>
via the WWW and ftp. <A
HREF="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</A> is bundled
with the TAO release. You'll always need the most recent version of
ACE because TAO tracks changes to ACE very closely. <P>
<HR><P>
<H3>On UNIX platforms</H3>
<OL>
<LI>Set <CODE>ACE_ROOT</CODE> environment variable as outlined in
the <a href="../ACE-INSTALL.html">ACE
installation notes</A>.<P>
<LI>Build and install ACE under <CODE>$ACE_ROOT</CODE>.<P>
<UL>
<LI>Change directory to <CODE>$ACE_ROOT/ace</CODE> and execute
<CODE><A HREF="#makenotes">make</A></CODE>.<P>
<LI>Also build GPERF under <CODE>$ACE_ROOT/apps/gperf</CODE><P>
</UL>
<LI>Set <CODE>TAO_ROOT</CODE> environment variable to
<CODE>$ACE_ROOT/TAO</CODE>.<P>
<LI>Build and install the TAO release under <CODE>$TAO_ROOT</CODE>.
<P>The easiest and recommended way to compile the
<B>complete</B> TAO distribution by simply simply executing
<code><a href="#makenotes">make</a></code>
in the <CODE>$TAO_ROOT</CODE> directory.
</P>
<P>A smaller subset, that may be of interest to test basic TAO
functionality, is:
<CODE>$TAO_ROOT/tao</CODE>,
<CODE>$TAO_ROOT/TAO_IDL</CODE>,
<CODE>$TAO_ROOT/tests/Param_Test</CODE>.
Then you can execute the <CODE>run_test.pl</CODE> script in
<CODE>$TAO_ROOT/tests/Param_Test</CODE> and/or
follow the instructions contained in the <CODE>README</CODE>
file in the same directory.
</P>
<P>If you wish to compile the services distributed with TAO,
including the <CODE>Naming_Service</CODE> you
must include <CODE>$TAO_ROOT/orbsvcs</CODE> to the list
above.
</P>
<LI>To test that the TAO release is properly configured,
follow instructions on executing the various examples under
<CODE>$TAO_ROOT/tests</CODE>.<P>
</OL>
<h4><strong><a name="makenotes">A Note On Make</a></strong></h4>
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 <code>make</code> which are known to <em>not</em>
work include those from Solaris 4.x and 5.x, HP-UX, the latest BSD,
etc.<p>
GNU Make can be obtained from various places in source form.<P>
<HR><P>
<h3>For Cross-Compiled Targets, such as VxWorks and LynxOS</h3>
If you are building TAO for a VxWorks target, please see the detailed
instructions for building and installing ACE and TAO in <a
href="../ACE-INSTALL.html#vxworks">$ACE_ROOT/ACE-INSTALL.html</a>.<p>
<P>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:
</P>
<H4>Modifying the default location for the IDL compiler</H4>
<P>By default TAO assumes that the IDL compiler is located in:
<CODE>$TAO_ROOT/TAO_IDL/tao_idl</CODE> and that the GPERF tool
is located in <CODE>$ACE_ROOT/bin/gperf</CODE>, 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.
</P>
<P>You can override the default values by adding two lines in your
platform_macros.GNU file, as follows:
<PRE>
$ echo 'TAO_IDL := /your/path/tao_idl' \
>> platform_macros.GNU
$ echo 'TAO_IDLFLAGS := -g /your/path/gperf' \
</PRE>
</P>
<P>You could even use:
<PRE>
$ echo 'TAO_IDL := tao_idl' \
>> platform_macros.GNU
$ echo 'TAO_IDLFLAGS := -g gperf' \
</PRE>
if the tools are in your path.
</P>
<P>Obviously you must first build the tools for the host platform,
typically you would do this as follows:
<PRE>
# (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
</PRE>
<P>Then configuring the location of the tools for the target
could be done as shown here:
<PRE>
# (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.
</PRE>
<H4>Alternative configuration, using links</H4>
<P>Some developers prefer to set up the host tools using symbolic
links (Unix) or copy of <code>tao_idl</code> (NT).
By way of example, here is how you could setup a
croos-compilation environment for Unix,
the host is <CODE>SunOS5/g++</CODE>,
the target is <CODE>VxWorks</CODE>.
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:
<ol>
<li><code>cd ACE_wrappers</code>
<li><code>bin/create_ace_build SunOS5_g++</code>
<li><code>bin/create_ace_build vxworks</code>
<li><code>cd build/vxworks/TAO</code>
<li><code>/bin/rm -r TAO_IDL</code>
<li><code>ln -s ../../SunOS5_g++/TAO/TAO_IDL</code>
</ol>
</P>
<P>To build on the host:
<ol>
<li><code>cd build/SunOS5_g++</code>
<li><code>export ACE_ROOT=`pwd`;
export LD_LIBRARY_PATH=`pwd`/ace:$LD_LIBRARY_PATH</code>
<li><code>(cd ace; make && cd ../tests; make && cd ../TAO; make) >
make.log</code>
<li><code>cd ../vxworks</code>
<li><code>export ACE_ROOT=`pwd`</code>
<li><code>(cd ace; make && cd ../tests; make && cd ../TAO; make) >
make.log</code>
</ol></p>
<P>For NT hosts, please see the detailed instructions for building
and installing ACE and TAO in
<a href="../ACE-INSTALL.html#vxworks">../ACE-INSTALL.html</a>,
and
<a href="../ACE-INSTALL.html#VxWorks/NT">Building ACE on
Tornado/NT hosts for VxWorks targets</a>
</P>
<P>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.
</p>
<P>If using perfect hashing, TAO_IDL needs gperf to be built on
the host. That's the default on many platforms. First, build
<code>gperf</code> in the
<code>ACE_wrappers/apps/gperf/src/</code> directory. Then, add
a symlink or copy to the <code>bin/</code> directory for the
target.
</P>
<H4>Which one is right for me?</H4>
<P>Using links to cross-compile TAO may appear simpler at first
glance. However, storing the location in the
<CODE>platform_macros.GNU</CODE> 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.
</P>
<HR><P>
<H3>On Windows NT and Windows 2000</H3>
<P><CODE>TAO_IDL</CODE> does not contain its own preprocessor, so it
needs to use an external preprocessor. Depending on which compiler was
used to build <CODE>TAO_IDL</CODE>, the default preprocessor will change.
For example, if compiled with MSVC, <CODE>TAO_IDL</CODE> 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 <a href="docs/compiler.html#idl_env">TAO_IDL documentation.</a></P>
<P>It is also advisable to set either the <CODE>ACE_ROOT</CODE> environment
variable as outlined in the
<a href="../ACE-INSTALL.html">ACE
installation notes</A> or the <code>TAO_ROOT</code> environment variable.
This is only required if you are planning to use the <orb.idl>
standard include in your IDL code. Notice that some of the TAO services
use this feature, so you are better off definining the environment variable
in all cases. </P>
Remember to <a href="../ACE-INSTALL.html">set
up ACE</A> before building TAO.
<H4>Visual C++ 5.0/6.0</H4>
<P>It works best if TAO is placed in ACE_wrappers so TAO ends up in
<CODE>ACE_wrappers\TAO</CODE> because the Visual C++ 5/6 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.</P>
<OL>
<LI>Make sure ACE is built (For Visual C++ 5.0/6.0, use ace.dsw). <P>
<LI>First make sure <CODE>ACE_wrappers\bin</CODE> 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 <CODE>ACE_wrappers\bin\Release</CODE> to the directories.
<STRONG>Note:</STRONG> 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. <P>
<LI>Load the workspace <CODE>tao\TAO.dsw</CODE> and build the TAO
library. <P>
<LI>To build the Cubit test, load the workspace
<CODE>performance-tests\Cubit\TAO\IDL_Cubit\IDL_Cubit.dsw</CODE>
and build both client and server. <P>
</OL>
<H4><A NAME="taoace">TAOACE.dsw and other collection dsw files</A></H4>
<P>TAOACE.dsw is a Visual C++ 5.0/6.0 workspace that loads the projects
ACE, TAO, TAO_IDL (the compiler), gperf, the orb services libraries, and
the standalone executables (such as Naming Service, etc.). It can be
used to build all the files needed to build/run TAO applications.</P>
<H4>Borland C++ Builder</H4> <P>
To build TAO using C++Builder please follow the
<A HREF="../ACE-INSTALL.html#borland">ACE installation notes</A>, with the
difference being that you should run:<BR>
<BLOCKQUOTE><CODE>
make -f Makefile.bor
</CODE></BLOCKQUOTE><P>
from the ACE_ROOT\TAO directory instead of ACE_ROOT\ace.<P>
For more detailed information on building and using TAO with Borland's
C++ Builder environment, please see the <A
HREF="http://www.tenermerx.com/tao_bcb/index.html">online</A> help
provided by <A HREF="mailto:chris@kohlhoff.com">Christopher
Kohlhoff</A>. <P>
<H4>Upgrading From Older Releases</H4>
<P>When a newer version of ACE/TAO is installed, rebuild all should be
used to make sure everything is built correctly.</P>
<H4>Changing Include Paths</H4>
<P>If you prefer <code>#include <corba.h></code> over <code> #include
<tao/corba.h></code> then you will need to change your Project Settings
to also contain the <code>TAO/tao</code> directory. You'll find this in the
C/C++ settings under Input.</P>
<H4>Creating Static Libraries (*.lib)</H4>
<P>TAO, orbsvcs, TAO_IDL, and the Simple Test all have extra project files
for static library builds. TAOACE_static.dsw contains some of these projects,
and is set up much like <A HREF="#taoace">TAOACE.dsw</A>, except that there
are not as many static projects as their are dynamic projects and their
isn't the same dependencies set up.</P>
<P> To use the static libraries in a project, make sure to the following
settings are used in the Project Settings.</P>
<UL>
<LI><strong>C/C++ | General:</strong> Add the Preprocessor Definitions
<CODE>ACE_HAS_DLL=0</CODE>, <CODE>ACE_OS_HAS_DLL=0</CODE> and whatever
other libraries that are included (such as <CODE>TAO_HAS_DLL=0</CODE>)
<LI><strong>Link:</strong> Link with the static libs, such as
TAOs.lib or TAOsd.lib
</UL>
<HR>
<H3><A NAME="#VC">How to add IDL files into your Visual C++ projects</A></H3>
Point of contact: <A HREF="mailto:nanbor@cs.wustl.edu">Nanbor Wang</A>.
<P>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.
<OL>
<LI>Create/open the workspace. In addition to creating server
project and client project, create a separate "<b>Utility
Project</b>" call foobar_idl for compiling the shared IDL file.
Add the IDL file <foobar.idl> to foobar_idl project and
other non-IDL generated files into both client and server
projects.</LI>
<LI>Added foobarC.h, foobarC.i, foobarC.cpp, foobarS.h, foobarS.i, and
foobarS.cpp into server project and foobarC.h, foobarC.i,
foobarC.cpp into client projects.</LI>
<LI>Now open the project setting window of foobar_idl (Project ->
Setting... or just press Alt-F7.) Select the IDL file in the
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.</LI>
<LI>Click on the "Custom Build" tab. Add this entry as the build command
for IDL files:<BR><BR>
<PRE>tao_idl $(InputPath) -o $(InputDir) -I $(InputDir)</PRE>
Notice that your absolute path to TAO_IDL may vary.</LI>
<LI>Now add the following entries as "Output file(s)."<BR><BR>
<PRE>
$(InputDir)\$(InputName)S.h
$(InputDir)\$(InputName)C.h
$(InputDir)\$(InputName)C.i
$(InputDir)\$(InputName)C.cpp
$(InputDir)\$(InputName)S.i
$(InputDir)\$(InputName)S.cpp
$(InputDir)\$(InputName)S_T.h
$(InputDir)\$(InputName)S_T.i
$(InputDir)\$(InputName)S_T.cpp
</PRE>
Add only one entry in each line.</LI>
<LI>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.</LI>
<LI>We are all set. Click OK.</LI>
<LI>Add foobarC.cpp and foobarS.cpp to the server project and
foobarC.cpp into the client project.</LI>
<li>Make both client and server projects dependent projects of
foobar_idl project to make sure the IDL file get compiled
before client and server projects.</li>
</OL>
<p>Notice that these procedures only setup the IDL compiler to perform
correctly. </p>
<P>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.
<P>
<HR>
<H3>Perl Scripts</H3>
<P>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.</p>
<P> 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.</P>
<HR>
<H3>Native Exceptions</H3>
<P>TAO will use native exceptions if TAO_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
<CODE>make exceptions=1</CODE> when you compile TAO.</P>
<P>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.</P>
<HR>
<P>
<H3>minimumTAO</H3>
<P>By default, all components in TAO will be compiled. If you only
want support for <A HREF="../docs/minimumTAO.html">minimumTAO</A>, 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 <CODE>make minimum_corba=1</CODE> when you compile TAO.</P>
<strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
Make sure that if you build liborbsvcs with minimum_corba=1 you also
build libTAO with minimum_corba=1!<P>
<HR>
<P>
<H3>Connection Caching feature</H3>
<p>By default, TAO includes the connection caching and purging feature
which reuses "old" connections by purging them according to the
caching strategy opted for (Least Recently Used, Least Frequently
Used, First In First Out). This way socket descriptors are reused
thereby increasing scalability.<p>
This feature can be controlled by defining or commenting out
TAO_USES_ROBUST_CONNECTION_MGMT in $TAO_ROOT/tao/orbconf.h.<p>
But the code related to this feature consists of classes with large
template lists and can cause problems with linkers and assemblers
which cant grok long names.<p>
Tips:<p>
Check on SunOS5.6 (and above) whether the assembler used is of the Sun
Workshop 5 version else you could get linker errors due to huge
symbols.<p>
If using egcs2.95 as the compiler the <code>-fsquangle</code>
option could be used which shortens the symbol names.
Thanks to <a href="mailto:ssweeney@sanders.com">Skye Sweeney</a>
for trying it out and <a href="mailto:othman@cs.wustl.edu">Ossama
Othman</a> for discovering the option with egcs. Note: Both the ACE
library and TAO library need to built using this option.</p>
<HR><P>
<H3><A NAME="resource_requirements">System Resource Requirements</A></H3>
Please see the
<a href="../ACE-INSTALL.html#resource_requirements">ACE-INSTALL.html System
Resource Requirements discussion</a> for information on system resources
required to build ACE and TAO.<p>
Back to the <A HREF="http://www.cs.wustl.edu/~schmidt/TAO.html">TAO</A> home page.
<!--#include virtual="/~schmidt/cgi-sig.html" -->
</BODY>
</HTML>
|