Revert to Current Include Style
[ACE_TAO.git] / ACE / ACE-INSTALL.html
blob45d215f75284f9f772ce8620a1e7298606c36da8
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><!-- -->
3 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Building and Installing ACE and Its Auxiliary Libraries and Services</title>
5 <link rev="made" href="mailto:d.schmidt@vanderbilt.edu">
7 <style>
8 body {
9 background-color: #ffffff;
10 color: #000000;
12 table, th, td {
13 border: 1px solid black;
15 .indent {
16 margin-left: 2em;
18 .boxed {
19 border: 1px solid black;
20 border-radius: 0.3em;
21 padding-right: 0.5em;
22 padding-left: 0.5em;
23 margin: 0.5em;
25 pre, code {
26 background-color: #e3e3e3;
27 border-radius: 0.2em;
28 padding-right: 0.2em;
29 padding-left: 0.2em;
31 </style>
32 </head>
34 <body>
36 <hr>
37 <h1>Building and Installing ACE and Its Auxiliary Libraries and Services</h1>
39 <h2>Synopsis</h2>
41 The file explains how to build and install ACE, its Network Services,
42 test suite and examples on the various OS platforms and compilers that
43 it has been ported to. Please consult the <a href="NEWS">NEWS</a> and
44 <a href="ChangeLogs">ChangeLogs</a> files to see whether any recent changes
45 to the release will affect your code. In addition, you should check
46 out our <a
47 href="docs/ACE-development-process.html">development
48 process</a>. As you start working with ACE, we suggest you get copies
49 of the <a
50 href="http://www.dre.vanderbilt.edu/~schmidt/ACE/book1/">C++NPv1</a>, <a
51 href="http://www.dre.vanderbilt.edu/~schmidt/ACE/book1/">C++NPv2</a>, and
52 <a href="http://www.riverace.com/acebooks/">APG</a> books to help
53 guide you after you've built and installed ACE. You should also
54 consult the <a
55 href="docs/ACE-FMM.html">ACE
56 Frequently Made Mistakes page</a>. If you encounter any problems or
57 would like to request an enhancement, then use <a
58 href="https://github.com/DOCGroup/ACE_TAO">github
59 </a> to submit an issue in accordance with our <a
60 href="docs/ACE-bug-process.html">bug
61 report process</a>.<p>
63 </p><h2>Document Index</h2>
65 <ul>
66 <li><a href="#platforms">Platforms, C++ Compilers, and Support</a></li>
67 <li><a href="#installpre">Installation prerequisites</a></li>
68 <li><a href="#aceinstall">Building and Installing ACE</a></li>
69 <li><a href="#svcsinstall">Building and Installing ACE Network Services</a></li>
70 <li><a href="#sslinstall">Building and Installing The ACE_SSL Library</a></li>
71 <li><a href="#guireactor_install">Building and Using GUI Reactors Libraries</a></li>
72 <li><a href="#installnotes">Installation Notes</a></li>
73 <li><a href="#g++">Compiling ACE with GNU g++</a></li>
74 <li><a href="#minimum_build">What Do I Need to Build for TAO?</a></li>
75 <li><a href="#resource_requirements">System Resource Requirements</a></li>
76 <li><a href="#MPC">General MPC Information</a></li>
77 <li><a href="#eclipse">Working with ACE in Eclipse</a></li>
78 <li><a href="#advanced">Advanced Topics</a></li>
79 <li><a href="#power">Building from git</a></li>
80 </li></ul>
83 <p></p><hr><p>
84 </p><h2><a name="platforms">Platforms, C++ Compilers, and Support</a></h2>
86 <p>ACE has been ported to a large number of platforms using many different
87 compilers over the years.
88 The <a href="http://www.dre.vanderbilt.edu/">DOC group</a>,
89 <a href="http://www.riverace.com/">Riverace</a>,
90 <a href="http://www.theaceorb.com/">OCI</a>,
91 <a href="https://www.remedy.nl/">Remedy IT</a>, and members of the ACE
92 user community have all contributed ports to make ACE the successful
93 and far-reaching toolkit it is today. Any UNIX/POSIX/Windows
94 variation is probably an easy target platform for ACE. If you have
95 <a href="docs/ACE-porting.html">porting questions</a> or have a problem
96 compiling the ACE source distribution, please contact one of the
97 commercial support companies, or send a copy of the
98 <a href="PROBLEM-REPORT-FORM">PROBLEM-REPORT-FORM</a>, located in the
99 ACE_wrappers directory to <a href="mailto:ace-users@list.isis.vanderbilt.edu">ace-users
100 mailing list</a> or create a <a href="https://github.com/DOCGroup/ACE_TAO/issues">github issue</a>.
101 The DOC groups at Washington University, UC Irvine, and Vanderbilt
102 University provide only "best effort" support for non-sponsors for the
103 latest release, as described in <a href="docs/ACE-bug-process.html">
104 docs/ACE-bug-process.html</a>.
105 Thus, if you need more "predictable" help, or help with earlier versions of
106 ACE, it's recommend that you check out the
107 <a href="http://www.dre.vanderbilt.edu/support.html">list of
108 commercial support companies</a> for additional assistance.
109 </p>
110 <p>The responsibility for maintaining ACE across the wide range of
111 supported platforms is divided among a few different groups:
112 <ul>
113 <li>The DOC group maintains platforms used in the course of their research
114 and sponsored work</li>
115 <li>Companies that provide support (Riverace, OCI, and Remedy IT), maintain
116 platforms they support in the course of their various service offerings</li>
117 <li>The ACE user community maintains any other desired platforms.</li>
118 </ul>
119 The <a href="http://www.dre.vanderbilt.edu/scoreboard/" target="_blank">
120 build scoreboard</a>
121 records the current status of build and regression testing during
122 development by all of the above groups. It is available to all users wishing
123 to provide build results. Members of the ACE community that maintain ACE on
124 platforms not maintained by the DOC group, Riverace, OCI, or Remedy IT are
125 encouraged to provide build and regression test results for the scoreboard
126 to ensure that all in-use platforms are represented.
127 See the <a href="https://raw.githubusercontent.com/DOCGroup/autobuild/master/README" target="_blank">autobuild README</a> for more information about
128 how to set up a build; contact one of the above groups to inquire about how
129 to get your build results recorded on the scoreboard.</p>
130 <p>Because older
131 platforms that are not maintained tend to fall into a broken state and
132 clutter the ACE sources with code that is no longer used, the development
133 team reserves the right to remove ACE configuration files and source code
134 specific to inactive platform configurations that are not
135 listed on the scoreboard.</p>
136 <p>The table below summarizes each group's role and where you can get more
137 detailed information. For information on TAO's platform coverage and
138 support, please also see <a href="TAO/TAO-INSTALL.html">TAO's install
139 document</a>.</p><p>
141 <table width="75%">
142 <caption><b>Groups Involved in ACE Development and Support<br></b></caption>
143 <thead>
144 <tr valign="top">
145 <th>Group</th>
146 <th>Platforms</th>
147 <th>For more information</th>
148 </tr>
149 </thead><tbody>
150 <tr>
151 <th>DOC Group</th>
152 <td>
153 </td>
154 <td>DOC sites at <a href="http://www.dre.vanderbilt.edu/">ISIS</a>,
155 <a href="http://www.uci.edu/">UCI</a> and
156 <a href="https://wustl.edu//">Washington University</a>
157 </td>
158 </tr>
159 <tr>
160 <th>Riverace</th>
161 <td>Offers ACE
162 <a href="http://www.riverace.com/training.htm">training</a>,
163 <a href="http://www.riverace.com/support.htm">support</a> and
164 <a href="http://www.riverace.com/consult.htm">consulting services</a>
165 for many platforms including AIX, HP-UX, Linux, Solaris, and Windows.
166 </td>
167 <td>Riverace's <a href="http://www.riverace.com/support.htm">ACE
168 Support page</a>.</td>
169 </tr>
170 <tr>
171 <th>OCI</th>
172 <td>Maintains ACE on certain platforms required for their TAO
173 software and service offerings.
174 </td>
175 <td>
176 <a href="http://www.objectcomputing.com/">OCI's web site</a>,
177 <a href="https://objectcomputing.com/products/tao">TAO page</a>,
178 and the <a href="../TAO/TAO-INSTALL.html">TAO install document</a></td>
179 </tr>
180 <tr>
181 <th>Remedy IT</th>
182 <td>Maintains ACE on many platforms required for their ACE and
183 TAO service offerings. We support AIX,
184 Embarcadero C++ Builder,
185 Windows CE, MinGW, Microsoft Visual C++, GCC,
186 Cygwin, VxWorks 6.x (kernel and rtp), OpenVMS on IA64,
187 BlueCAT Linux, RedHat Linux, Fedora, MacOSX, Solaris,
188 Tru64, SuSE Linux on Alpha/IA32/EM64T/IA64, RTEMS, QNX, LynxOS,
189 HPUX on IA64, and Android.
190 The Intel C++ compiler is supported on
191 Windows 32/64bit, Linux IA32/EM64T/IA64, MacOSX.
192 </td>
193 <td>Remedy IT <a href="https://www.remedy.nl/">web site</a> and
194 the TAO <a href="TAO/TAO-INSTALL.html">install document</a>
195 </td>
196 </tr>
197 <tr>
198 <th>PrismTech</th>
199 <td>Maintains ACE on certain platforms required for their TAO
200 software and service offerings, including LynxOS.
201 </td>
202 <td>PrismTech's <a href="http://www.prismtech.com/">web site</a></td>
203 </tr>
204 <tr>
205 <th>ACE user community</th>
206 <td>Responsible for continued maintenance and testing of platforms
207 to which ACE has been ported, but aren't supported by the
208 above groups. These include
209 Digital UNIX (Compaq Tru64) 4.0 and 5.0;
210 IRIX 6.x; UnixWare 7.1.0;
211 Linux on PPC; OpenMVS;
212 Tandem; SCO; FreeBSD; NetBSD; OpenBSD;
213 Macintosh OS X; OS/9; PharLap ETS 13;
214 QNX RTP and Neutrino 2.0; Interix (Windows Services for Unix)
215 </td>
216 </tr><tr>
217 <th>Not maintained</th>
218 <td>The following platforms have been ported to in the past but are
219 no longer maintained and may be removed from ACE at any time.
220 If you want to have support for these environments contact one
221 of the commercial support organisations. The platforms include:
222 Chorus; DG/UX; HP-UX 9, 10 and 11.00; pSOS;
223 SunOS 4.x and Solaris with SunC++ 4.x; VxWorks 5.4 and earlier;
224 Microsoft Visual C++ 5, 6, and 7.0; Borland C++ Builder 4, 5, 6, and 2006.
225 For up-to-date listings on platform that are deprecated and pending
226 removal from ACE, please see the <a href="NEWS">NEWS file</a>.
227 </td>
228 </tr>
229 </tbody></table></p><p>
231 </p><p>Although the DOC group has provided outstanding support for ACE
232 over the years, ACE's success has greatly increased the amount of
233 effort required to keep up with its maintenance, answer users'
234 questions, and give design guidance. Riverace offers world-class
235 commercial services to support ACE users. OCI, PrismTech, and Remedy
236 offer similar services for ACE and TAO, allowing the DOC group's primary focus
237 to shift back to their main goal: <em>research</em>. The DOC group is
238 fundamentally focused on (and <a
239 href="http://www.dre.vanderbilt.edu/~schmidt/resume-grants.html">funded
240 by</a>) advanced R&amp;D projects. The group continues to be
241 intimately involved in ACE+TAO development and maintenance, but with
242 revised priorities for maintenance. The <a
243 href="docs/ACE-bug-process.html">bug
244 fixing policies</a> followed by the DOC group are designed to strike a
245 balance between their many <a
246 href="http://www.dre.vanderbilt.edu/~schmidt/research.html">research
247 projects</a> and their commitment to the ACE+TAO <a
248 href="http://www.dre.vanderbilt.edu/~schmidt/ACE-users.html">user
249 community</a>. Naturally, we will be happy to accept well-tested
250 patches from the ACE+TAO user community for any platforms that aren't
251 supported by the DOC group, Riverace, OCI or Remedy IT. </p><p>
253 </p><p></p><hr><p>
254 </p><h2><a name="installpre">Installation prerequisites</a></h2>
256 <p> ACE (as well as TAO and CIAO) use <A
257 HREF="http://htmlpreview.github.io/?https://github.com/DOCGroup/MPC/blob/master/docs/html/MakeProjectCreator.html">MPC</A>
258 (MakeProjectCreator) to generate files used by all supported build
259 tools (such as GNUmakefiles for UNIX based platforms, sln and vcproj
260 files for Visual Studio and Embarcadero makefiles) on various platforms. To
261 help new users to bootstrap quickly the release bundles of ACE (as
262 well as TAO) include all needed files to use the build
263 instructions in this document.
265 </p>
267 If it is necessary to generate
268 files for build tools for other compilers, one must
269 run MPC to generate the
270 appropriate files. Please see <a href="MPC/docs/USAGE">USAGE</a>, <a
271 href="MPC/docs/README">README</a>, and <a
272 href="bin/MakeProjectCreator/README">README for ACE</a> files for
273 details. The options that have been used to generate the above build
274 files can be found in <a
275 href="bin/MakeProjectCreator/config/global.features">
276 global.features</a> file.
277 </p>
279 <hr>
280 <h1><a name="aceinstall">Building and Installing ACE</a></h1>
282 The following sections explain how to build ACE on:
283 <ul>
284 <li><a href="#unix">UNIX</a></li>
285 <li><a href="#win32">Windows (including MinGW and Cygwin)</a></li>
286 <li><a href="#vxworks">VxWorks</a></li>
287 <li><a href="#android">Android</a></li>
288 <li><a href="#interix">Interix</a></li>
289 <li><a href="#rtems">RTEMS</a></li>
290 </ul>
292 <h2>General Rules</h2>
293 <ul>
294 <li><p>Many features in ACE can be modified by defining some macros in
295 <code>$ACE_ROOT/ace/config.h</code>. These macros should
296 <em><b>always</b></em> appear <em><b>before</b></em> including
297 your platform specific config file.</p>
298 </li><li><p>However, if you want to undefine/redefine macros defined in the
299 platform specific config file, these <code>#undef</code> should
300 come <em><b>after</b></em> the config file.</p>
301 </li><li> If you're planning to build ACE on multiple platforms, you may
302 want to consider <a href="#cloning">cloning the source tree</a>
303 before you start. <p>
304 </p></li></ul>
306 <hr align="left" width="50%">
307 <h2><a name="unix">Building and Installing ACE on UNIX</a></h2>
309 As of ACE 6.0.6, you can building ACE on
310 UNIX with:
311 <ol>
312 <li><a href="#unix_traditional">Traditional ACE/GNU Make Configuration</a></li>
313 </ol>
314 The <a href="#win32">build process for Windows</a> is different from
315 the UNIX methods.
317 <h3><a name="unix_traditional">Using the Traditional ACE/GNU Configuration</a></h3>
319 Here's what you need to do to build ACE using GNU Make and ACE's traditional
320 per-platform configuration method:</p>
322 <ol>
323 <li>Install <a href="http://ftp.gnu.org/pub/gnu/make/">GNU make</a>
324 3.79.1 or greater on your system (available via <code>http</code>
325 anonymous <code>ftp</code> from <code>ftp.gnu.org</code> in the
326 <code>pub/gnu/make/</code> directory).
327 You <em>must</em> use GNU make when using ACE's traditional
328 per-platform configuration method or ACE won't compile.
329 </li>
330 <li>Add an environment variable called ACE_ROOT that contains the
331 name of the root of the directory where you keep the ACE wrapper
332 source tree. The ACE recursive Makefile scheme needs this information.
333 There are several ways to set the ACE_ROOT variable. For example:
334 <blockquote>
335 TSCH/CSH:
336 <code>setenv ACE_ROOT /home/cs/faculty/schmidt/ACE_wrappers</code>
337 </blockquote>
338 <blockquote>
339 BASH or Bourne Shell:
340 <code>export ACE_ROOT=/home/cs/faculty/schmidt/ACE_wrappers
341 </code>
342 </blockquote>
344 If you're building a number of versions of ACE, however, (e.g., for
345 different OS platforms or for different releases of ACE) you might use
346 the following approach (assuming TCSH/CSH):
347 <blockquote>
348 <code>setenv ACE_ROOT $cwd</code>
349 </blockquote>
350 </li>
351 <li>Create a configuration file, <code>$ACE_ROOT/ace/config.h</code>,
352 that includes the appropriate platform/compiler-specific
353 header configurations from the ACE source directory. For example:
354 <blockquote><code>
355 #include "ace/config-linux.h"
356 </code></blockquote>
357 The platform/compiler-specific configuration file
358 contains the #defines that are used throughout ACE to indicate
359 which features your system supports. See the
360 <code>$ACE_ROOT/ace/README</code> file for a description of these
361 macro settings. If you desire to add some site-specific or build-specific
362 changes, you can add them to your config.h file; place them
363 <strong>before</strong> the inclusion of the platform-specific
364 header file.
366 There are config files for most versions of UNIX. If there
367 isn't a version of this file that matches your
368 platform/compiler, you'll need to make one. Please send email
369 to the <a href="mailto:ace-users@list.isis.vanderbilt.edu">ace-users</a> list
370 if you get it working so it can be added to the master ACE
371 release.</p>
372 </li>
374 <li>Create a build configuration file,
375 <code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code>,
376 that contains the appropriate platform/compiler-specific
377 Makefile configurations, e.g.,
378 <blockquote><code>
379 include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
380 </code></blockquote>
381 This file contains the compiler and Makefile directives that are
382 platform/compiler-specific. If you'd like to add make options, you
383 can add them before including the platform-specific configuration.<p>
384 NOTE! There really is not a # character before 'include' in the
385 platform_macros.GNU file. # is a comment character.
386 </li>
387 <li>If you wish to install ACE (using &quot;make install&quot;), set the
388 installation prefix in platform_macros.GNU.
389 <blockquote><code>
390 INSTALL_PREFIX = /usr/local
391 </code></blockquote>
392 Headers will be installed to $INSTALL_PREFIX/include, executables to
393 $INSTALL_PREFIX/bin, documentation and build system files to
394 $INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. The library
395 directory can be customized by setting INSTALL_LIB (for example,
396 INSTALL_LIB=lib64). With INSTALL_PREFIX set, RPATH will be enabled for
397 all executables and shared libraries. To disable RPATH (for example,
398 if $INSTALL_PREFIX/$INSTALL_LIB is already a system-known location for
399 shared libraries such as those listed in /etc/ld.so.conf), set the make
400 macro install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.
401 </li>
402 <li>Note that because ACE builds shared libraries, you'll need to set
403 LD_LIBRARY_PATH (or equivalent for your platform) to the directory
404 where binary version of the ACE library is built into. For example,
405 you probably want to do something like the following:
406 <blockquote>
407 <code>% setenv LD_LIBRARY_PATH $ACE_ROOT/lib:$LD_LIBRARY_PATH</code></blockquote>
408 </blockquote>
410 <blockquote>
411 <code>% export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH</code></blockquote>
412 </blockquote>
413 </li>
414 <li>When all this is done, hopefully all you'll need to do is type:
415 <blockquote>
416 <code>% make</code></blockquote>
417 at the ACE_ROOT directory. This will build the ACE
418 library, tests, the examples, and the sample applications.
419 Building the entire ACE release can take a long time and consume
420 lots of disk space, however. Therefore, you might consider
421 cd'ing into the <code>$ACE_ROOT/ace</code> directory and
422 running <code>make</code> there to build just the ACE library.
423 As a sanity check, you might also want to build and run the
424 automated <a href="tests/README">"one-button" tests</a> in
425 <code>$ACE_ROOT/tests</code>. Finally, if you're also
426 planning on building <a href="https://www.dre.vanderbilt.edu/~schmidt/TAO.html">TAO</a>, you
427 should build the <a href="http://www.dre.vanderbilt.edu/~schmidt/PDF/gperf.pdf">gperf</a>
428 perfect hash function generator application in
429 <code>$ACE_ROOT/apps/gperf</code>.
430 </li>
431 <li>If you've set the INSTALL_PREFIX before building, now run
432 <blockquote><code>% make install</code></blockquote>
433 </li>
434 <li>If you need to regenerate the <code>ace/Svc_Conf_y.cpp</code> file,
435 you'll need to
436 get <a href="https://www.gnu.org/software/bison">GNU Bison</a>.
437 However, you should rarely, if ever, need to do this.
438 </li>
439 </ol>
441 <hr align="left" width="50%">
443 <h2><a name="win32">Building and Installing ACE on Windows</a></h2>
445 <p>This section contains instructions for building ACE on Microsoft
446 Windows with a variety of compilers and development environments.</p>
448 <p>First, if you are upgrading from an older release, the recommended practice
449 is to start with a clean directory. Unpacking the newer release over an older
450 one will not clean up any old files, and trying to use the environment's
451 "Clean" command will probably not account for all existing files.</p>
453 <p>For using MPC and our perl based test framework we recommend
454 our windows users to use <a href="https://www.activestate.com/products/perl">Active
455 State Perl</a> or <a href="http://strawberryperl.com">Strawberry Perl</a></p>
457 <ul>
458 <li><a href="#msvc">Microsoft Visual Studio</a></li>
459 <li><a href="#embarcadero">Embarcadero C++Builder</a></li>
460 <li><a href="#mingw">MinGW</a></li>
461 <li><a href="#cygwin">Cygwin</a></li>
462 </ul>
464 </p><p></p><hr align="left" width="50%"><p>
465 </p><h3><a name="msvc">Building and Installing ACE on Windows with
466 Microsoft Visual Studio</a></h3>
468 <p>ACE contains project files for
469 Visual Studio 2017 (vc141), and Visual Studio 2019 (vc142).
470 Visual Studio 2015/2017/2019 use different file formats but the same file
471 suffixes (<code>.sln</code> and <code>.vcproj</code>). To support both
472 environments, ACE supplies files with different names for the different
473 development and target platforms. The platform/name mapping is shown below.
474 All solution files have a <code>.sln</code> suffix and all project files have
475 a <code>.vcproj</code> suffix.</p>
477 <table width="400">
478 <caption><b>Mapping of Platform to Solution/Project File Name</b></caption>
479 <thead>
480 <tr valign="top">
481 <th>Platform</th>
482 <th>File Name</th>
483 </tr>
484 </thead><tbody>
485 <tr>
486 <th>Visual Studio 2017</th>
487 <td><i>name</i><code>_vs2017</code>
488 </td>
489 </tr>
490 <tr>
491 <th>Visual Studio 2019</th>
492 <td><i>name</i><code>_vs2019</code>
493 </td>
494 </tr>
495 </tbody></table>
497 <p>The VC++ compiler and linker can now be invoked from GNU make just like
498 most UNIX builds. Follow the instructions in the <a href="#unix_traditional">
499 ACE/GNU Configuration</a> sections and see the additional information in the
500 comments of
501 <a href="include/makeinclude/platform_win32_msvc.GNU">platform_win32_msvc.GNU</a>.
502 </p>
504 <p>If you happen to open an older file Visual Studio solution from a newer one, it will offer to convert
505 the file to the newer format for you
507 <ol>
508 <li>Uncompress the ACE distribution into a directory, where it will
509 create a ACE_wrappers directory containing the distribution. The
510 ACE_wrappers directory will be referred to as ACE_ROOT in the
511 following steps -- so ACE_ROOT\ace would be C:\ACE_wrappers\ace if
512 you uncompressed into the root directory.<br>
513 <br>
514 </li><li>Create a file called <code>config.h</code> in the ACE_ROOT\ace
515 directory that contains: <br>
516 <br>
517 <code>#include "ace/config-win32.h"</code><br>
518 <br>
520 </li><li>The static, DLL and MFC library builds are kept in
521 different workspaces. Files with names *_Static contain project
522 files for static builds. Workspaces for static and DLL builds will be
523 available through the stock release at DOC group's website. The
524 workspaces for MFC are not available and have to be generated using
525 MPC. Please see <a href="MPC/docs/README">MPC's README</a> for
526 details.<br><br>
527 </li><li>Now load the solution file for ACE (ACE_ROOT/ACE.sln).<br>
528 <br>
529 </li><li>Make sure you are building the configuration (i.e, Debug/Release)
530 the one you'll use (for example, the debug tests need the debug
531 version of ACE, and so on). All these different configurations are
532 provided for your convenience. You can either adopt the scheme to
533 build your applications with different configurations, or use
534 <code>ace/config.h</code> to tweak with the default settings on
535 NT.<br> <strong>Note:</strong> If you use the dynamic libraries,
536 make sure you include ACE_ROOT\lib in your PATH whenever you run
537 programs that uses ACE. Otherwise you may experience problems
538 finding ace.dll or aced.dll.<br>
539 <br>
540 </li><li>To use ACE with MFC libraries, also add the following to
541 your <code>config.h</code> file. Notice that if you want to
542 spawn a new thread with CWinThread, make sure you spawn the
543 thread with THR_USE_AFX flag set.<br>
544 <br>
545 <code>#define ACE_HAS_MFC 1</code><br>
546 <br>
547 By default, all of the ACE projects use the DLL versions of the
548 MSVC run-time libraries. You can still choose use the static (LIB)
549 versions of ACE libraries regardless of run-time libraries. The
550 reason we chose to link only the dynamic run-time library is that
551 almost every NT box has these library installed and to save disk
552 space. If you prefer to link MFC as a static library into ACE, you
553 can do this by defining <code>ACE_USES_STATIC_MFC</code> in your
554 <code>config.h</code> file. However, if you would like to link
555 everything (including the MSVC run-time libraries) statically,
556 you'll need to modify the project files in ACE yourself.<p>
557 </p></li><li>Static version of ACE libraries are built with
558 <code>ACE_AS_STATIC_LIBS</code><br> defined. This macro should
559 also be used in application projects that link to static ACE
560 libraries<br>
561 <br>
562 Optionally you can also add the line <br>
563 <br>
564 <code>#define ACE_NO_INLINE</code><br>
565 <br>
566 before the #include statement in ACE_ROOT\ace\config.h to disable
567 inline function and reduce the size of static libraries (and your
568 executables.)<br>
569 <br>
570 </li><li>ACE DLL and LIB naming scheme:<br>
571 <br>
572 We use the following rules to name the DLL and LIB files in ACE
573 when using MSVC.<br>
574 <br>
575 "Library/DLL name" + (Is static library ? "s" :
576 "") + (Is Debugging enable ? "d" : "")
577 + {".dll"|".lib"}<br>
578 <br>
579 </li></ol>
581 <p>More information for ACE/TAO on MSVC can be found
582 <a href="docs/msvc_notes.txt">here</a>. The doxygen version of this
583 document is available under Related Topics in the ACE Library.</p>
585 <b>ACE TESTS</b><p>
587 The tests are located in ACE_ROOT\tests. There is also a solution in
588 that directory to build all the tests (tests.sln)</p><p>
590 Once you build all the tests (Batch Build works well for this), you
591 can run perl script <code>run_test.pl</code> in the
592 <code>tests</code> directory to try all the tests.</p><p>
594 <a name="win32nonic">
595 <b> BUILDING ACE ON A WIN32 MACHINE THAT LACKS A NETWORK CARD </b></a></p><p>
597 <a name="win32nonic">You may want to run ACE on a non-networked machine. To do so, you must
598 install TCP/IP and configure it to ignore the absence of a network
599 card. This is one method:
601 </a></p><ol>
602 <a name="win32nonic"> <li>Run Control Panel
603 </li><li>Choose Network from Control Panel
604 </li><li>Add Adapter: MS Loopback Adapter
605 </li><li>Configure MS Loopback Adapter with 802.3 (default)
606 </li><li>Add Protocol: TCP/IP Protocol
607 </li><li>Configure TCP/IP Protocol with a valid IP address and subnet mask.
608 Leave everything else at the default settings.
609 </li><li>Add Service: Workstation
610 </li><li>Exit and Restart System
611 </li><li>Run Control Panel again
612 </li><li>Choose Services from Control Panel
613 </li><li>The following services are not necessary and may
614 be set to Disabled Startup: <br>
615 Alerter<br>
616 Computer Browser<br>
617 Net logon<br>
618 Messanger<br>
619 </li><li>Choose Network from Control Panel
620 </li><li>Confirm the following setup. This is all you need to run ACE:<br>
621 Installed Software:<br>
622 Computer Browser<br>
623 MS Loopback Adapter Driver<br>
624 TCP/IP Protocol<br>
625 Workstation<br>
626 Installed Adapter Cards:<br>
627 MS Loopback Adapter<p>
628 </p></li></a></ol>
630 <hr align="left" width="50%"><p>&nbsp;</p>
631 <h3><a name="embarcadero">Building and Installing ACE on Windows with Embarcadero C++</a></h3>
633 If you are building for a machine without a network card, you may want
634 to check <a href="#win32nonic">here</a> first. <p>
636 </p><ol>
637 <li>Uncompress the ACE distribution into a directory, where it will
638 create an
639 ACE_wrappers directory containing the source. The ACE_wrappers
640 directory will be referred to as ACE_ROOT in the following steps -- so
641 <code>ACE_ROOT\ace</code> would be <code>C:\ACE_wrappers\ace</code> when you uncompressed into the
642 root directory.<br>
643 <br>
644 </li><li>Create a file called <code>config.h</code> in the ACE_ROOT\ace
645 directory that contains at least: <br>
646 <br>
647 <code>#include "ace/config-win32.h"</code><br>
648 <br>
649 </li><li>Open a RAD Studio Command Prompt.<br>
650 <br>
651 </li><li>Set the ACE_ROOT environment variable to point to the ACE_wrappers
652 directory. For example:<br>
653 <br>
654 <code>set ACE_ROOT=C:\ACE_wrappers</code><br>
655 <br>
656 </li><li>Add ACE_wrappers\lib and ACE_wrappers\bin to the PATH environment variable:<br>
657 <br>
658 <code>set PATH=%ACE_ROOT%\lib;%ACE_ROOT%\bin;%PATH%</code><br>
659 <br>
660 </li><li>Change to the ACE_ROOT\ace directory.<br>
661 <br>
662 <code>cd %ACE_ROOT%\ace</code><br>
663 <br>
664 </li><li>Generate the bmake makefiles using <a href="#MPC">MPC</a>. Use the <code>bmake</code> project type for C++ Builder:<br>
665 <br>
666 <code>%ACE_ROOT%\bin\mwc.pl -type bmake</code><br>
667 <br>
668 </li><li>You can build several different versions of ACE by setting the following optional environment
669 variables before you run make:<br>
670 <br>
671 Set the environment variable below to build a debug version of ACE<br>
672 <code>set DEBUG=1</code><br>
673 <br>
674 Set the environment variable below to build a unicode version of ACE<br>
675 <code>set UNICODE=1</code><br>
676 <br>
677 Set the environment variable below to build a version of ACE with
678 Codeguard support. Should only be used when DEBUG is also set<br>
679 <code>set CODEGUARD=1</code><br>
680 <br>
681 By default we are using the clang based compilers. At the moment you
682 want to compile using the old bcc32 compiler set the CLASIC environment variable<br>
683 <code>set CLASSIC=1</code><br>
684 <br>
685 Set the environment variable below to build a version of ACE optimized
686 for a certain CPU. For this there are special compiler flags
687 (-3/-4/-5/-6), see the Embarcadero help for more info.<br>
688 <code>set CPU_FLAG=-6</code><br>
689 <br>
690 You can then start the build with the command
691 <br><code>make -f Makefile.bmak all</code><br>
692 <br>
693 You may also enable the options by passing them as command line options to make, for example:<br>
694 <code>make -f Makefile.bmak -DDEBUG all</code><br>
695 <br>
696 </li><li>Build ACE by doing:<br>
697 <br>
698 <code>make -f Makefile.bmak all</code><br>
699 <br>
700 </li></ol>
704 Note that when you run <code>make</code> in a sub directory you give <code>make -f Makefile.bmak all</code>. The <code>all</code> is needed to make sure the complete project is build.<p>
706 The C++ Builder port has been done by Jody Hagins, <a href="mailto:chris@kohlhoff.com">Christopher Kohlhoff</a> and <a href="mailto:jwillemsen@remedy.nl">Johnny Willemsen</a>. </p><p>
708 <b>ACE TESTS</b></p><p>
710 Before you can build the tests you need to build the protocols directory.
711 Change the directory to ACE_ROOT\protocols and start: </p><p>
712 </p><blockquote><code>
713 %ACE_ROOT%\bin\mwc.pl -type bmake<br>
714 make -f Makefile.bmak all
715 </code></blockquote><p>
717 The tests are located in ACE_ROOT\tests, change to this directory.
718 You build then the tests with the following commands:</p><p>
719 </p><blockquote><code>
720 %ACE_ROOT%\bin\mwc.pl -type bmake<br>
721 make -f Makefile.bmak all
722 </code></blockquote><p>
724 Once you build all the tests, you can run the automated test script using:</p><p>
725 </p><blockquote><code>perl run_test.pl</code></blockquote><p> in the
726 <code>tests</code> directory to try all the tests. You need to make
727 sure the ACE bin and lib directory (in this case
728 <code>%ACE_ROOT%\bin</code> and <code>%ACE_ROOT%\lib</code>)
729 are on the path before you try to run the tests. If your executables are
730 compiled into a subdirectory, add <code>-ExeSubDir subdirname</code> to the
731 command.</p><p>
733 <p></p><hr align="left" width="50%"><p>
734 </p><h3><a name="mingw">Building and Installing ACE on Win32 with MinGW/ MSYS</a></h3>
737 If you are building for a machine without a network card, you may want
738 to check <a href="#win32nonic">here</a> first.
740 </p><p>
741 Building and installing ACE on <a href="http://www.mingw.org/">MinGW</a>
742 uses a mix of a <a href="#unix">UNIX</a> building process and
743 <a href="#win32">Win32</a> configuration files.
744 Also, as MinGW uses GNU g++, you may want to take
745 a look at the <a href="#g++">Compiling ACE with GNU g++</a> section.
747 </p><p>
748 You will need the MinGW build tools and libraries, downloable from
749 <a href="http://www.mingw.org/"><tt>http://www.mingw.org</tt></a>.
751 <br>
752 For our build we require the packages
753 <b><tt>MinGW</tt></b> and <b><tt>MSYS</tt></b>.
755 </p><ol>
757 <li> Install the MinGW tools (including the MinGW Development toolkit) into a common directory, say c:/mingw.
758 <br><br>
760 </li><li> Install the MSYS tools into a common directory, say c:/msys.
761 <br><br>
763 </li><li> Open a MSYS shell. Set your <tt>PATH</tt> environment variable so
764 your MinGW's <tt>bin</tt> directory is first:
766 <blockquote><pre> % export PATH=/c/mingw/bin:$PATH
767 </pre></blockquote>
769 </li><li> Add an <tt>ACE_ROOT</tt> environment variable pointing to the
770 root of your ACE wrappers source tree:
772 <blockquote><pre> % export ACE_ROOT=/c/work/mingw/ACE_wrappers
773 </pre></blockquote>
775 From now on, we will refer to the root directory of the ACE
776 source tree as <tt>$ACE_ROOT</tt>.
777 <br><br>
779 </li><li> Create a file called <tt>config.h</tt> in the
780 <tt>$ACE_ROOT/ace</tt> directory that contains:
782 <blockquote><pre> #include "ace/config-win32.h"
783 </pre></blockquote>
785 </li><li> Create a file called <tt>platform_macros.GNU</tt> in the
786 <tt>$ACE_ROOT/include/makeinclude</tt> directory containing:
788 <blockquote><pre> include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
789 </pre></blockquote>
791 In the above text, don't replace <tt>$(ACE_ROOT)</tt> with the
792 actual directory, GNU make will take the value from the
793 environment variable you defined previously.
796 If you lack Winsock 2, add the line
798 </p><blockquote><pre> winsock2 = 0
799 </pre></blockquote>
801 before the previous one.
802 <br><br>
805 If you want to install ACE (using "make install") and want all the <tt>.pc</tt> files generated,
806 set the installation prefix in platform_macros.GNU.
807 </p><blockquote><pre> INSTALL_PREFIX=/c/ACE
808 </pre></blockquote>
809 Headers will be installed to $INSTALL_PREFIX/include, documentation and
810 build system files to $INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. With INSTALL_PREFIX set, RPATH will be enabled.
811 To disable RPATH (for example, if $INSTALL_PREFIX/$INSTALL_LIB is already
812 a system-known location for shared libraries), set the make macro
813 install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.
815 <br><br>
817 </li><li> In the MSYS shell, change to the $ACE_ROOT/ace directory and
818 run make:
820 <blockquote><pre> % cd $ACE_ROOT/ace
821 % make
822 </pre></blockquote>
825 This should create <tt>libACE.dll</tt> (the Win32 shared library) and
826 <tt>libACE.dll.a</tt> (the Win32 import library for the DLL).
827 Note that the name for the ACE DLL follows the MinGW convention, which itself
828 resembles UNIX.
830 </p><p>
831 If you want static libs also, you may run:
833 </p><blockquote><pre> % make static_libs_only=1
834 </pre></blockquote>
836 </li><li> Run make install:
838 <blockquote><pre> % make install
839 </pre></blockquote>
841 This should create <tt>ACE.pc</tt> to use with pkg-config.
842 </p>
844 </li><li> <a name="mingwrunpath">
845 The same rules for Win32 search of DLLs apply for MinGW. If you
846 want to run some ACE programs from the MSYS shell, you may
847 need to add the directory for <tt>libACE.dll</tt> to your PATH:
849 </a><blockquote><pre><a name="mingwrunpath"> % export PATH=/c/work/mingw/ACE_wrappers/ace:$PATH
850 </a></pre></blockquote>
852 </li></ol>
854 <a name="mingwrunpath"><b>ACE TESTS</b></a><p>
856 <a name="mingwrunpath">The tests are located in <tt>$ACE_ROOT/tests</tt>.
857 After building the library, you can change to that directory and run
858 make:
860 </a></p><blockquote><pre><a name="mingwrunpath"> % cd $ACE_ROOT/tests
861 % make
862 </a></pre></blockquote>
865 <a name="mingwrunpath">Once you build all the tests, you can run
866 <code>run_tests.pl</code> in the
867 <code>tests</code> directory to try all the tests:
869 </a></p><blockquote><pre><a name="mingwrunpath"> % perl run_test.pl
870 </a></pre></blockquote>
873 <a name="mingwrunpath">If you are using ACE as a DLL, you will need to modify your PATH
874 variable as explained </a><a href="#mingwrunpath">above</a>.
876 </p><p>
877 You may want to check <tt>$ACE_ROOT/tests/README</tt> for the status
878 of the various tests on MinGW and the different Windows flavors.
880 </p><p></p><hr align="left" width="50%"><p>
881 </p><h3><a name="cygwin">Building and Installing ACE on Win32 with Cygwin</a></h3>
884 If you are building for a machine without a network card, you may want
885 to check <a href="#win32nonic">here</a> first.
887 </p><p>
888 Building and installing ACE on <a href="http://www.cygwin.com/">Cygwin</a>
889 uses the <a href="#unix">UNIX</a> building process.
890 Also, as Cygwin uses GNU g++, you may want to take
891 a look at the <a href="#g++">Compiling ACE with GNU g++</a> section.
893 </p><p>
894 You will need the Cygwin build tools and libraries, downloable from
895 <a href="http://www.cygwin.com/"><tt>http://www.cygwin.com</tt></a>.
896 For our build we require the following packages besides the packages the
897 setup selects by default:
898 <a name="cygwinpacks">
899 </a></p><blockquote>
900 <a name="cygwinpacks"><b><tt>gcc (version 3.3.3), cygserver, make, perl, binutils</tt></b>.
901 </a></blockquote>
903 <ol>
905 <a name="cygwinpacks"> <li> Install Cygwin (this can be easy downloading and running
906 <a href="http://cygwin.com/setup.exe"><tt>setup.exe</tt></a>
907 from the Cygwin site). For working with ACE we recommend
908 to select <code>DOS</code> as default text file type.
909 <br><br>
911 <li> Open a Cygwin shell. Set your <tt>PATH</tt> environment variable so
912 your Cygwin <tt>bin</tt> directory is first:
914 <blockquote><pre> % export PATH=//c/cygwin/bin:$PATH
915 </pre></blockquote>
919 <blockquote><pre> % export PATH=/cygdrive/c/cygwin/bin:$PATH
920 </pre></blockquote>
923 Note Cygwin uses ``<tt>/</tt>'' as directory separator,
924 and ``<tt>//X</tt>'' as a notation for Win32 drive <tt>X</tt>.
925 Note also that you <em>can't</em> use ``<tt>c:/cygwin/bin</tt>''
926 because, for Cygwin,
927 ``<tt>:</tt>'' is path separator character, as in UNIX.
928 <br><br>
930 </p></li><li> Add an <tt>ACE_ROOT</tt> environment variable pointing to the
931 root of your ACE wrappers source tree (in this example c:/work/cygwin/ACE_wrappers):
933 <blockquote><pre> % export ACE_ROOT=/cygdrive/c/work/cygwin/ACE_wrappers
934 </pre></blockquote>
937 Note here you <em>can't</em> use the ``<tt>//X</tt>'' Cygwin
938 notation as this is seen by Cygwin's compiler and it doesn't
939 support that (it <em>does</em> support ``<tt>/</tt>'' as directory
940 separator however).
942 </p><p>
943 From now on, we will refer to the root directory of the ACE
944 source tree as <tt>$ACE_ROOT</tt>.
945 <br><br>
947 </p></li><li> Create a file called <tt>config.h</tt> in the
948 <tt>$ACE_ROOT/ace</tt> directory that contains:
950 <blockquote><pre> #include "ace/config-cygwin32.h"
951 </pre></blockquote>
953 </li><li> Create a file called <tt>platform_macros.GNU</tt> in the
954 <tt>$ACE_ROOT/include/makeinclude</tt> directory containing:
956 <blockquote><pre> include $(ACE_ROOT)/include/makeinclude/platform_cygwin32.GNU
957 </pre></blockquote>
959 In the above text, don't replace <tt>$(ACE_ROOT)</tt> with the
960 actual directory, GNU make will take the value from the
961 environment variable you defined previously.
963 </li><li> On the Cygwin shell, change to the $ACE_ROOT/ace directory and
964 run make:
966 <blockquote><pre> % cd $ACE_ROOT/ace
967 % make
968 </pre></blockquote>
971 This should create <tt>libACE.dll</tt> (the Win32 shared library) and
972 <tt>libACE.dll.a</tt> (the Win32 import library for the DLL).
973 Note the name for the ACE DLL on Cygwin follows the UNIX convention.
974 <br><br>
976 </p><p>
977 If you want static libs also, you may run:
979 </p><blockquote><pre> % make static_libs_only=1
980 </pre></blockquote>
982 </li><li> <a name="cygwinrunpath">
983 The same rules for Win32 search of DLLs apply for Cygwin. If you
984 want to run some ACE programs from the Cygwin shell, you may
985 need to add the directory for <tt>libACE.dll</tt> to your PATH:
987 </a><blockquote><pre><a name="cygwinrunpath"> # export PATH=//c/work/cygwin/ACE_wrappers/ace:$PATH
988 </a></pre></blockquote>
990 <a name="cygwinrunpath"> If you are using MPC-generated Makefiles, then the DLLs have been
991 placed in the lib directory instead of ace and thus your PATH
992 addition would need to look like this:
994 </a><blockquote><pre><a name="cygwinrunpath"> # export PATH=//c/work/mingw/ACE_wrappers/lib:$PATH
995 </a></pre></blockquote>
998 </li></ol>
1000 <a name="cygwinrunpath"><b>ACE TESTS</b></a><p>
1002 <a name="cygwinrunpath">The tests are located in <tt>$ACE_ROOT/tests</tt>.
1003 After building the library, you can change to that directory and run
1004 make:
1006 </a></p><blockquote><pre><a name="cygwinrunpath"> % cd $ACE_ROOT/tests
1007 % make
1008 </a></pre></blockquote>
1011 <a name="cygwinrunpath">Once you build all the tests, you can run
1012 <code>run_tests.pl</code> in the
1013 <code>tests</code> directory to try all the tests:
1015 </a></p><blockquote><pre><a name="cygwinrunpath"> % perl run_test.pl
1016 </a></pre></blockquote>
1019 <a name="cygwinrunpath">If you are using ACE as a DLL, you will need to modify your PATH
1020 variable as explained </a><a href="#cygwinrunpath">above</a>.
1022 </p><p>
1023 You may want to check <tt>$ACE_ROOT/tests/README</tt> for the status
1024 of the various tests on Cygwin and the different Windows flavors.
1025 </p>
1027 <p></P>
1028 <hr align=left width="50%">
1031 <H2><a name="interix">Building and Installing ACE on Win32 with Interix</H2>
1032 <P>Interix comes with a BSD style make; you need GNU make.
1033 Make builds easily under Interix or there is a prebuilt
1034 package at: </P>
1035 <P><A
1036 href="http://www.interopsystems.com/tools/warehouse.htm">http://www.interopsystems.com/tools/warehouse.htm</A> </P>
1037 <P>If you are building for a machine without a network
1038 card, you may want to check <A href="#win32nonic" ><FONT color=#0000ff>here</FONT></A> first. </P>
1039 <P>This port was built and tested under Interix 3.5. a.k.a.
1040 <A href="http://www.microsoft.com/windows/sfu/">Windows
1041 Services for UNIX 3.5.</A></P>
1042 <P>To build follow the <A href="#unix_traditional" >Traditional ACE/GNU Make
1043 Configuration</A> instructions replacing the following include directives:</P>
1044 <P><TT>#include
1045 "ace/config-win32-interix.h"</TT> </P>
1046 <P>for the config.h header </P>
1047 <P>and: </P>
1048 <P><TT>include
1049 $(ACE_ROOT)/include/makeinclude/platform_win32_interix.GNU</TT></P>
1050 <P>for your platform_macros.GNU file.</P>
1051 <P>ACE should build fine with just '<TT>make</TT>', the only other option tried thus far is
1052 '<TT>make static_libs_only=1</TT>' which also works. Any
1053 other options may not work.</P>
1054 <P><b>ACE TESTS</B> </P>
1055 <p>The tests are located in <TT>$ACE_ROOT/tests</TT>. After building the library, you can
1056 change to that directory and run make: </P>
1057 <P><TT>% cd $ACE_ROOT/tests </TT><BR><TT>% make </TT>
1058 <p>Once you build all the tests, you can run <code>run_test.pl</CODE> in the <code>tests</CODE> directory to try all the tests: </P>
1059 <P><TT>% run_test.pl </TT></P>
1060 <p>If you are using ACE as a shared library, you will need
1061 to modify your LD_LIBRARY_PATH as explained in<A href="#unix_traditional" ><FONT color=#800080>Traditional ACE/GNU Make Configuration</FONT></A>. </P>
1062 <p></P>
1064 <p></p><hr align="left" width="50%"><p>
1065 </p><h2><a name="vxworks">Building and Installing ACE on VxWorks</a></h2>
1066 For the most part, you should be able to follow the instructions above
1067 to build ACE and applications that use it. Start with the
1068 <a href="#unix">Unix instructions</a> above to build ACE and the
1069 applications that use it. Please see below for more information on
1070 <a href="#VxWorks/NT">building ACE on NT hosts for VxWorks targets</a>.<p>
1072 A few notes on VxWorks builds (thanks to
1073 <a href="mailto:Paul_von_Behren@stortek.com">Paul von Behren</a> and
1074 <a href="https://www.remedy.nl">Remedy IT</a> for these notes):</p>
1076 </p><ul>
1077 <li>VxWorks builds are done with a cross compiler, i.e., the compiles
1078 are done on a workstation creating object modules which are
1079 downloaded and loaded into the VxWorks target system.<p>
1080 </p></li><li>C++ object modules must be post-processed by a VxWorks
1081 utility called "munch" to set up calls to static constructors and destructors.
1082 ACE integrates the makefile includes/rules files
1083 distributed with VxWorks to achieve maximum compatibility and reuse the target
1084 specifications and buildcommands defined by Windriver itself.
1085 The original ACE support for VxWorks included a perl script called
1086 <a href="bin/ace_ld">$ACE_ROOT/bin/ace_ld</a>,
1087 which was called from the Makefiles, replacing
1088 the traditional <code>ld</code> step. Although this script is currently still
1089 available it is not used anymore.<BR>
1090 You must have perl installed to use <code>ace_ld</code>. If perl is not on your path, you'll
1091 have to set <code>PERL_PATH</code> to the full path (including
1092 perl.exe), either in your
1093 <code>$(ACE_ROOT)/include/makeinclude/platform_macros.GNU</code>
1094 or in your environment.<p>
1095 </p></li><li>Wind River provides GCC/G++ cross-compilers for the
1096 supported target platforms. The executables are named cc&lt;target&gt;
1097 and g++&lt;target&gt;; for example, ccppc and g++cpp for PowerPC
1098 targets.<p>
1099 </p></li></ul>
1101 You'll have to let ACE know the target type at compile time. There
1102 are several ways to do this; please see the
1103 <code>$ACE_ROOT/include/makeinclude/platform_vxworks5.5.x.GNU</code>
1104 platform file for detailed information.<p>
1106 The VxWorks platform_vxworks*.GNU files are set up so that shared
1107 libraries are not built on VxWorks, by default. Only static
1108 libraries, with .a extension, are built. Therefore, it's not
1109 necessary to set the LD_LIBRARY_PATH environment variable on your host
1110 system when building for VxWorks targets. Please note, however, if
1111 you use TAO on VxWorks that you will need to set your LD_LIBRARY_PATH
1112 to find the TAO IDL compiler libraries (installed in the ace
1113 directory) on the host.</p><p>
1115 These non-default VxWorks kernel configuration <code>#defines</code>
1116 are required with ACE:</p><p>
1118 </p><pre>#define INCLUDE_CPLUS /* include C++ support */
1119 #define INCLUDE_CPLUS_IOSTREAMS /* include iostreams classes */
1120 #define INCLUDE_POSIX_ALL /* include all available POSIX functions */
1121 </pre>
1123 For completeness, here are the non-default <code>#defines</code> that
1124 we used for VxWorks 5.3.1/g++ 2.7.2:
1126 <pre>#define INCLUDE_CPLUS /* include C++ support */
1127 #define INCLUDE_CPLUS_IOSTREAMS /* include iostreams classes */
1128 #define INCLUDE_CONFIGURATION_5_2 /* pre-tornado tools */
1129 #define INCLUDE_DEBUG /* pre-tornado debugging */
1130 #define INCLUDE_LOADER /* object module loading */
1131 #define INCLUDE_NET_SYM_TBL /* load symbol table from network */
1132 #define INCLUDE_SYM_TBL_SYNC /* synchronize host and target symbol tables */
1133 #define INCLUDE_NFS /* nfs package */
1134 #define INCLUDE_PING /* ping() utility */
1135 #define INCLUDE_POSIX_ALL /* include all available POSIX functions */
1136 #define INCLUDE_RDB /* remote debugging package */
1137 #define INCLUDE_RLOGIN /* remote login */
1138 #define INCLUDE_RPC /* rpc package */
1139 #define INCLUDE_SECURITY /* shell security for network access */
1140 #define INCLUDE_SHELL /* interactive c-expression interpreter */
1141 #define INCLUDE_SHOW_ROUTINES /* show routines for system facilities*/
1142 #define INCLUDE_SPY /* spyLib for task monitoring */
1143 #define INCLUDE_STARTUP_SCRIPT /* execute start-up script */
1144 #define INCLUDE_STAT_SYM_TBL /* create user-readable error status */
1145 #define INCLUDE_SYM_TBL /* symbol table package */
1146 #define INCLUDE_UNLOADER /* object module unloading */
1147 #define INCLUDE_WINDVIEW /* WindView command server */
1148 </pre>
1150 Also, automatic construction/destruction of static objects
1151 should be enabled.<p>
1153 If you use TAO, it's also a good idea to increase the
1154 <code>NUM_FILES</code> parameter from its default of 50 to,
1155 say, 1000.</p><p>
1157 Please note that those VxWorks kernel configuration parameters
1158 are set in the VxWorks configAll.h file. You must rebuild your
1159 VxWorks kernel after modifying that file.</p><p>
1161 If you're first getting started with ACE and/or VxWorks, I recommend
1162 just building the ACE library and tests first. (Some of the ACE
1163 examples, in System_V_IPC, don't build on VxWorks yet.) Then try
1164 running the tests. Please see $ACE_ROOT/tests/README for the latest
1165 status of the ACE tests on VxWorks.</p><p>
1167 Please note that the <code>main</code> entry point is renamed to
1168 <code>ace_main</code> (configurable via ACE_MAIN) on VxWorks with g++,
1169 to comply with its restriction against using <code>main</code>.
1170 In addition, ACE_HAS_NONSTATIC_OBJECT_MANAGER is enabled by default
1171 to cleanly support construction and destruction of static objects.
1172 Please see the <a href="#NonStaticObjectManager">Non-static
1173 ACE_Object_Manager</a> discussion for the important implication
1174 of this feature.</p><p>
1176 ACE threads (VxWorks tasks) can be named, for example, by supplying a
1177 non-null argument to the Thread_Manager spawn routines. However,
1178 names beginning with <code>"==ace_t=="</code> are forbidden because
1179 that prefix is used internally by ACE.</p><p>
1181 You can spawn a new task to run <code>ace_main</code>, using either
1182 VxWorks <code>sp</code>, or ACE'S <a name="spa"><code>spa</code></a>.
1183 <code>spa</code> can be used from the VxWorks shell to pass arguments
1184 to <code>ace_main</code>. Its usage is:
1186 </p><pre><code>
1187 spa ace_main, "arg1" [, ...]
1188 </code></pre>
1190 All arguments must be quoted, even numbers. You can start also ace_main
1191 without spawning another thread by using:<p>
1193 </p><pre><code>
1194 spaef ace_main, "arg1" [, ...]
1195 </code></pre>
1197 ACE also provides the function <code>vx_execae</code> which is capable of running
1198 <code>ace_main</code> in a separate thread, wait for the task to finish and return
1199 the return code from <code>ace_main</code>:
1201 <pre><code>
1202 int vx_execae (FUNCPTR acemain,char* arguments, int prio = 0, int opt = 0, int stacksz = 0);
1203 </code></pre>
1205 You could call this from the VxWorks shell like:
1206 </p>
1207 <pre><code>
1208 my_rc = vx_execae ace_main, "-o server.ior -ORBDottedDecimalAddresses 1"
1209 </code></pre><p>
1211 When <code>prio</code>, <code>opt</code> or <code>stacksz</code> are omitted or specified
1212 as <code>0</code> default values will be used. See the VxWorks shell documentation for the
1213 defaults for <code>prio</code> and <code>opt</code>. For <code>stacksz</code> the default is
1214 <code>ACE_NEEDS_HUGE_THREAD_STACKSIZE</code>.
1215 The <code>arguments</code> string will be parsed and passed on to <code>ace_main</code> as
1216 a regular <code>argc</code> and <code>argv</code>.</p><p>
1218 Be aware of the fact that when you execute <code>ace_main</code> directly from the VxWorks
1219 shell argc will be zero and argv* will also be zero. Using <code>argv[0]</code> will not return
1220 the program name, but will result in a crash.<br>
1221 The ACE helper functions <code>spa</code>, <code>spaef</code> and <code>vx_execae</code> prevent
1222 this problem by building a regular <code>argc</code> and <code>argv</code> which also contain a
1223 valid <code>argv[0]</code> element.</p>
1225 <h3><a name="VxWorks/SharedLibs">Building Shared Libraries for VxWorks</a>.</h3>
1227 <strong>NOTE</strong>: Since VxWorks support is currently being reworked with
1228 an initial focus on static builds the support for shared builds is momentarily
1229 broken. This will be remedied(!) as soon as possible.<p>
1231 ACE supports shared libraries for VxWorks, but only with the g++
1232 compiler. To build shared libraries instead of the default static
1233 libraries, added <code>shared_libs_only=1</code> to either your
1234 <code>ACE_wrappers/include/makeinclude/platform_macros.GNU</code> or
1235 your <code>make</code> invocation. Then, be sure to load the ACE (and
1236 any other) shared library before loading your executable(s).</p><p>
1238 A shared library for VxWorks uses the same code as for a static
1239 (non-shared) library. However, calls to static constructors/
1240 destructors are added. The code in the shared library <strong>must</strong>
1241 be reentrant if you shared it between programs (tasks). The
1242 ACE library meets this requirement.</p><p>
1244 Shared libraries reduce build time, executable size, and load
1245 time of the executable. But, you must manually load the shared
1246 library before loading your executable(s) with a command such as:
1247 </p><pre><code>
1248 -&gt; ld &lt; libACE.so
1249 </code></pre>
1250 Shared libraries can be unloaded the same way an executable
1251 (module) is unloaded.<p>
1253 <strong>NOTE</strong>: Shared libraries on VxWorks aren't the same as
1254 shared libraries on other operating systems. In particular, there is
1255 no support for creating copies of writeable global (static) data in
1256 the shared library. This includes the singleton ACE_Object_Manager
1257 instance pointer. If you share global data between separate programs,
1258 they may not work properly. See the discussion of shared code and
1259 reentrancy in the VxWorks' <em>Programmers Guide</em>.</p><p>
1261 Instead of trying to run separate programs onto a VxWorks target, we
1262 recommend creating just one program, and spawning a thread for each
1263 task. The TAO IDL_Cubit test <a href="TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp">collocation
1264 test</a> is a good example.</p><p>
1266 </p><h3><a name="VxWorks/LinkToKernel">Linking ACE and/or TAO Libraries into the VxWorks Kernel</a>.</h3>
1268 It's easy to link your ACE and/or TAO libraries into the VxWorks kernel.
1269 Just build <a href="#VxWorks/SharedLibs">shared versions</a>, but
1270 disable the munch step. The easiest way to do that is to set the
1271 <code>LD</code> make variable to the name of your linker. For
1272 example, to build a libACE.so for PowerPC that can be linked into
1273 the kernel:
1274 <pre>% cd $ACE_ROOT/ace
1275 % make LD=ldppc shared_libs_only=1
1276 </pre>
1277 After building the shared lib, link it into the kernel by setting
1278 the <code>MACH_EXTRA</code> make variable in the kernel configuration
1279 Makefile. Then, build the kernel using <code>make exe</code>.<p>
1281 </p><h3><a name="VxWorksTestScript">Using the one-button ACE tests with VxWorks</a>.</h3>
1283 It is possible to generate a script to execute all ACE tests. You can do this by executing
1284 </a></p><blockquote><pre><a name="vxworksscript">% perl run_test.pl -v -o > run_test.vxworks
1285 </a></pre></blockquote>
1287 The ACE tests write their output files in a directory named
1288 <code>log/</code>, below the current (<code>tests</code>) directory.<br/>
1289 </p>
1291 To run the tests from the build directory on an NT host where you crossbuild your
1292 VxWorks ACE/TAO you can set up the Target Server File System (TSFS) in your Target Server
1293 configuration. If you f.i. set the root for the TSFS to the root directory of your builddisk
1294 you can set the default directory for the target by issueing the following command
1295 from a Host shell: '@cd "/tgtsvr/{path to ACE}/ACE_wrappers/tests"'.
1296 The '@' addition makes sure this command is executed for the target environment and not the
1297 local host shell environment.
1298 If you also issue the command 'cd {path to ACE}/ACE_wrappers/tests' you can execute the
1299 generated one button testscript like: '&lt; run_test.vxworks'.
1300 </p>
1302 Running the ACE tests automatically from the ACE autobuild tool using Target Server and Host
1303 shell options is also supported.
1304 </p>
1306 If you don't have NFS included in your VxWorks kernel, you can use these steps, provided by
1307 <a href="mailto:clarence_m_weaver@md.northgrum.com">Clarence M. Weaver</a>,
1308 to run the tests and capture their output:</p><p>
1309 </p><ol>
1310 <li>What I did was create a log directory on the boot NT host of my VxWorks
1311 target.<p>
1312 </p></li><li>I copied all the test applications and the run_test.vxworks script to
1313 the parent of the log directory.<p>
1314 </p></li><li>Using the target shell not the host shell, I "cd" to the directory
1315 containing the script and test programs.<p>
1316 </p></li><li>Invoked the script using <code>&lt; run_test.vxworks</code> from this target shell.<p>
1317 </p></li></ol>
1319 <a href="mailto:Kirk.Davies@pobox.com">Kirk Davies</a> provided this
1320 approach for running the ACE tests on Tornado II:
1322 <ul>
1323 <li>Under Tornado II, I set up the Target Server File System (TSFS), and
1324 the test logs get written to the log subdirectory under that.<p>
1325 </p></li><li>You have to set an environment variable before running the tests:
1326 <pre>putenv("ACE_TEST_DIR=/tgtsvr")
1327 </pre><p>
1328 </p></li></ul>
1330 </p><h3><a name="VxWorks/NT">Building ACE on Tornado/NT hosts for VxWorks targets</a>.</h3>
1331 The following, very useful information was contributed by
1332 <a href="http://people.qualcomm.com/cryan">Chris Ryan</a>
1333 and <a href="mailto:Paul_von_Behren@stortek.com">Paul von Behren</a>.
1334 Please submit corrections, additions, or clarifications to the
1335 the <a href="mailto:ace-users@list.isis.vanderbilt.edu">ACE mailing list</a>.<p>
1337 <strong>NOTE:</strong>The make (version 3.74) that is provided with
1338 Tornado 2.2 cannot be used to build ACE. A working version is available
1339 from the WindRiver support site, download the
1340 <a href="https://secure.windriver.com/cgi-bin/windsurf/downloads/view_binary.cgi?binaryid=838">
1341 make3_80.gvk_patches</a> and the
1342 <a href="https://secure.windriver.com/cgi-bin/windsurf/downloads/view_binary.cgi?binaryid=100340">
1343 make3_80.tor2_2.new_dependency_rules</a> package and install them.</p><p>
1345 Using the Cygnus tools, this approach works:
1346 </p><ul>
1347 <li>You'll build both your NT and VxWorks executables in the same
1348 workspace (directory hierarchy). This works because the NT
1349 compiler and ACE's Makefiles put their output in different
1350 directories.<p>
1351 </p></li><li>Set up your
1352 <code>ACE_wrappers/include/makeinclude/platform_macros.GNU</code>
1353 as usual for VxWorks. See
1354 <a href="include/makeinclude/platform_vxworks5.5.x.GNU">the
1355 g++/VxWorks platform file</a> for more information.<p>
1356 </p></li><li>Create an <code>ACE_wrappers/ace/config.h</code> file that looks
1357 something like the following.
1358 <pre>#if defined (_MSC_VER) || defined (__BORLANDC__)
1359 # include "ace/config-win32.h"
1360 #else
1361 # include "ace/config-vxworks5.x.h"
1362 #endif
1363 </pre><p>
1364 </p></li><li>Set your <code>ACE_ROOT</code>, <code>CPP_LOCATION</code>,
1365 <code>WIND_BASE</code>, and <code>WIND_HOST_TYPE</code> environment
1366 variables.<p>
1367 </p></li><li>Build for NT, then build for VxWorks.<p>
1368 </p></li></ul>
1370 A few additional Windows Notes, from Paul von Behren:<p>
1371 </p><ul>
1372 <li>Cygnus has created a Win32 API which is compatible with a
1373 "generic" Unix environment. Using this library, they have ported a
1374 large collection of GNU tools to WinNT/95 - including a port of
1375 gcc/g++. See <a href="http://www.cygnus.com/misc/gnu-win32/">http://www.cygnus.com/misc/gnu-win32/</a>
1376 A related link is <a href="ftp://ftp.cygnus.com/pub/gnu-win32/latest/">ftp://ftp.cygnus.com/pub/gnu-win32/latest/</a><p>
1377 </p></li><li>To set up the command-prompt build environment, run
1378 <code>Tornado\host\x86-win32\bin\TorVars.bat</code>. This is done
1379 implicitly within the Tornado IDE.<p>
1380 </p></li><li>To run <code>ace_ld</code>, you still need perl installed -
1381 see <a href="https://www.activestate.com/products/perl">ActiveState Perl</a>
1382 or <a href="http://strawberryperl.com">Strawberry Perl</a>.<p>
1383 </p></li><li>The Tornado IDE will use a standard Makefile for project
1384 builds, but does not have a GUI interface for managing the
1385 Makefile. By default, it will use rules from Makefile in the current
1386 directory and you can configure it to add certain Makefile
1387 targets to the project. If you have <code>ACE_ROOT</code> defined
1388 before starting Tornado, you can specify an ACE Makefile as a Tornado
1389 target and Tornado will then call make from the menu.<p>
1390 </p></li></ul>
1392 And Chris Ryan's instructions for building for VxWorks targets
1393 on Windows NT hosts:
1395 <ol>
1396 <li>Path setting that seems to be working is:<p>
1397 </p><pre> /tornado/host/x86-win32/bin:
1398 /tornado/host/x86-win32/lib/gcc-lib/i386-wrs-vxworks/cygnus-2.7.2-960126:
1399 /tornado/host/x86-win32/i386-wrs-vxworks/bin:
1400 /ace/ace_wrappers/bin:
1401 /gnuwin32/b18/H-i386-cygwin32/bin:
1402 /gnuwin32/b18/tcl/bin:
1403 /WINNT/system32:
1404 /WINNT:
1405 /WINNT/system32/nls/ENGLISH:
1406 /bin
1407 </pre>
1409 Other environment variables:<p>
1410 </p><pre> WIND_BASE=/tornado
1411 SHELL=/bin/sh.exe
1412 TERM=pcbios
1413 TAO_ROOT=/ace/ACE_wrappers.vxworks/TAO
1414 CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.EXE
1415 GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/
1416 WIND_HOST_TYPE=x86-win32
1417 ACE_ROOT=/ace/ACE_wrappers.vxworks
1418 </pre>
1420 </li><li><code>/tornado</code> is the root of the Tornado install
1421 (<code>$WIND_BASE</code>).
1423 </li><li><code>/gnuwin32</code> is the root of a Cygnus GNU download and install.
1425 </li><li><code>/bin</code> content is:<p>
1426 </p><pre> aced.dll
1427 cygwin.dll
1428 perl.exe
1429 rm.exe
1430 sh.exe
1431 true
1432 </pre>
1434 <code>aced.dll</code> is produced in an ACE NT source tree according to
1435 documented procedure for Windows VC++ ACE build.
1437 <code>cygwin.dll</code> is from the Cygnus GNU software download and install.
1439 </li><li>Basically, follow documented procedure for ACE build/install on UNIX
1440 platform. Create a <code>$ACE_ROOT/ace/config.h</code> that looks
1441 like:<p>
1442 </p><pre> #include "config-vxworks5.x.h"
1443 </pre>
1445 And create a
1446 <code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code>
1447 that looks like:<p>
1448 </p><pre>
1449 WIND_BASE = /tornado
1450 WIND_HOST_TYPE = x86-win32
1451 CPU = I80486
1452 include $(ACE_ROOT)/include/makeinclude/platform_vxworks5.5.x.GNU
1453 </pre>
1455 </li><li>When using cygnus windows GNUTools on WinNT you have to start
1456 make with "--unix" option, otherwise WinNT shell cmd.exe is responded and
1457 not sh.exe, i.e.,
1458 <pre> make --unix static_libs_only=1
1459 </pre>
1460 </li></ol>
1462 <h3>TAO on NT Tornado host, VxWorks target.</h3>
1464 <ol>
1465 <li>Build ACE and TAO_IDL in the NT tree as already documented.
1466 Be sure to build ACE's gperf on NT, in
1467 <code>ACE_wrappers/apps/gperf/src</code>.<p>
1469 </p></li><li>Build $TAO_ROOT/tao
1470 <pre> CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe
1471 cd $TAO_ROOT/tao
1472 /gnuwin32/b18/H-i386-cygwin32/bin/make
1473 </pre>
1475 </li><li>Build orbsvcs.
1476 <pre> CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe
1477 cd $TAO_ROOT/orbsvcs/orbsvcs
1478 /gnuwin32/b18/H-i386-cygwin32/bin/make
1479 </pre>
1481 </li><li>Build $TAO_ROOT/tests<p>
1482 </p></li></ol>
1485 <h3><a href="mailto:Jaffar_Shaikh@Mitel.COM">Jaffar Shaikh's</a>
1486 Notes for Building ACE and TAO for VxWorks on NT host</h3>
1487 <b></b><p><b>Scenario:</b> I was building the ACE and TAO for VxWorks
1488 on NT. The target system was a PPC860 based chassis and another a NT
1489 host based card.</p>
1490 <b><p>Host System:</p>
1491 </b><p>NT 4.0 workstation with 128 M RAM, 266MHz Pentium.</p>
1493 <b><p>Software Needed For Building TAO</p>
1494 </b><p>1) <a href="https://www.activestate.com/products/perl">ActiveState Perl</a>
1495 or <a href="http://strawberryperl.com">Strawberry Perl</a>
1496 </p>
1498 <p>2) Tornado 2.2.1 from Windriver.</p>
1500 <p>3) Cygwin GNU to build TAO. It is available for NT as a freeware
1501 from the <a href="http://www.cygwin.com">Cygwin</a> site</p>
1502 <p>The Cygwin Make (version 3.75) can only build the TAO not the
1503 Tornado II make (version 3.74)</p>
1505 <b><p>Environment Variables:</p>
1506 </b><p>On NT the environment Variables are set as follows, (from
1507 Control Panel-&gt; System -&gt; Environment)</p>
1508 <p>I added following Environment variable entries to PATH </p>
1510 <pre>
1511 C:\Perl\bin\;
1512 C:\tornado\host\x86-win32\bin;
1513 C:\tornado\host\x86-win32\powerpc-wrs-vxworks\bin;
1514 C:\tornado\host\x86-win32\lib\gcc-lib\powerpc-wrs-vxworks\cygnus-2.7.2-960126;
1515 C:\Corba\Ace_wrappers\bin;
1516 C:\Cygwin\bin;
1517 C:\Cygwin\usr\bin;
1518 C:\bin
1519 </pre>
1521 <p>Additional Environmental variables and the values,</p>
1522 <pre>
1523 CPU=PPC860
1524 LD_LIBRARY_PATH=
1525 SHELL=/bin/sh.exe
1526 ACE_ROOT=/Corba/ACE_wrappers
1527 WIND_BASE=/tornado
1528 SHELL=/bin/sh.exe
1529 TERM=pcbios
1530 TAO_ROOT=/Corba/ACE_wrapper/Tao
1531 CPP_LOCATION=/Program Files/Microsoft Visual Studio/VC98/Bin/CL.exe
1532 GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/
1533 WIND_HOST_TYPE=x86-win32
1534 PERL_PATH=/perl/bin/perl.exe
1535 </pre>
1537 <b><p>Directories of importance</p>
1538 </b><p>C:\Corba &lt;-- Ace_wrappers (uzipped)</p>
1539 <p>C:\tornado &lt;-- Tornado installed</p>
1540 <p>C:\Perl &lt;-- Perl installed</p>
1541 <p>C:\Cygwin &lt;-- Cygwin installed</p>
1542 <p>C:\bin &lt;-- Copy these files,</p>
1543 <p> Ace.dll, &lt;-- After you build Ace</p>
1544 <p> gperf.exe &lt;-- After you build gperf</p>
1545 <p> Cygwin1.dll, &lt;-- After you install Cygwin</p>
1546 <p> perl.exe, &lt;-- After you install Perl</p>
1547 <p> rm.exe &lt;-- After you install Cygwin</p>
1548 <p> sh.exe &lt;-- After you install Cygwin</p>
1549 <p> true &lt;-- After you install Cygwin</p>
1550 <b><p>Create Files</p>
1551 </b><p>1) C:\Corba\ACE_Wrappers\ace\config.h</p>
1552 <p>with entry</p>
1553 <pre>
1554 #if defined (_MSC_VER) || (__BORLANDC__)
1555 #include "ace/config-win32.h"
1556 #else
1557 #define ACE_HAS_IP_MULTICAST
1558 #include "ace/config-vxworks5.x.h"
1559 #endif
1560 </pre>
1562 <p>2) C:\Corba\ACE_wrappers\include\makeinclude\platform_macros.GNU</p>
1563 <pre>
1564 WIND_BASE = /tornado
1565 WIND_HOST_TYPE = x86-win32
1566 include $(ACE_ROOT)/include/makeinclude/platform_vxworks5.5.x.GNU
1567 ACE_COMPONENTS=FOR_TAO (you may choose this option to build ACE library that supports TAO)
1568 </pre>
1570 <p></p>
1571 <b><p>Steps to Build</p>
1572 </b><p>1) Build Ace.dll under NT</p>
1573 <p>In MS Visual C++ open C:\Corba\ACE_wrappers\ace.sln And build Ace
1574 DLL</p>
1575 <p>Copy Ace.dll in C:\bin</p>
1577 <p>2) Build gperf utility under NT</p>
1578 <p>In MS Visual C++ open
1579 C:\Corba\ACE_wrappers\apps\gperf\src\gperf.sln. Build gperf.exe</p>
1580 <p>Copy gperf.exe to C:\bin</p>
1582 <p>3) Mount Directries in Cygwin</p>
1583 <p>Click on Cygnus Solutions -&gt; Cygwin Bash Shell</p>
1584 <p>Mount following directories by using mount command.</p>
1585 <p>create respective directories first then use mount command </p>
1587 <p>e.g. Create /Corba directory then use $mount -s "C:\Corba"
1588 /Corba</p>
1590 <p>C:\Corba mount to /Corba</p>
1591 <p>C:\tornado mount to /tornado</p>
1592 <p>C:\Perl mount to /perl</p>
1593 <p>C:\Cygwin mount to /cygwin</p>
1594 <p>C:\bin mount to /bin</p>
1595 <p>C:\Program Files mount to /Program Files </p>
1597 <p>4) Build ACE in Cygwin</p>
1598 <p>$cd /Corba/ACE_wrappers/ace </p>
1599 <p>$make static_libs_only=1</p>
1600 <p>This will build your ace library libACE.a for VxWorks. If you use
1601 option shared_libs_only=1 then the build will be libACE.so. The other
1602 options are same as follows.</p>
1604 <p>5) Build TAO in Cygwin</p>
1605 <p>$cd $TAO_ROOT/tao</p>
1606 <p>$make debug=0 optimize=1 static_libs_only=1 minimum_orb=1
1607 </p>
1608 <p>for shared libs use shared_libs_only=1</p>
1610 <p>The minimum Tao does not have following components,</p>
1611 <p>Dynamic Skeleton Interface</p>
1612 <p>Dynamic Invocation Interface</p>
1613 <p>Dynamic Any</p>
1614 <p>Interceptors</p>
1615 <p>Interface Repository</p>
1616 <p>Advanced POA features</p>
1617 <p>CORBA/COM interworking</p>
1619 <p>You may play around with above options to find suitable build for
1620 your needs. For example when you give option debug=1 all the debug
1621 symbols will be created and the build will huge in size. The debug
1622 symbols are necessary when you want to debug your code.</p>
1624 <hr align="left" width="50%">
1626 <h2><a name="android">Building and Installing ACE on Android</a></h2>
1628 <ul>
1629 <li><a href="#android-target">Choosing the Target</a></li>
1630 <li><a href="#android-toolchain">Generating a Toolchain (Optional)</a></li>
1631 <li><a href="#android-building">Building</a></li>
1632 <li><a href="#android-install">Installing ACE on Android</a></li>
1633 <li><a href="#android-logging">Logging</a></li>
1634 <li><a href="#android-openssl">OpenSSL</a></li>
1635 </ul>
1637 <p>ACE can be built for Android by using the <a
1638 href="https://developer.android.com/ndk/">Android Native Development Kit
1639 (NDK)</a>. This is different than the standard way of writing Android
1640 applications in Java which run the on the Android Runtime or the older Dalvik
1641 Virtual Machine. Applications and libraries built using the NDK are native
1642 Linux applications written in C or C++ specifically compiled to run on Android
1643 systems and libraries can be included in normal Android apps. In addition,
1644 applications and libraries built using the NDK have access to Android-specific
1645 APIs much like the ones available to Java-based Android applications.
1646 </p>
1648 <p><b>NOTE: ACE requires NDK r18 or later. Building with the NDK directly requires NDK r19 or later.</b></p>
1650 <div class="boxed">
1651 <p><b>Windows Users:</b> These instructions are written for a Unix based
1652 platform like Linux, but can also be used on Windows. If you are using an
1653 virtualized Linux environment like Windows Subsystem for Linux (WSL), Docker,
1654 or a traditional VM, then you can use the Linux version of the NDK and ignore
1655 rest of this note and all the other Windows specific notes.
1656 </p>
1658 <p>If that is not the case, you should also pay attention to the notes marked
1659 with "<b>Windows Users:</b>" in addition to the rest of the instructions. In
1660 addition to the Windows version of the Android NDK, you will also need
1661 <a href="https://www.msys2.org">MSYS2 for Unix utilities that ACE needs</a>.
1662 </div>
1664 After downloading the NDK, you will have to decide on what target you want to
1665 build for, which is covered in the next section, then decide if you want to
1666 build directly using the NDK or using
1667 <a href="#android-toolchain">a generated standalone toolchain</a>. Generating a
1668 toolchain is optional and only really makes sense if you're building for just
1669 one architecture/API level pair and don't need to keep the entire NDK around.
1671 <h3><a name="android-toolchain">Choosing the Target</a></h3>
1673 <p>To build ACE for Android you need to know the specific Android target you
1674 want. The specific target is defined by two things:</p>
1676 <dl class="indent">
1677 <dt>- The minimal API level to target.</dt>
1678 <dd>A lower level means larger amount of potential users but also
1679 potentially less features. Android has <a
1680 href="https://source.android.com/setup/start/build-numbers">many API levels
1681 to target</a>. They roughly correspond to the versions of Android.
1682 </dd>
1683 <dt>- The CPU architecture to target (Also called the Application Binary
1684 Interface or ABI by the NDK documentation).</dt>
1685 <dd>In addition to ARM, Android also supports x86 and MIPS,
1686 although support for MIPS has been dropped from the NDK. <a
1687 href="https://developer.android.com/ndk/guides/abis">This is the official
1688 documentation on the ABIs</a>. These are the ABIs that ACE supports at the
1689 time of writing and must be passed to ACE as <code>android_abi</code>:
1690 <!-- Check to see if any architectures have been added or removed. If so
1691 update this list and the table below as well-->
1692 <dl id="android_abis">
1693 <dt><code>armeabi-v7a</code></dt>
1694 <dd>32-bit ARM. Builds with NEON extensions enabled by default. Include
1695 <code>android_neon := 0</code> in your <code>platform_macros.GNU</code>
1696 if you want to support processors without NEON support.</dd>
1697 <dt><code>arm64-v8a</code></dt>
1698 <dd>64-bit ARM, Sometimes referred to as <code>aarch64</code>.</dd>
1699 <dt><code>x86</code></dt>
1700 <dd>32-bit x86</dd>
1701 <dt><code>x86_64</code></dt>
1702 <dd>64-bit x86</dd>
1703 </dl>
1704 <p><b>
1705 It should be noted that starting in August 2019, the Google Play
1706 Store will require new apps to have 64-bit libraries if they have native
1707 libraries. 32-bit native libraries will still be supported but apps must
1708 also have 64-bit libraries. Look up any restrictions that may affect apps
1709 you want to publish on the Play Store, including targeted API level
1710 requirements.
1711 </b></p>
1712 </dd>
1713 </li>
1714 </dl>
1716 <h3><a name="android-toolchain">Generating a Toolchain (Optional)</a></h3>
1718 <p>To generate a toolchain, one use must use
1719 <code>build/tools/make_standalone_toolchain.py</code> in the NDK. A destination must be
1720 chosen and is denoted here as <code>$TOOLCHAIN</code>. For example, to generate a
1721 toolchain targeting 32-bit ARM Android 7.0 "Nougat" (API Level 24) and later: </p>
1722 <p class="indent">
1723 <code>./make_standalone_toolchain.py --arch arm --api 24 --install-dir $TOOLCHAIN</code>
1724 </p>
1725 <p><code>$TOOLCHAIN/bin</code> must be in your <code>$PATH</code> when building ACE and
1726 applications using ACE.</p>
1728 <p>This table shows how the <code>android_abi</code> variable and the
1729 <code>--arch</code> argument correlate:</p>
1730 <table class="indent" id="android_abi_toolchain_table">
1731 <tr>
1732 <th><code>android_abi</code></th>
1733 <th><code>--arch</code></th>
1734 </tr>
1735 <tr>
1736 <td><code>armeabi-v7a</code></td>
1737 <td><code>arm</code></td>
1738 </tr>
1739 <tr>
1740 <td><code>arm64-v8a</code></td>
1741 <td><code>arm64</code></td>
1742 </tr>
1743 <tr>
1744 <td><code>x86</code></td>
1745 <td><code>x86</code></td>
1746 </tr>
1747 <tr>
1748 <td><code>x86_64</code></td>
1749 <td><code>x86_64</code></td>
1750 </tr>
1751 </table>
1753 <div class=boxed>
1754 <p><b>Windows Users:</b>
1755 Android NDK includes Python in <code>prebuilt\windows-x86_64\bin</code> for
1756 64-bit Windows NDKs. For the example above, assuming <code>%NDK%</code> is the
1757 location of the NDK and <code>%TOOLCHAIN%</code> is the desired location of the
1758 toolchain, run this command instead:</p>
1760 <p class="indent">
1761 <code>
1762 %NDK%\prebuilt\windows-x86_64\bin\python.exe
1763 %NDK%\build\tools\make_standalone_toolchain.py
1764 --arch arm --api 24
1765 --install-dir %TOOLCHAIN%</code>
1766 </p>
1768 <p>For Windows <code>%TOOLCHAIN%\bin</code> and the location of the MSYS2
1769 utilities must be in <code>%PATH%</code> when cross compiling ACE. The default
1770 location for these would be <code>C:\msys64\usr\bin</code>.
1771 </div>
1773 <h3><a name="android-building">Building</a></h3>
1775 <ul>
1776 <li>
1777 If building TAO, build the ACE and TAO tools (<code>ace_gperf</code> and
1778 <code>tao_idl</code>) for the host. Follow the <a
1779 href="../TAO/TAO-INSTALL.html">cross compilation setup instructions provide
1780 in TAO-INSTALL.html</a>.
1781 <div class="boxed indent">
1782 <p><b>Windows Users:</b> If cross compiling TAO and the host tools were
1783 built using using Visual Studio, make sure <code>cl.exe</code> can be run
1784 from the environment when building for Android, as <code>tao_idl</code>
1785 will need to use it as a C preprocessor.
1786 </div>
1787 </li>
1788 <li>Setup the Android build<ul>
1789 <li>Create <code>ace/config.h</code>: <code>#include "ace/config-android.h"</code></li>
1790 <li>Create <code>include/makeinclude/platform_macros.GNU</code>:
1791 <ul>
1792 <li>
1793 Set <code>android_abi</code> to one of
1794 <a href="#android_abis">the options above</a>.
1795 If using a standalone toolchain this must match the
1796 <code>--arch</code> argument used according
1797 to <a href="#android_abi_toolchain_table">the table above</a>.
1798 </li>
1799 <li>If using the NDK directly, set <code>android_ndk</code> to the
1800 location of the extracted NDK and <code>android_api</code> to the API
1801 level desired.</li>
1802 <li>Set options for debug and optimization options as desired.</li>
1803 <li>If you want to compile static, add <code>static_libs_only:=1</code></li>
1804 <li>Must include <code>include $(ACE_ROOT)/include/makeinclude/platform_android.GNU</code>.</li>
1805 <li>
1806 If building TAO, set the <code>tao_idl</code> options specified in
1807 the cross compiling instructions in <code>TAO-INSTALL.html</code>
1808 </li>
1809 </ul>
1810 </ul>
1811 </li>
1812 </li>
1813 <li>Generate makefiles (if necessary).</li>
1814 <li>Build with GNU make. If using a standalone toolchain, make sure you
1815 have <code>$TOOLCHAIN/bin</code> in your <code>$PATH</code>.
1816 <div class="boxed indent"><p>
1817 <b>Windows Users:</b> If using a standalone toolchain,
1818 Make sure you have <code>%TOOLCHAIN%\bin</code>
1819 and MSYS2's <code>bin</code> in your <code>%PATH%</code> when building.
1820 If you are cross compiling TAO you will also need a preprocessor for
1821 <code>tao_idl</code> available (See Windows note above).</p>
1822 </div>
1823 </li>
1824 </ul>
1825 </p>
1827 <h3><a name="android-install">Installing ACE on Android</a></h3>
1829 <p>Native applications using the ACE library can be installed onto devices by
1830 several different methods. The files can be include as assets of Java
1831 application and can be written by the Java application into it's executable
1832 program directory. The native application can be downloaded by a Java
1833 application and written into the Java applications executable program
1834 directory. The native application can also be uploaded using the Software
1835 Development Kit's ADB tool. This method requires uploading the native
1836 application to a directory that allows execution and having any output
1837 directed to a writable directory.</p>
1839 <h3><a name="android-logging">Logging</a></h3>
1841 On Android, <code>ACE_Log_Msg</code> (and therefore <code>ACE_DEBUG</code> and
1842 <code>ACE_ERROR</code>) uses Android's logging system (aka Logcat) by default
1843 in addition to <code>stderr</code> because <code>stdout</code> and
1844 <code>stderr</code> are discarded under normal circumstances. To disable this
1845 at runtime, run:
1846 </p>
1848 <pre class="indent">
1849 ACE_LOG_MSG-&gt;clr_flags (ACE_Log_Msg::SYSLOG);
1850 </pre>
1852 <p>To disable this at compile time include these lines in <code>config.h</code>:</p>
1854 <pre class="indent">
1855 #define ACE_DEFAULT_LOG_FLAGS ACE_Log_Msg::STDERR
1856 #define ACE_DEFAULT_LOG_BACKEND_FLAGS 0
1857 </pre>
1859 <h3><a name="android-openssl">OpenSSL</a></h3>
1861 Depending on the features of ACE, TAO, or other software desired, you might need
1862 OpenSSL. On Android, OpenSSL isn't part of the NDK Library and Android
1863 preloads the system SSL library (either OpenSSL or BoringSSL) for the Java
1864 Android API. This means OpenSSL <b>MUST</b> be statically linked to avoid
1865 conflicts with the almost certianly incompatible system SSL library.
1867 To build OpenSSL for Android, please read <code>NOTES.ANDROID</code> that comes
1868 with OpenSSL's source code. The static libraries will used if the shared
1869 libraries are not found. This can be accomplished by either disabling the
1870 generation of the shared libraries by passing <code>no-shared</code> to
1871 OpenSSL's <code>Configure</code> script or just deleting the so files after
1872 building OpenSSL.
1873 </p>
1875 <hr>
1876 <h1><a name="svcsinstall">Building and Installing ACE Network Services</a></h1>
1878 The following explains how to build the ACE <a href="http://www.dre.vanderbilt.edu/~schmidt/ACE-netsvcs.html">network services</a> on <a href="#unixsvcs">UNIX</a> and <a href="#win32svcs">Win32</a>.
1880 <p></p><hr align="left" width="50%"><p>
1881 </p><h2><a name="unixsvcs">Building and Installing ACE Network Services on UNIX</a></h2>
1883 Building and installing ACE Network Services on UNIX is relatively
1884 simple (the <a href="#win32svcs">process</a> for Win32 is different).
1885 Here's what you need to do:<p>
1887 </p><ol>
1889 <li>Build and install ACE on UNIX as described <a href="#unix">earlier</a>. If ACE is built at the root of the ACE
1890 source tree (and ACE has been ported to your platform, of course) the
1891 netsvcs static and shared object libraries should be built
1892 automatically. In addition, the server driver program
1893 (<code>main</code>) contained in <a href="netsvcs/servers/main.cpp">$ACE_ROOT/netsvcs/servers/main.cpp</a>
1894 should also be compiled and ready to run.<p>
1896 </p></li><li>Set your <code>LD_LIBRARY_PATH</code> environment variable to
1897 where the binary version of the ACE netsvcs library. For
1898 example, you probably want to do something like the following<p>
1900 </p><pre><code>
1901 % setenv LD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib:$LD_LIBRARY_PATH
1902 </code></pre><p>
1904 </p></li><li>By default, if the shared object library is built, the services
1905 are linked into the <code>main</code> driver program dynamically.
1906 To specify which services should be linked in and executed, edit the
1907 <a href="netsvcs/servers/svc.conf">$ACE_ROOT/netsvcs/servers/svc.conf</a>
1908 file. During your editing, you should update information (such as the
1909 default service port numbers) that affects the initialization of
1910 services in this file. Refer to the
1911 <a href="http://www.dre.vanderbilt.edu/~schmidt/ACE-papers.html#config">Service Configurator</a>
1912 documentation to learn how the configuration file is parsed and
1913 how the services are dynamically linked and executed. In
1914 addition, refer to the <a href="http://www.dre.vanderbilt.edu/~schmidt/ACE-netsvcs.html">Network
1915 Services</a> documentation to learn more about how to configure
1916 each network service.<p>
1918 </p></li><li>If you only want to link the services statically, simply remove
1919 or rename the svc.conf file.<p>
1920 </p></li></ol>
1922 <p></p><hr align="left" width="50%"><p>
1923 </p><h2><a name="win32svcs">Building and Installing ACE Network Services on Win32</a></h2>
1925 Once again, there are supplied project for Visual C++ 7.1 or later for
1926 the Network Services.<p>
1928 </p><hr>
1929 <h1><a name="sslinstall">Building and Installing the ACE_SSL Library</a></h1>
1931 <p>The first step for all platforms is to build and install the
1932 <a href="http://www.openssl.org/">OpenSSL</a> distribution. The
1933 ACE_SSL library must then be built according to the instructions
1934 below.</p>
1935 <h2>Unix</h2>
1936 <ol>
1937 <li>Make sure the OpenSSL header file directory is in your compiler's
1938 include path, and that OpenSSL libraries are in your library link/load
1939 path (e.g. <code>LD_LIBRARY_PATH</code>). If you
1940 installed OpenSSL into a set of directories unknown by the compiler,
1941 set the <code>SSL_ROOT</code> environment variable to point to the
1942 top level directory of your OpenSSL distribution, i.e. the one
1943 containing OpenSSL's <code>include</code> and <code>lib</code>
1944 directories.</li>
1945 <li>Build ACE as described above. When building ACE, add
1946 <code>ssl=1</code>
1947 to your <code>make</code>
1948 command line invocation, or add it to your
1949 <code>platform_macros.GNU</code> file.</li>
1950 <li>Build the ACE_SSL library in the <tt>$ACE_ROOT/ace/SSL</tt>
1951 directory. The <code>ACE_ROOT</code> environment variable should be set
1952 prior to this point.</li>
1953 </ol>
1954 <h2>Microsoft Visual Studio</h2>
1955 <ol>
1956 <li>Set the <code>SSL_ROOT</code> environment variable to the location
1957 of the directory containing the OpenSSL <code>inc32</code> and
1958 <code>out32dll</code> directories.
1959 <li>Add <code>ssl=1</code> to your MPC
1960 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
1961 or <code>$ACE_ROOT/local.features</code> file.
1962 <li>At the moment you are using OpenSSL v1.1 or
1963 newer also add <code>openssl11=1</code> to your MPC
1964 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
1965 or <code>$ACE_ROOT/local.features</code> file.
1966 <li>Re-run MPC to add
1967 support for building the ACE_SSL library to your MSVC++
1968 workspaces and projects.
1969 <li>Open the <code>ACE.sln</code> solution, and refer to the ACE build
1970 and installation instructions above for details on creating a
1971 <code>config.h</code> configuration header for this platform. Once
1972 the <code>config.h</code> file has been created, build the
1973 <code>ACE_SSL</code> project.</li>
1974 </ol>
1975 <h2>Embarcadero C++</h2>
1976 <p>Support for building ACE's ACE_SSL library and TAO's SSLIOP
1977 pluggable protocol with Embarcadero C++ does exist.
1978 <ol>
1979 <li>Set the <code>SSL_ROOT</code> environment variable to the location
1980 of the directory containing the OpenSSL <code>inc32</code> and
1981 <code>out32</code> directories.
1982 <li>Add <code>ssl=1</code> to your MPC
1983 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
1984 or <code>$ACE_ROOT/local.features</code> file, and re-run MPC to add
1985 support for building the ACE_SSL library to your Embarcadero C++ makefiles.
1986 <li>Build ACE and TAO.
1987 </ol>
1988 </p>
1990 <hr><p>
1991 </p><h1><a name="guireactor_install">Building and Using GUI Reactors Libraries</a></h1>
1992 There is a general method for building and using <code>ACE_Reactors</code> for various GUI
1993 libraries.
1994 <h2> Building GUI Reactor Library </h2>
1995 <ol>
1996 <li>Try to generate build files using MPC. Inspect the output of MPC to find out which features are
1997 necessary to build given reactor. Add these features to
1998 <code>ACE_wrappers/bin/MakeProjectCreator/*.features</code> file, or pass them directly to MPC
1999 using <code>-features</code> command line option. For example, for <code>FlReactor</code> the procedure
2000 consists of five steps
2001 <ol>
2002 <li> In the first pass one gets that <code>x11</code> (X11 libraries) is missing.<br>
2003 <code>$ mwc.pl -type gnuace
2004 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires x11.
2005 </code></li>
2006 Ensure that <code>X11</code> libraries are installed, then pass <code>x11=1</code> feature to MPC.
2007 <li>In the second pass one gets that <code>gl</code> (OpenGL library) is missing.<br>
2008 <code>$ mwc.pl -type gnuace -features x11=1 ace.mwc
2009 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires gl.
2010 </code></li>
2011 Ensure that <code>OpenGL</code> libraries are installed, then pass <code>gl=1</code> feature to MPC.
2012 <li>In the third pass one gets that <code>fl</code> (Fast Light Toolkit) is missing.<br>
2013 <code>$ mwc.pl -type gnuace -features x11=1,gl=1 ace.mwc
2014 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires fl.
2015 </code></li>
2016 Ensure that <code>Fast Light Toolkit</code> libraries are installed, then pass <code>fl=1</code>
2017 feature to MPC.
2018 <li>In the fourth pass one gets that <code>ace_flreactor</code> feature is missing<br>
2019 <code>$ mwc.pl -type gnuace -features x11=1,gl=1,fl=1 ace.mwc
2020 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires ace_flreactor.
2021 </code></li>
2022 Allow MPC to generate makefiles for <code>FlReactor</code> by setting <code>ace_flreactor=1</code> feature.
2023 <li>In the last pass one obtains files for building <code>FlReactor</code>.<br>
2024 <code>$ mwc.pl -type gnuace -features x11=1,gl=1,fl=1,ace_flreactor=1 ace.mwc
2025 </code></li>
2026 </ol>
2027 Currently to simplify MPC generation some of features are turned on by default in
2028 <code>ACE_wrappers/bin/MakeProjectCreator/global.features</code>. For examples to generate
2029 files related with Fl one has to provide only fl=1 feature. To obtain a more fine grained controll
2030 over MPC generation process one may modify <code>ACE_wrappers/bin/MakeProjectCreator/*.features</code>
2031 files.
2032 </li>
2033 <li> Required build files are generated now, it is enough then to invoke build tool.
2034 For example for under <code>MPC::gnuace</code> one has to call
2035 <code>make fl=1</code>. For <code>MPC::vc7</code> target all features are
2036 encoded in generated project files, thus it is enough to compile ACE using MSVC.
2037 </li>
2038 </ol>
2039 The build procedure leads to a specific GUI Reactor library. For example, for
2040 <code>Qt</code> and <code>Linux </code> one gets <code>libQtReactor.so</code>, while for
2041 <code>Windows</code> the results are shared <code>QtReactor.dll</code> and import
2042 <code>QtReactor.lib</code> libraries or their variants depending on build options.
2043 When compiling TAO also GUI related libraries are created like <code>libTAO_QtResource.so</code>.
2044 <h2> Using GUI Reactor Library </h2>
2045 Here one has at least three use cases:
2046 <ol>
2047 <li><b>Applications with their own build system.</b>
2048 To use ACE support for GUI one has to include specific GUI headers and
2049 link with specific <code>ACE_[GUI]Reactor</code> library. When using TAO support for GUI one has
2050 also to link with specific <code>TAO_[GUI]Resource</code> library.</li>
2051 <li><b>Applications with build system using MPC.</b>
2052 In general, it is better to create specific base projects for using ACE GUI support in such application.
2053 Base projects provided by ACE <code>ACE_wrappers/bin/MakeProjectCreator/[ace,tao]_[gui][reactor,resource].mpb</code>
2054 may be an examples of how to do this.</li>
2055 <li><b>Internal ACE applications like tests or examples.</b>
2056 MPC project for internal ACE application using GUI support should be derived from
2057 <code>ace_[gui]reactor.mpb</code> base projects. To employ TAO support for GUI one should derive
2058 the project from <code>tao_[gui]resource.mpb</code> These base projects ensure that all necessary libraries
2059 are linked to the application, specifies features necessary to build a project and moreover impose a
2060 build order consistant with ACE. For example, the application project using <code>XtReactor</code> should be
2061 derived from <code>ace_xtreactor.mpb</code>.</li>
2062 </ol>
2063 <h2>Notes on specific GUI Reactors</h2>
2064 <ul>
2065 <li> <code>QtReactor</code></li>
2066 The build is controlled by <code>ace_qtreactor</code> [1 by default] feature.
2067 To build this reactor one has to provide feature <code>qt</code> [0 by default] (Qt library). Moreover,
2068 it is assumed that <code>Qt</code> was installed in a standard way
2069 and <code>QTDIR</code> points to <code>Qt</code> installation folder. To build TAO
2070 support for <code>Qt</code> one should use <code>tao_qtresource</code> [1 by default] feature.
2071 <li> <code>XtReactor</code></li>
2072 The build is controlled by <code>ace_xtreactor</code> [1 by default] feature.
2073 To build this reactor one has to provide the following features: <code>x11</code> [1 by default]
2074 (X11 libraries) and <code>xt</code> [1 by default] (X11 Toolkit).
2075 Moreover, some examples and tests related with <code>XtReactor</code>
2076 needs additionall features namely either <code>motif</code> [0 by default] (Motif/Lesstif libraries) or
2077 <code>athena</code> [0 by default] (Athena widgets). To build TAO
2078 support for <code>xt</code> one should use <code>tao_xtresource
2079 </code> [1 by default] feature.
2080 <li> <code>TkReactor</code></li>
2081 The is controlled by <code>ace_tkreactor</code> [1 by default] feature. To build this reactor one has to provide
2082 <code>tk</code> [0 by default] (Tcl libraries) feature. To build TAO
2083 support for <code>Tk</code> one should use <code>tao_tkresource</code> [1 by default] feature.
2084 <li> <code>FlReactor</code></li>
2085 The build is controlled by <code>ace_flreactor</code> [1 by default] feature.
2086 To build this reactor one has to provide the following features: <code>x11</code>
2087 [1 by default] (X11 libraries),
2088 <code>gl</code> [1 by default] (OpenGl) and <code>fl</code>
2089 [0 by default] (Fast Light Toolkit). To build TAO
2090 support for <code>Fl</code> one should use <code>tao_flresource</code> [1 by default] feature.
2091 <strong>MS Windows:</strong> The paths to <code>fltkdll</code> and
2092 <code>OpenGL32</code> libraries, as well as <code>fltk</code> header files
2093 should be setup manually for succesfull compilation. Obviosuly,
2094 <code>x11</code>switch is ignored for this platform.</li>
2095 </ul>
2097 <hr>
2098 <h1><a name="installnotes">Installation Notes</a></h1>
2100 <ul>
2101 <li><b>Windows (Windows NT, 2000, XP, 2003, etc., and Windows '9x/ME) </b><p>
2103 Please see the <a href="#NonStaticObjectManager">Non-static
2104 ACE_Object_Manager</a> discussion below.</p><p>
2106 </p></li><li><b>Windows CE</b><p>
2108 Take a look at (<a href="docs/CE-status.txt">CE-status.txt</a>) for
2109 up-to-date information about ACE on Windows CE and Windows Mobile.
2111 </p></li><li><b> Solaris 7, 8, 9, and 10 using Sun ONE Studio 8 (C++ 5.5)
2112 or higher, Centerline C++ 2.x, GNU gcc 2.95 and
2113 later.</b><p>
2115 All the source code and tests should build and run without any
2116 problems on Solaris 7, 8, and 9 platforms using the above
2117 Sun C++ compilers.
2119 There are likely to be build problems with older versions or
2120 different patchlevels of Sun C++. Likewise, on
2121 Solaris with g++ you may need to use GNU as instead of
2122 /usr/ccs/bin/as, if you want -gstabs+ and -pipe support.
2124 Thanks to Susan Liebeskind &lt;shl@janis.gtri.gatech.edu&gt;
2125 for providing the following useful information:</p><p>
2127 By default, ACE uses both the Solaris and POSIX thread
2128 interface. To disable use of the Solaris thread interface, add
2129 <code>-D_POSIX_PTHREAD_SEMANTICS</code> to the
2130 <code>CFLAGS</code> in your
2131 <code>$(ACE_ROOT)/include/makeinclude/platform_macros.GNU</code>.
2132 See the Solaris Intro (3) man page for more information.</p><p>
2134 To disable ACE thread support completely, build with the
2135 <code>threads=0</code> make flag. See the <a href="#flags">Makefile Flags</a> section below for more
2136 information on make flags.</p><p>
2138 If you use g++ on Solaris 7, you might need to rebuild
2139 it on a SunOS 5.7 (Solaris 7) host. Some versions of g++
2140 provide replacements for system header files. The
2141 replacements on older SunOS systems are not compatible with the
2142 SunOS 5.7 system headers. </P>
2144 </li><li><b>AIX</b><p>
2146 ACE is currently supported on AIX 5.2 and higher using IBM's
2147 Visual Age C++ 6 and XL C++ 7 compilers as well as g++ 3.2.</p><p>
2149 The <code>ace/config-aix-5.x.h</code> file is recommended for all
2150 compilers on all AIX 5L versions. The Asynchronous I/O functionality
2151 is disabled by default because its use requires the system administrator
2152 to explicitly enable it in the kernel using SMIT. If this has been
2153 done and you want to enable asynchronous I/O support in ACE, add:
2154 <code>#define ACE_HAS_AIO_CALLS</code> to your <code>config.h</code>
2155 file before including <code>ace/config-aix-5.x.h</code>.</p><p>
2157 The Visual Age 6.0.0.3 and 6.0.0.4 do have some bugs that makes
2158 them unusable for building TAO. TAO has been tested with 6.0.0.12 and
2159 had no problems with that version.</p><p>
2161 For your <code>platform_macros.GNU</code> file, you should use
2162 <code>platform_aix_ibm.GNU</code> when building ACE with any of the
2163 IBM compilers and <code>platform_aix_g++.GNU</code> when building ACE
2164 with g++.</p><p>
2166 BTW, here's a technique from Rob Jordan &lt;<a href="mailto:jordan@hursley.ibm.com">jordan@hursley.ibm.com</a>&gt;
2167 that can reduce the size of the ACE libraries by about one
2168 third, and can also be applied to applications. It works by
2169 optimising the sharing of template functions, which are created
2170 in an "unusual" way under AIX. It also speeds up
2171 compilation.</p><p>
2173 Here's how to optimise the ACE library generation:</p><p>
2175 Look at the <a href="ace/GNUmakefile.ACE">ace/GNUmakefile.ACE</a>
2176 in <code>$ACE_ROOT/ace</code>. Create a file called
2177 <code>ACE_All_Src.cpp</code>, and add a line to #include
2178 each of the source files
2179 listed under <code>FILES=</code> in the GNUmakefile. Create a
2180 file called <code>ACE_All_Tmp.h</code>
2181 and add a line to #include each of the .h files listed under
2182 <code>TEMPLATE_FILES=</code> in the GNUmakefile. Now update the
2183 GNUmakefile so that
2184 <code>FILES=ACE_All_Src</code> and
2185 <code>TEMPLATE_FILES=ACE_All_Tmp</code>.</p><p>
2187 </p></li><li><b><a name="Linux">Linux</a></b><p>
2189 ACE has been ported to Linux on
2190 Intel, Alpha, and PowerPC platforms. If you use a RedHat 5.x
2191 distribution, it's best to use RedHat 5.1 or later. ACE works
2192 without any modifications on RedHat 5.1 and later, and on
2193 Debian 2.1 on both Intel and Alpha. Use the
2194 <code>platform_linux.GNU</code> and <code>ace/config-linux.h</code>
2195 in your <code>platform_macros.GNU</code> and
2196 <code>config.h</code> files, respectively. The same
2197 files can be used on PowerPC, with LinuxPPC
2198 1999 (R5), with glibc 2.1.1.</p><p>
2200 If you run out of memory, it's easy to add virtual memory on
2201 Linux. Please see the <code>mkswap</code> man page. You'll
2202 need at least 256 to 300 Mb of virtual memory (RAM + swap) to
2203 compile all of ACE+TAO. The <a href="#resource_requirements">System
2204 Resource Requirements section</a> has some suggestions on how
2205 to reduce the memory requirement.</p><p>
2207 The glibc 2.0 dynamic loader isn't thread safe. If you want to
2208 use the Invocation API you'll have to set
2209 <code>LD_BIND_NOW=true</code>. If you want to use
2210 <code>dlopen</code>, you should use <code>RTLD_NOW</code>. The
2211 dynamic loader in glibc 2.1 is thread safe.</p><p>
2213 <strong>NOTE:</strong> The TAO NameService uses IP multicasting
2214 by default, though it is not required. IP multicast on Linux
2215 requires the following:</p><p>
2217 </p><ul>
2218 <li>Enable IP multicast in the Linux kernel. It is enabled in
2219 the default RedHat 5.1 kernel. In older distributions, you
2220 can enable it by rebuilding your kernel with CONFIG_IP_MULTICAST
2221 enabled.<p>
2222 </p></li><li>Enable IP multicast in ACE. It is enabled by default in
2223 <code>ace/config-linux.h</code>. If you don't use
2224 IP multicast, add <code>#define ACE_HAS_IP_MULTICAST 0</code>
2225 to your <code>ace/config.h</code> before building ACE.<p>
2226 </p></li><li>There must be a network interface that is up and supports
2227 multicast. If you have linuxconf, it's easiest to use that
2228 to add a network route for multicast (224.0.0.0) on one of
2229 your network interfaces, such as <code>eth0</code>. If
2230 you don't have or use linuxconf, try adding a multicast
2231 routing table entry using something like this:<p>
2232 </p><pre> <code># route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0</code>
2233 </pre><p>
2234 </p></li></ul>
2236 Some of the ACE tests fail on older, pre-glibc2 Linux platforms,
2237 such as RedHat 4.2. The problems are with threads and
2238 thread-specific storage.</p><p>
2240 </p></li><li><b>SCO UNIX</b><p>
2242 ACE has been ported to SCO UNIX using the GNU g++ 2.7.2
2243 compiler. Arturo Montes &lt;<a href="mailto:mitosys@colomsat.net.co">mitosys@colomsat.net.co</a>&gt;
2244 maintains this code. In addition, he also maintains a version
2245 of <a href="http://www.cs.wustl.edu/%7Eschmidt/ACE_wrappers/FSU-threads.tar.gz">FSU pthreads</a>.</p><p>
2247 </p></li><li><b>SGI IRIX 5.x and 6.x</b><p>
2249 ACE used to build fine using the SGI C++ and GNU GCC compilers
2250 for IRIX 5.x. It has been ported to IRIX 6.x using the SGI
2251 MipsPro 7.1 C++ compiler; be aware that in IRIX 6.2 there is a
2252 number of patches that have to be installed and exceptions
2253 appear to fail with the O32 ABI. Please check the config files
2254 for the details.</p><p>
2256 </p></li><li><b>OSF/1 3.2 and 4.0 (a.k.a. Digital UNIX 4.0)</b> <p>
2258 The Digital UNIX C++ 5.4 through 5.7 compilers have problems
2259 with ACE's templates. They compile the lib and most of the test
2260 programs, although they warn about template usage. Most tests
2261 run, some dump core. If you use a 5.x version of cxx, be sure
2262 to set the CXX_VER variable to CXX_5, either on your make
2263 command line or in an environment variable. The ACE Makefiles
2264 assume by default that the cxx version is 6.x or later.</p><p>
2266 CXX 6.0 and 6.1 are much improved over 5.x: V6.0-020, V6.1-025,
2267 and later build all of ACE cleanly. All of the tests in
2268 $(ACE_ROOT)/tests run successfully with CXX 6.0 and CXX 6.1.
2269 Please note that problems have been reported with some versions
2270 of CXX 6.1, notably versions -021 and earlier. It's best to use
2271 V6.1-022 or later.</p><p>
2273 NOTE: if you use Digital UNIX 4.0f or later, you <strong>must</strong>
2274 use <code>ace/config-tru64.h</code> instead of
2275 <code>ace/config-osf1-4.0.h</code>. <code>ace/config-tru64.h</code>
2276 can be used for all supported compilers on any version of
2277 Digital UNIX after and include 4.0. And, with 4.0f and later when
2278 using Digital CXX, you <strong>must</strong> use
2279 <code>include/makeinclude/platform_tru64_cxx.GNU</code> instead of
2280 <code>include/makeinclude/platform_osf1_4.0.GNU</code>.</p>
2282 </li><li><b> FreeBSD </b><p>
2284 FreeBSD is a fast evolving platform. However, it has the
2285 advantage of having standard releases. At this moment, ACE is
2286 only perodically tested against -stable (3.1R) and we rely a lot
2287 on FreeBSD users' feedbacks. </p><p>
2289 Notice that on older FreeBSD, <code>ld.so</code> only looks for
2290 so libraries with <b>version number</b> appended. ACE makefiles
2291 create symlinks for most shared libraries if
2292 <code>versioned_so</code> is defined to 1 in
2293 <code>$ACE_ROOT/ace</code> with appropriate ACE version.
2294 However, this does not work for libACE.so itself so you have to
2295 create it manually (If you figure out how to do this, please let
2296 us know) like this: </p><p>
2298 <code>ln -sf $ACE_ROOT/ace/libACE.so $ACE_ROOT/ace/libACE.so.4.5</code></p><p>
2300 On newer FreeBSD (3.0 or later,) this is no longer necessary.</p><p>
2302 </p></li><li><b>NetBSD</b><p>
2304 Like older FreeBSD, NetBSD's <code>ld.so</code> also requires
2305 versioned .so files.</p><p>
2307 </p></li><li><b>OpenBSD</b><p>
2309 ACE has been ported to OpenBSD 3.1 and GNU g++ 2.95.3.</p><p>
2311 As with FreeBSD and NetBSD, OpenBSD requires versioned .so
2312 files. This is currently handled by the build files and no
2313 additional work is needed.</p><p>
2315 ACE has been ported to OpenBSD with and without pthreads
2316 enabled. When using pthreads, though, C++ exceptions must be
2317 disabled. This is a known problem with the current release of
2318 OpenBSD (see www.openbsd.org, bug #1750). ACE emulated
2319 exceptions work fine.</p><p>
2321 Compiling TAO may require the user data segment size
2322 restrictions and possibly other options to be increased. This
2323 is done by modifying the default user class in /etc/login.conf
2324 or by adding a new class and modifying the master passwer file
2325 accordingly.</p><p>
2327 </p></li><li><b> UnixWare </b> <p>
2329 Steve Huston &lt;<a href="mailto:shuston@riverace.com">shuston@riverace.com</a>&gt;
2330 has ported ACE to work with UnixWare 2.01 and g++.</p><p>
2332 Ganesh Pai &lt;<a href="mailto:gpai@voicetek.com">gpai@voicetek.com</a>&gt;
2333 subsequently did the port for version 2.1.2, also with g++.</p><p>
2335 Phil Mesnier &lt;<a href="mailto:mesnier_p@ociweb.com">
2336 mesnier_p@ociweb.com</a>&gt; updated the port to support
2337 UnixWare 7.1.0, with help from Michael Meissnitzer
2338 &lt;<a href="mailto:michael.meissnitzer@siemens.at">
2339 michael.meissnitzer@siemens.at</a>&gt;, Christian Klepp &lt;
2340 <a href="mailto:christian.klepp@siemens.at">christian.klepp@siemens.at
2341 </a>&gt; and Engelbert Staller &lt;<a href="mailto:engelbert.staller@siemens.at">
2342 engelbert.staller@siemens.at</a>&gt;
2343 Building ACE (and TAO) on Unixware 7.1.0 requires a very specific
2344 g++ build environment. In particular, you must build and install
2345 g++ 2.95.2, along with binutils 2.9.1. The order (and the declaration
2346 of configuration) is extremely important. Using the gcc compiler
2347 provided on the Skunkware CD on a pentium system, here is the recipe
2348 I used to build a working environment (as root):<br>
2349 </p><pre> mkdir /usr/local/newgnu
2350 &lt; ftp and untar binutils-2.9.1 &gt;
2351 &lt; ftp and untar gcc-2.95.2 &gt;
2352 mkdir -p build/binutils build/gcc
2353 cd build/binutils
2354 ../../binutils-2.9.1/configure i386-sco-sysv4
2355 gmake # takes a long time
2356 gmake install # this creates /usr/local/i386-sco-sysv4/...
2357 mkdir /usr/local/i486-pc-sysv5/bin
2358 cd /usr/local/i486-pc-sysv5/bin
2359 for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
2360 #links all the newly installed utilities
2362 cd /usr/local/newgnu/build/gcc
2363 ../../gcc-2.95.2/configure --with-gnu-as --with-gnu-ld
2364 gmake bootstrap # takes a long time
2365 gmake install
2366 mkdir /usr/local/i586-UnixWare7.1.0-sysv5/bin
2367 for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
2368 </pre>
2369 Once done, ACE and TAO will successfully build and link.<p>
2371 </p></li><li><b><a name="LynxOS">LynxOS</a></b><p>
2373 ACE builds and runs properly on LynxOS 4.0 for Intel
2374 and PowerPC targets. LynxOS 2.x and 3.x are no longer supported.
2376 If you run out of memory on LynxOS, these might help:</p><p>
2378 </p><ul>
2379 <li>Increase the limits in <code>/etc/starttab</code>,
2380 then reboot system. We use these limits:
2381 <pre># Data, stack, and core file limits (in Kbytes)
2382 80000
2383 16000
2384 102400</pre><p>
2385 </p></li><li>Enable or expand virtual memory, with something like:
2386 <pre># mkcontig /swap 320
2387 # prio 17 vmstart /swap</pre>
2388 See the <code>mkcontig</code> and <code>vmstart</code>
2389 man pages, and <code>/bin/rc</code>.<p>
2390 </p></li></ul>
2392 Please see the comments in the
2393 <a href="include/makeinclude/platform_lynxos.GNU">ACE
2394 platform_lynxos.GNU file</a> for information on, and an
2395 example of, tailoring for your particular platform.<p>
2397 NOTE: if you want to use IP multicast on LynxOS, be sure to add
2398 this line to your <code>/net/rc.network</code>, and reboot:</p><p>
2399 </p><pre><code>
2400 /bin/route add "224.0.0.0" "$my_name"
2401 </code></pre>
2403 </li><li><strong>VxWorks</strong><p>
2405 David Levine has
2406 ported ACE to VxWorks 5.2/5.3/5.3.1/5.4 with the GreenHills
2407 1.8.8/1.8.9, g++ and diab compilers that are distributed with
2408 VxWorks/Tornado. It is not possible to use VxWorks 5.4
2409 and earlier with ACE anymore because the compilers delivered with
2410 5.4 and earlier don't support the C++ features ACE needs.</p><p>
2412 At this moment <a href="https://www.remedy.nl">Remedy IT</a> is upgrading
2413 and stabilizing ACE/TAO support for Tornado 2.2/VxWorks 5.5.1.
2414 Since the existing support for previous VxWorks version has been unsupported
2415 and broken for some time and most (potential) users seem to have upgraded to
2416 VxWorks 5.5.1 no backporting effort is done. See also <a href="#vxworks">here</a>.
2417 </p><p>
2419 Tornado 2.2/VxWorks 5.5.1 support IP multicast. That is not enabled
2420 by default in ACE for VxWorks, because it depends on your
2421 kernel configuration. To enable it, add
2422 <code>#define ACE_HAS_IP_MULTICAST</code> to your
2423 <code>ace/config.h</code>.</p><p>
2425 NOTE: In order for the ACE Broadcast and Multicast tests to work the VxWorks kernel
2426 should receive the packages it sends out locally. By default this is not supported.
2427 To enable this behaviour you need to include the IFF_SIMPLEX flag for your required
2428 NIC driver. See the following Windriver <a href="https://secure.windriver.com/cgi-bin/windsurf/techtips/public/viewSum.cgi?4542">SPR 4542</a>
2429 for more information.</p><p>
2431 In addition to all of the other benefits of ACE, it helps work
2432 around some deficiencies with VxWorks. The problems are:</p>
2435 </p><ol>
2436 <li>The program entry point cannot be called "main" with g++. ACE
2437 renames it to "ace_main" (configurable via ACE_MAIN) on VxWorks.
2438 While this may seem trivial, it is important with legacy code.
2439 ACE itself ran into this problem.<p>
2441 </p></li><li>argc/argv isn't used with VxWorks entry points. ACE provides
2442 a wrapper function that transparently converts shell command
2443 line arguments to argc/argv form. See <a href="#spa">below</a>
2444 for details.<p>
2446 </p></li></ol>
2448 Please note that ACE uses one of the spare fields in the Wind
2449 River task control block, spare4, for thread-specific storage.
2450 This field is specified in only one place, in ace/OS_NS_Thread.inl, so it
2451 can easily be changed to one of the other spare fields, if
2452 necessary.</p><p>
2454 ACE destroys dynamically
2455 allocated singletons in the ACE library. But, they may not
2456 properly destroy some static objects. If you have trouble
2457 running a program multiple times, it may be necessary to unload
2458 the module, using unld, and reload it between runs.
2459 Alternatively, you could try calling <code>cplusDtors</code> and
2460 then <code>cplusCtors</code> between runs.</p><p>
2462 </p></li><li><b>MVS OpenEdition</b> <p>
2464 All of ACE has been ported to OpenEdition by Chuck Gehr &lt;<a href="mailto:gehr@sweng.stortek.com">gehr@sweng.stortek.com</a>&gt;.
2465 The ACE library, all the tests and most of the examples and apps
2466 build clean. There are still some problems that need to be
2467 ironed out:</p><p>
2469 MVS does not support the dynamic linking dl...() calls that the
2470 Service Configurator uses to dynamically link services at run
2471 time. As a result, all the examples and apps that use a svc.conf
2472 file (for dynamically configuring service objects) do not work,
2473 however, most of these apps can be built/run statically. Also,
2474 the Svc_Conf_l.cpp and Svc_Conf_y.cpp files are generated using
2475 flex and yacc on a ascii (not ebcdic) machine and as a result
2476 they don't work very well with ebcdic svc.conf files. We should
2477 be able to regenerate these files on MVS but MVS doesn't have
2478 flex. This is something that needs to be done.</p><p>
2480 Some of the tests do not execute properly. This is a minority
2481 and over time the goal is to get to 100%.</p><p>
2483 The make scheme for some of the apps still doesn't work
2484 perfectly on MVS. This is mainly due to the way shared
2485 libraries are handled on MVS. See <a href="#mvs">additional
2486 build tips for MVS</a> for more on this.</p><p>
2488 </p></li><li><strong>QNX Neutrino</strong><p>
2490 ACE has been ported to <a href="http://www.qnx.com/products/os/neutrino.html">QNX Neutrino
2491 2.0</a>. We cross-compile for Neutrino on a QNX4 host using g++
2492 2.8.1, using the <a href="ace/config-qnx-neutrino.h">ace/config-qnx-neutrino.h</a>
2493 and <a href="include/makeinclude/platform_qnx_neutrino.GNU">include/makeinclude/platform_qnx_neutrino.GNU</a>
2494 configuration files. Many of the ACE tests succeed, though some
2495 fail. As the porting effort progresses, we hope to eliminate
2496 these failures. If you know of fixes, please send them to
2497 us.</p><p>
2498 </p></li><li><strong>QNX RTP</strong><p>
2500 ACE has been ported to <a href="http://get.qnx.com/">QNX RTP
2501 </a>. We compile for QNX RTP using the GCC compiler shipped with the
2502 distribution, using the <a href="ace/config-qnx-rtp.h">ace/config-qnx-rtp.h</a>
2503 and <a href="include/makeinclude/platform_qnx_rtp_gcc.GNU">include/makeinclude/platform_qnx_rtp_gcc.GNU</a>
2504 configuration files.
2505 Many of the ACE tests succeed, though some
2506 fail. As the porting effort progresses, we hope to eliminate
2507 these failures. If you know of fixes, please send them to
2508 us.</p><p>
2509 <strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
2510 Under the current version of QNX RTP ACE fails if compiled with
2511 inline=0 . </p><p>
2513 </p></li><li><strong><a name="rtems">RTEMS</a></strong><p>
2515 The support for RTEMS has been revived from version x.5.4. This version
2516 was the first version that build again out of the box on RTEMS. Compilation
2517 and testing was done for RTEMS with and without networking support. The
2518 ACE GNU makefiles do automatically detect whether networking support
2519 is available or not.
2521 Besides the standard config.h/platform_macros.GNU file you will need
2522 to set <code>RTEMS_MAKEFILE_PATH</code> to point to the location
2523 of your RTEMS installation, see below for an example.</p>
2524 <p><code>export RTEMS_MAKEFILE_PATH=/opt/rtems/CPU-rtems/BSP</code></p>
2526 When building without network support you will need the ace_for_tao
2527 subsetting functionality enabled. For this add <code>ace_for_tao = 1</code>
2528 to your <code>bin/MakeProjectCreator/config</code> file and regenerate the
2529 GNU makefiles as described <a href="#power">here</a>.</p><p>
2531 </p></li><li><strong>PharLap ETS</strong><p>
2533 ACE has been ported to Ardence's
2534 <a href="http://www.ardence.com/embedded/products.aspx?ID=71">PharLap ETS</a>
2535 version 13. The port was originally done for Pharlap 9.1 and MSVC 6,
2536 but has been updated to Pharlap ETS 13 with Visual Studio .NET 2003
2537 (VC7.1).</p><p> To build for PharLap, you'll need to use MPC to
2538 generate .sln/.vcproj files with the ETS configurations. For example:
2539 <pre>
2540 cd \ace\ACE_wrappers
2541 perl bin/mwc.pl -type vc71 -relative ACE_ROOT=C:/ace/ACE_wrappers -relative TAO_ROOT=C:/ace/ACE_wrappers/TAO -value_template configurations='"ETS Debug"' -value_template configurations+='"ETS Release"' -name_modifier *_ETS TAO_ACE.mwc
2542 </pre>
2543 That command will generate the same .sln and .vproj files as for
2544 regular Windows builds with VC7.1, but they'll have names with an
2545 <code>_ETS</code> suffix and will include the "ETS Debug" and
2546 "ETS Release" configurations.</p><p>
2547 After generating the needed VC7.1 files, use the ace/config-pharlap.h
2548 configuration file, and the instructions
2549 for building on Windows. Building the ACE library is the same as
2550 for regular Windows platforms, except you choose one of the PharLap
2551 ETS configurations to build within Visual Studio.
2552 For an example of how to build binaries, see the tests directory.
2553 The tests_pharlap_msvc.lnk file is a LinkLoc commands file that the
2554 ACE tests are built with. It is likely that local sites may need
2555 to adjust this file for their target environment.
2556 </p><p>
2557 When executing programs on the target system, it is possible that not
2558 all of the VC++ support DLLs are resident on the target. In particular,
2559 the debug-supporting DLLs may not be present. If you require these, be
2560 sure to add those needed. For example, on the standard LabVIEW RT 8.2
2561 distribution using Pharlap ETS, the following DLLs must be copied to
2562 the target before being able to run Debug programs:
2563 <ul>
2564 <li>msvcp71d.dll</li>
2565 <li>msvcr71d.dll</li>
2566 </ul>
2567 </p><p>
2568 <note>To build ACE for National Instruments' LabVIEW RT, use
2569 the Pharlap ETS information above, but add the following line to your
2570 config.h file:
2571 <pre>
2572 #define ACE_PHARLAP_LABVIEW_RT
2573 </pre>
2574 This setting makes the necessary adjustments for LabVIEW's implementation
2575 of Pharlap ETS.</note>
2577 <note>By default, the ACE tests log their output/results to the
2578 system console on Pharlap ETS. To change this behavior and make the
2579 test output log to a file in the <code>log</code> directory under the
2580 current working directory while executing, add the following line to
2581 your config.h file:
2582 <pre>
2583 #define ACE_PHARLAP_TESTLOG_TO_FILE
2584 </pre>
2585 This setting has no affect on TAO tests which always write test output
2586 to stdout.
2587 </note>
2589 </p></li><li><strong>Mac OS X (10.2.x)</strong><p>
2591 </p><p>ACE builds and runs on Mac OS X 10.2.x, but the following are
2592 needed to build it:</p>
2594 <p>1. The latest version of the Apple Developer Tools
2595 (December 2002)</p>
2596 <p>2. The dlcompat library (obtained either through Fink or
2597 SourceForge)</p>
2599 <p>When creating $ACE_ROOT/ace/config.h for Mac OS X, you need
2600 to add the following if you obtained dlcompat via Fink:</p>
2602 <p>#define ACE_NEEDS_DL_UNDERSCORE</p>
2604 <p>You'll also need to do:</p>
2606 <p>setenv DYLD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib</p>
2607 <p>setenv MACOSX_DEPLOYMENT_TARGET 10.2</p>
2609 <p>Currently, all ACE tests pass except Process_Mutex_Test and
2610 MEM_Stream_Test. Also, Mac OS X doesn't yet support *nix
2611 aio_* calls, and ACE does not know anything about Mach.</p>
2613 <p>The work to port ACE to Mac OS X was done by several people,
2614 John Zorko
2615 &lt;<a href="mailto:j.zorko@att.net">j.zorko@att.net</a>&gt; is
2616 only one of them.</p>
2618 </p></li><li><strong>iPhone/iPod Touch/iPad</strong><p>
2620 </p><p>ACE builds and runs on the iPhone/iPod Touch/iPad Hardware
2621 and Simulator. Keep in mind that ACE/TAO needs to be built
2622 statically since Apple does not allow third party dynamic libraries
2623 to be deployed on the hardware. The following are needed to build ACE:</p>
2625 <p>1. The iPhone SDK.</p>
2626 <p>2. When creating $ACE_ROOT/ace/config.h, include
2627 config-macosx-iphone-hardware.h if you want to deploy on the
2628 hardware, include config-macosx-iphone-simulator.h if you want
2629 to deploy on the simulator. Even though those includes are named
2630 after the iPhone, the includes work for iPhone/iPod Touch, and iPad.</p>
2631 <p>3. You need to define two environment variables. The first is
2632 IPHONE_TARGET. Set IPHONE_TARGET to SIMULATOR if you want to deploy
2633 on SIMULATOR. Set IPHONE_TARGET to HARDWARE if you want to deploy on
2634 the hardware device.</p>
2635 <p>4. When creating $ACE_ROOT/include/makeinclude/platform_macros.GNU,
2636 include 'include $(ACE_ROOT)/include/makeinclude/platform_macosx_iphone.GNU'
2637 in the file.</p>
2641 </li></ul>
2644 <hr>
2645 <h2><a name="g++">Compiling ACE with GNU g++</a></h2>
2647 If you use the GNU GCC g++ compiler please note the following:
2649 <ul>
2650 </p></li><li>ACE/TAO needs g++ 4.8 or better. Older versions are not usable anymore<p>
2652 </p></li><li>Make sure to update your gcc <code>config.status</code>
2653 file. This file is produced when installing gcc; it specifies
2654 where to install the binary files that gcc uses. For example,
2655 it specifies whether to use Solaris's <code>/usr/ccs/bin</code>
2656 binary utils or GNU binary utils. The
2657 <code>config.status</code> file is an output of the gcc
2658 <code>configure</code> script; it is preferable to use the
2659 <code>--prefix</code> option to <code>configure</code> instead
2660 of hacking its output.<p>
2662 </p></li><li>If you are getting weird link errors when building libACE
2663 on Solaris you are probably using the GNU linker. Try using the
2664 Sun linker (/usr/ccs/bin/ld) instead. Note that gcc first looks
2665 for the GNU linker if it is installed along with gcc. The only
2666 way to not use the GNU linker is to delete it from the
2667 installation or to build your own compiler with no linker. Be
2668 aware that you still need the libraries and includes of gcc.<p>
2670 NOTE: if you do use the GNU linker, you might need to change
2671 the <code>-G</code> flag to <code>-shared</code> in
2672 the <code>SOFLAGS</code> definition in your
2673 <code>include/makeinclude/platform_macros.GNU</code>.</p><p>
2675 </p></li><li>Don't get too confused about contradictory statements in
2676 the gcc documentation. It was written by different
2677 people...<p>
2679 </p></li><li>Make sure that the linker invoked by gcc produces code
2680 that initializes static objects. Please see gcc's
2681 documentation for using <code>collect2</code>.<p>
2683 </p></li></ul>
2686 <hr><p>
2687 </p><h2><a name="minimum_build">What Do I Need to Build for TAO?</a></h2>
2688 Toshio Hori &lt;toshi@etl.go.jp&gt; provided these suggestions on building
2689 just what's needed for (a subset of) TAO:<p>
2691 I usually make:
2692 </p><pre> $ACE_ROOT/ace,
2693 $ACE_ROOT/apps/gperf,
2694 $TAO_ROOT/tao,
2695 $TAO_ROOT/TAO_IDL, and
2696 $TAO_ROOT/orbsvcs/orbsvcs
2697 </pre>
2698 and the whole make takes less than an hour on my Solaris 7 for intel,
2699 Pentium-III/550MHz, 256MB memory, 512MB swap machine. (Top secret: I
2700 renice the 'make' process to the highest priority, -20... ;-)
2702 To save time and space, I set
2703 <pre> TAO_ORBSVCS = Naming Time Trader ImplRepo
2704 </pre>
2705 in <code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code> also. See
2706 <a href="TAO/docs/configurations.html#orbsvcs">TAO's orbsvcs
2707 library customization instructions</a> for more information.<p>
2710 </p><hr><p> </p><h2><a name="resource_requirements">System Resource
2711 Requirements</a></h2> The amount of system resources required to build
2712 ACE and TAO varies greatly. The required system resources are
2713 influenced by OS and compiler platform, build options, and component
2714 configurations. As a rough guide, the typical peak memory requirement
2715 can be well over 512 MB (notably, for TAO's orbsvcs). Depending on
2716 your OS and compiler configuration, an <strong>entire</strong> build
2717 of ACE and TAO can use well over 4 GB of disk space. It's usually not
2718 necessary to build <strong>all</strong> of ACE and TAO, though.<p>
2720 Much less disk space is required for just the libraries. For example,
2721 see the <a href="docs/ACE-subsets.html#ACE%20Library%20Size%20Breakdown">ACE
2722 library subset sizes</a>.</p><p>
2724 If you run out of memory when building, you might consider trying
2725 some or all of these suggestions:</p><p>
2726 </p><ul>
2727 <li>Enable or increase virtual memory. If you're on a <a href="#Linux">Linux</a> or <a href="#LynxOS">LynxOS</a> platform,
2728 please see the appropriate sections above.<p>
2729 </p></li><li>Disable/enable optimization and/or debugging. See the
2730 <a href="#flags">Makefile Flags</a> discussion for information
2731 on how to do that via ACE's Makefiles.<p>
2732 </p></li><li>If you're using g++, try removing <code>-pipe</code> from
2733 <code>CFLAGS</code> in your
2734 <code>include/makeinclude/platform_macros.GNU</code> file.<p>
2735 </p></li><li>Restrict the components that you build. For ACE and TAO, see the
2736 discussion of <code>ACE_COMPONENTS</code> in the
2737 <a href="docs/ACE-subsets.html">ACE subsets</a> page. For TAO's
2738 orbsvcs, see the discussion of <code>TAO_ORBSVCS</code> in
2739 <a href="TAO/docs/configurations.html#orbsvcs">orbsvcs Library configuration information</a>.<p>
2741 If disk space is a problem, disabling debugging should greatly
2742 reduce object code, and therefore, library size. This is especially
2743 true with g++.</p><p>
2745 Toshio Hori &lt;toshi@etl.go.jp&gt; provided these tips for reducing
2746 disk space usage:</p><p>
2748 To save space on a Unix machine, I usually run
2749 'find . -name \*.sln -o -name \*.vcproj -o -name \*.bmak | xargs rm -f'
2750 in $ACE_ROOT at first after I untar the distribution. They are
2751 meaningless in my environment (Files named '*.sln' and '*.vcproj' are
2752 used for MSVC++ and files named '*.bmak' are for Embarcadero C++
2753 Builder.)</p><p>
2755 Finally, to save space, may want to run 'make clean' after 'make'. It
2756 removes generated object files and leaves libraries/executables
2757 intact. If you want to remove any of the libraries/executables, as
2758 well, try 'make realclean'.</p><p>
2760 </p></li></ul>
2762 <p></p><hr><p>
2763 </p><h1 name="MPC">General MPC information</a></h1>
2766 The <A HREF="
2767 http://htmlpreview.github.io/?https://github.com/DOCGroup/MPC/blob/master/docs/html/MakeProjectCreator.html">
2768 Makefile Project Creator (MPC)</A> is a tool that takes platform and
2769 building tool generic files (mpc files) as input, which describe basic
2770 information needed to generate a "project" file for various build
2771 tools, including Make, NMake, Visual C++ 6, Visual C++ 7, etc. Please
2772 see <a href="MPC/docs/USAGE">USAGE</a>, <a
2773 href="MPC/docs/README">README</a> for documentation on MPC.
2774 </p>
2777 A common usage for creating a Windows workspace containing just the
2778 core ACE and TAO libraries and executables is the following:
2779 </p>
2781 <pre><code>
2782 C:> cd %TAO_ROOT%
2783 C:> %ACE_ROOT%\bin\mwc.pl -type vs2019 TAO_ACE.mwc
2784 </pre></code>
2787 Replace vs2019 with whatever project type you want to use. On Linux and
2788 other UNIX platform use the gnuace type:
2789 </p>
2791 <pre><code>
2792 % cd $TAO_ROOT
2793 % $ACE_ROOT/bin/mwc.pl -type gnuace TAO_ACE.mwc
2794 </pre></code>
2797 This creates the appropriate GNUmakefiles. Additional information on
2798 how to obtain, configuration, and build ACE+TAO using MPC appear at
2799 the OCI <A
2800 HREF="http://www.theaceorb.com/faq/index.html#HowToBuildACEandTAOonWindows">FAQ</A>.
2801 </p>
2804 If you are attempting to generate project files using MPC, and you get
2805 the following error message:
2806 </p>
2808 <pre>ERROR: Unable to find the MPC modules in /builds/ACE_wrappers/MPC.
2809 You can set the MPC_ROOT environment variable to the location of MPC.
2810 </pre>
2813 You need to do one of the following:
2814 </p>
2816 <ol>
2817 <li>If you have already obtained MPC, either move it underneath the
2818 ACE_wrappers directory or set your MPC_ROOT environment variable to point
2819 to the full path of MPC.</li>
2820 <li>Check out MPC from the DOC Group git repository
2821 and set your MPC_ROOT environment variable.</li>
2822 </ol>
2825 You can check
2826 out MPC from the DOCGroup git repository using the following command.
2827 </p>
2829 <pre>git clone https://github.com/DOCGroup/MPC.git MPC
2830 </pre>
2833 The <A HREF="MPC/docs/README">README</A> and <A HREF="MPC/docs/USAGE">USAGE</A> files in the MPC/docs directory are an up-to-date
2834 source of documentation, however it is not a complete set of
2835 documentation. The TAO Developer's Guide from OCI starting with the
2836 1.3a version contains more information about MPC.
2837 </p>
2840 The MPC chapter from the TAO Developer's Guide is available at <a
2841 href="http://downloads.ociweb.com/MPC/">
2842 http://downloads.ociweb.com/MPC/</a>. Some of MPC has changed since
2843 this version, but it is largely accurate. An updated version will be
2844 available as newer versions of the TAO Developer's Guide are released.
2845 In the meantime, please see the README and USAGE files in the MPC
2846 directory.
2847 </p>
2850 </p><h1><a name="eclipse">Working with ACE in Eclipse</a></h1>
2854 The Eclipse CDT C++ development environment can be used to develop ACE applications. You can configure a new CDT project to build ACE using either a local source distribution or checking out ACE from CVS in Eclipse. These are the steps to create the CDT project to build ACE.
2855 </p>
2858 <h2>To create an Eclipse project for ACE starting from CVS:</h2>
2859 <ol>
2860 <li>In the "CVS Repository Exploring" perspective, navigate to the module containing ACE.</li>
2861 <li>Checkout the module using "Check Out As" and select the "project configured using the New Project Wizard" option.</li>
2862 <li>Select "Standard Make C++ Project" for the project type.</li>
2863 <li>Follow the steps outlined above, up to the point of running make, for building ACE on your platform. Use "path_to_your_eclipse_workspace"/"project_name" as your $ACE_ROOT.
2864 <li>If you had to regenerate the makefiles using MPC, select the root folder for your poject and use the import wizard to add them to your project.</li>
2865 <li>Select the root folder for the project and use the "Create Make Target" wizard to setup the appropriate make command and options.</li>
2866 <li>Select the root folder and run "Build Make Target." This will build ACE.</li>
2867 </ol>
2868 </p>
2873 <h2>To create an Eclipse project for ACE from a local source distribution:</h2>
2874 <ol>
2875 <li>Launch the "New Project Wizard" in Eclipse.</li>
2876 <li>Select "Standard Make C++ Project" for the project type.</li>
2877 <li>On the project name page, uncheck the "use default" location option and replace the default path with the path to your source distribution.</li>
2878 <li>Follow the steps, up to the point of running make, for building ACE on your platform.
2879 <li>If you had to regenerate the makefiles using MPC, select the root folder for your poject and use the import wizard to add them to your project.</li>
2880 <li>Select the root folder for the project and use the "Create Make Target" wizard to setup the appropriate make command and options.</li>
2881 <li>Select the root folder and run "Build Make Target." This will build ACE.</li>
2884 </ol>
2885 </p>
2887 </p>
2889 <hr><p>
2890 </p><h1><a name="advanced">Advanced Topics</a></h1>
2892 <ul>
2893 <li><a href="docs/ACE-porting.html">Porting ACE and TAO to a New OS Platform</a>
2894 </li><li><a href="#NonStaticObjectManager">Non-static ACE_Object_Manager</a>
2895 </li><li><a href="#cloning">Cloning the Source Tree</a>
2896 </li><li><a href="#mvs">Additional Build Tips for MVS</a>
2897 </li><li><a href="#flags">Makefile Flags</a>
2898 </li><li><a href="docs/ACE-SSL.html">ACE SSL effort</a>
2899 </li></ul>
2901 <p></p><hr align="left" width="50%"><p>
2902 </p><h2><a name="NonStaticObjectManager">Non-static
2903 ACE_Object_Manager</a></h2> The ACE_Object_Manager can be instantiated
2904 as a static object, can be instantiated on the stack of the main
2905 program thread, or can be explicitly instantiated and destroyed by the
2906 application with <code>ACE::init ()</code> and <code>ACE::fini
2907 ()</code>. The comments in the header file,
2908 <a href="ace/Object_Manager.h"><code>ace/Object_Manager.h</code></a>, as well as Section 1.6.3 in
2909 <a href="http://www.riverace.com/docs">The ACE Programmer's Guide</a>
2910 provide more detail.<p>
2912 <strong><blink><font color="#ff0000">NOTE:</font></blink></strong>
2913 Special requirements are imposed on applications if the
2914 ACE_Object_Manager is instantiated, by ACE, on the stack of the main
2915 thread. This behavior is selected by defining
2916 <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> in
2917 <code>ace/config.h</code>. Again, see the ACE Object_Manager header file,
2918 <a href="ace/Object_Manager.h"><code>ace/Object_Manager.h</code></a> for more information. One of
2919 these requirements is discussed here, because it is so important.
2920 Please note that <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> is
2921 defined in the distributed ACE <code>config.h</code> headers for
2922 VxWorks and Win32.</p><p>
2924 The important requirement is that the program <strong>must</strong>
2925 declare its <code>main</code> function with two arguments, even if
2926 they're not used, and with <code>int</code> return type:
2928 </p><pre><code>
2930 main (int, char *[])
2931 </code></pre>
2933 If you don't declare <code>main</code> <strong>exactly</strong> that
2934 way, then you'll see a link error about <code>ace_main_i</code> being
2935 undefined.<p>
2937 Alternatively, this feature can be disabled by commenting out the
2938 #define ACE_HAS_NONSTATIC_OBJECT_MANAGER in the
2939 <code>ace/config.h</code>. But, that will make repeated testing more
2940 difficult on VxWorks. And, you'd either have to call static
2941 constructors and destructors manually or unload/load the program
2942 between runs. On Win32, disabling the feature can possibly lead to
2943 shutdown difficulties.</p><p>
2945 <strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
2946 <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> assumes that your
2947 <code>main</code> function is named <code>main</code>. Any violation
2948 of this assumption is at your peril. If you really need to call your
2949 entry point something other than <code>main</code>, you'll need to
2950 construct and destroy the ACE_Object_Manager. The best way to do that
2951 is to call <code>ACE::init ()</code> and <code>ACE::fini ()</code>.
2952 Or, see the <code>#define</code> of <code>main (int, char *[])</code>
2953 in <a href="ace/OS_main.h"><code>ace/OS_main.h</code></a> to see how ACE does
2954 that for entry points named <code>main</code>.
2956 </p><p></p><hr align="left" width="50%"><p>
2957 </p><h2><a name="cloning">Cloning the Source Tree</a></h2>
2959 On UNIX platforms, we typically like to support multiple platform
2960 builds using the same ACE source tree. This idiom is supported by ACE
2961 using the $ACE_ROOT/bin/create_ace_build.pl script.
2963 To clone the source tree, create ./build and ./build/{your build name}
2964 subdirectories under the ACE_wrappers directory.
2965 Then invoke the create_ace_build.pl script to clone the source tree using
2966 soft links from your build directory back to the actual sources.
2967 Here is an example:</p><p>
2969 </p><pre>% cd ACE_wrappers
2970 % mkdir build build/build-SunOS5
2971 % perl bin/create_ace_build.pl -a -v build-SunOS5
2972 % cd build/build-SunOS5
2973 % setenv ACE_ROOT $cwd
2974 % make
2975 </pre><p>
2977 This will establish a complete tree of links. In addition, make sure
2978 you set your <code>LD_LIBRARY_PATH</code> to
2979 <code>$ACE_ROOT/lib:$LD_LIBRARY_PATH</code> on SVR4 UNIX
2980 platforms.</p><p>
2982 When you do a make in the $ACE_ROOT directory you will be producing
2983 object code that is not stored in the same place as the original
2984 source tree. This way, you can easily build another platform in a
2985 parallel tree structure.</p><p>
2987 See the comments at the top of the create_ace_build.pl script for
2988 further usage information.
2990 </p><p></p><hr align="left" width="50%"><p>
2991 </p><h2><a name="mvs">Additional Build Tips for MVS</a></h2>
2993 For all intents and purpose, MVS OpenEdition (OE) is another flavor of
2994 UNIX, therefore, the instructions under <a href="#aceinstall">Building
2995 and Installing ACE on Unix</a> can be used along with the following
2996 additional tips:<p>
2998 You can get a copy of GNU make that has been ported to MVS OpenEdition from
2999 the <a href="http://www.s390.ibm.com/products/oe/index.html">IBM OpenEdition web site</a>.
3000 ACE's make scheme generates compile commands that have options and
3001 operands interspersed. By default, the c89/cc/c++ compiler expects all options to
3002 precede all operands. To get around this, you must set a special
3003 compiler environment variable (_CXX_CCMODE) to 1 which tells the compiler
3004 to allow options and operands to be interspersed.</p><p>
3006 Note that the environment variable <code>LD_LIBRARY_PATH</code> is
3007 called <code>LIBPATH</code> on MVS.</p><p>
3009 Shared objects are built a little different on MVS than on
3010 other UNIX implementations. This has been accounted for in the makefiles
3011 that come with ACE When the linker (via the cxx command) builds the
3012 libACE.so file it will also create a file called libACE.x. This is a
3013 side-deck file and it must be included in subsequent link edits with
3014 application code. For more information on this see the C/C++ MVS
3015 Programming Guide. If you want to build your application statically,
3016 i.e., using libACE.a instead of libACE.so, you can set ACELIB to
3017 ACELIB_STATIC in platform_mvs.GNU.</p><p>
3019 When the libACE.so file is built (via the MVS pre-linker and binder), you
3020 will get a rc=4 from the pre-linker. This is ok. This is due to some
3021 warnings about unresolved references which should get resolved during the
3022 link step. Note, however, there shouldn't be any unresolved references
3023 from the binder (linkage editor). You can get pre-link and link maps by
3024 uncommenting the PMAP and LMAP lines in the platform_mvs.GNU file.
3026 </p><p></p><hr align="left" width="50%"><p>
3027 </p><h2><a name="flags">Makefile Flags</a></h2>
3029 GNU make provides many options to customize its operation. See its
3030 documentation for more information. One example is that for multi-cpu
3031 UNIX machines you will be able to build faster if you use:<p>
3033 </p><pre><code>
3034 % make -j <em>n</em>
3035 </code></pre><p>
3037 which allows parallel compilation. The number <i>n</i> should
3038 typically be the number of CPUs. It is likely that builds will be
3039 faster even on single-CPU UNIX machines with <code>make -j
3040 2</code>.</p><p>
3042 ACE further supports the following flags. They can be enabled either
3043 on the command line, e.g., "make purify=1", or added to your
3044 <code>platform_macros.GNU</code>. To disable the option,
3045 set the flag to null,
3046 e.g., "make debug=". Some flags support setting to 0 disable, e.g.,
3047 "make debug=0". debug=1 is enabled in the platform files that are
3048 released with ACE.</p><p>
3050 Please note that the effects of a flag may be platform specific.
3051 Also, combinations of certain flags may or may not be allowed on
3052 specific platforms, e.g., debug=1 opt=1 is supported by g++ but
3053 not all other C++ compilers.</p><p>
3055 If you use Purify or Quantify: purify or quantify <strong>must</strong>
3056 be on your <code>PATH</code>. By default, ACE puts the Purify/Quantify
3057 caches below <code>/tmp</code>. To override that, set the
3058 <code>PURE_CACHE_BASE_DIR</code> variable, either in your environment
3059 or on the <code>make</code> make command line, to the destination
3060 directory for your instrumented libraries.</p><p>
3062 </p><pre>Flag Description
3063 ---- -----------
3064 debug Enable debugging; see DCFLAGS and DCCFLAGS.
3065 exceptions Enable exception handling (not supported by all platforms).
3066 include_env Support old-style ACE_TRY_ENV declarations in methods.
3067 This switch is necessary for compiling TAO applications
3068 in the native exception configuration that were written
3069 for TAO versions before 1.2.2.
3070 In TAO 1.2.2, new macros were introduced that supercede
3071 the direct ACE_TRY_ENV declarations. These are the
3072 ACE_ENV_ARG macros that are defined in ace/CORBA_macros.h
3073 and are documented in docs/exceptions.html.
3074 This switch only affects the exceptions=1 configuration.
3075 It is for backward compatibility only.
3076 There will be warnings about unused _ACE_environment_variable
3077 parameters when using include_env=1.
3078 If possible, do not use it, but instead change your TAO
3079 applications to use the ACE_ENV_ARG macros.
3080 fast Enable -fast option, e.g., with Sun C++.
3081 inline Enable ACE inlining. Some platforms enable inlining by
3082 default, others do not.
3083 optimize Enable optimization; see OCFLAGS and OCCFLAGS.
3084 pace Enable PACE as the underpinnings of ACE_OS.
3085 probe Enable ACE_Timeprobes.
3086 profile Enable profiling; see PCFLAGS and PCCFLAGS.
3087 purify Purify all executables.
3088 quantify Quantify all executables.
3089 repo Use GNU template repository (g++ with repo patches only).
3090 rtti Enable run-time type identification. On some platforms,
3091 it is enabled by default, so this is ignored.
3092 shared_libs If migrating from prior version use <code>shared_libs_only</code>
3093 static_libs If migrating from prior version use <code>static_libs_only</code>
3094 shared_libs_only Only build shared libraries. Ignored if no SHLIBs are
3095 specified by the Makefile, as in performance-tests/Misc.
3096 static_libs_only Only build static libraries.
3097 threads Build with thread support.
3098 xt Build with Xt (X11 Toolkit) support.
3099 fl Build with FlTk (Fast Light Toolkit) support.
3100 tk Build with Tk (Tcl/Tk) support.
3101 qt Build with Qt (Trolltech Qt) support.
3102 ssl Build with OpenSSL support.
3103 rapi Build with RAPI
3104 split Build the library by first splitting up the ACE source
3105 to several files, with one object code entity for each
3106 source file. This allows an application that is linked
3107 with ACE to extract _exactly_ what it needs from the
3108 library, resulting in a smaller executable. Setting this
3109 to 1 overrides debug to 0.
3111 Usually, users do not need to be concerned with make targets.
3112 Just enter "make" on the command line to build. A few notable
3113 targets are listed below.
3115 Target Description
3116 ------ -----------
3117 show_statics Lists all static objects in object files built for
3118 current directory. Only supported for g++.
3119 show_uninit Lists all uninitialized in object files built for
3120 current directory. Only supported for g++.
3122 </pre>
3124 </p><hr>
3126 <h2><a name="power">Building from git</a></h2>
3128 If users are building from our <a href="https://github.com/DOCGroup/ACE_TAO">Git repository</a> the
3129 GNUmakefiles, and project files for building on various platforms will
3130 not be available. Git users are expected to <a href="#generate_using_mpc">generate them</a>
3131 using <a href="https://raw.githubusercontent.com/DOCGroup/MPC/master/docs/README">MPC</a> before building ACE, TAO or
3132 CIAO. We point out some suggestions below to get bootstrapped
3133 quickly.
3135 <ul>
3136 <li>You can clone all code easily from our git repository.
3137 <ul>
3138 <code>git clone https://github.com/DOCGroup/ACE_TAO.git</code>
3139 </ul>
3140 </p></li><li>Please make sure that you have <a href="http://www.perl.org/">
3141 perl</a> installed, preferably perl
3142 5.8 or higher. Users on Win32 based platforms are recommended to use
3143 <a href="https://www.activestate.com/products/perl"> Active
3144 State Perl</a> or <a href="http://strawberryperl.com">Strawberry Perl</a>.
3145 We use both perl versions without problems. We have
3146 ran into problems trying to use the cygwin version of perl on Win32
3147 based platforms. <p>
3148 </p></li>
3149 <a name="generate_using_mpc"></a>
3150 <li>To build ACE and associated tests, examples,
3151 and associated utility libraries with GNUmakefiles, you must
3152 generate GNUmakefiles with MPC:<p>
3153 <code> $ACE_ROOT/bin/mwc.pl -type gnuace ACE.mwc</code> </p>
3154 <p>On Windows, with Visual Studio 2015, you must generate solution and project files with MPC:<p>
3156 <code> $ACE_ROOT/bin/mwc.pl -type vc14 ACE.mwc </code> </p><p>
3158 On Windows, with Visual Studio 2017, you must generate solution and project files with MPC:<p>
3159 <code> $ACE_ROOT/bin/mwc.pl -type vs2017 ACE.mwc </code> </p>
3161 On Windows, with Visual Studio 2019, you must generate solution and project files with MPC:<p>
3162 <code> $ACE_ROOT/bin/mwc.pl -type vs2019 ACE.mwc </code> </p>
3163 </li><li>If you want to build TAO and its associated libraries
3164 please see <a href="TAO/TAO-INSTALL.html">TAO-INSTALL</a> for details.
3165 </li></ul>
3167 <hr><p>
3168 Back to the <a href="https://www.dre.vanderbilt.edu/~schmidt/ACE.html">ACE</a>
3169 home page.
3170 </p><p>
3171 <!--<EM>
3172 Visitor #
3173 from
3174 <EM><br> -->
3176 <!-- hhmts start -->
3178 <!-- hhmts end -->
3181 </p></body></html>