Merge pull request #1789 from iguessthislldo/igtd/backport-1783
[ACE_TAO.git] / ACE / ACE-INSTALL.html
blobe9c10edd761dff3fba64920a8dcf2d06f3ccd7be
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 2015 (vc14), 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 2015</th>
487 <td><i>name</i><code>_vc14</code>
488 </td>
489 </tr>
490 <tr>
491 <th>Visual Studio 2017</th>
492 <td><i>name</i><code>_vs2017</code>
493 </td>
494 </tr>
495 <tr>
496 <th>Visual Studio 2019</th>
497 <td><i>name</i><code>_vs2019</code>
498 </td>
499 </tr>
500 </tbody></table>
502 <p>The VC++ compiler and linker can now be invoked from GNU make just like
503 most UNIX builds. Follow the instructions in the <a href="#unix_traditional">
504 ACE/GNU Configuration</a> sections and see the additional information in the
505 comments of
506 <a href="include/makeinclude/platform_win32_msvc.GNU">platform_win32_msvc.GNU</a>.
507 </p>
509 <p>If you happen to open an older file Visual Studio solution from a newer one, it will offer to convert
510 the file to the newer format for you
512 <ol>
513 <li>Uncompress the ACE distribution into a directory, where it will
514 create a ACE_wrappers directory containing the distribution. The
515 ACE_wrappers directory will be referred to as ACE_ROOT in the
516 following steps -- so ACE_ROOT\ace would be C:\ACE_wrappers\ace if
517 you uncompressed into the root directory.<br>
518 <br>
519 </li><li>Create a file called <code>config.h</code> in the ACE_ROOT\ace
520 directory that contains: <br>
521 <br>
522 <code>#include "ace/config-win32.h"</code><br>
523 <br>
525 </li><li>The static, DLL and MFC library builds are kept in
526 different workspaces. Files with names *_Static contain project
527 files for static builds. Workspaces for static and DLL builds will be
528 available through the stock release at DOC group's website. The
529 workspaces for MFC are not available and have to be generated using
530 MPC. Please see <a href="MPC/docs/README">MPC's README</a> for
531 details.<br><br>
532 </li><li>Now load the solution file for ACE (ACE_ROOT/ACE.sln).<br>
533 <br>
534 </li><li>Make sure you are building the configuration (i.e, Debug/Release)
535 the one you'll use (for example, the debug tests need the debug
536 version of ACE, and so on). All these different configurations are
537 provided for your convenience. You can either adopt the scheme to
538 build your applications with different configurations, or use
539 <code>ace/config.h</code> to tweak with the default settings on
540 NT.<br> <strong>Note:</strong> If you use the dynamic libraries,
541 make sure you include ACE_ROOT\lib in your PATH whenever you run
542 programs that uses ACE. Otherwise you may experience problems
543 finding ace.dll or aced.dll.<br>
544 <br>
545 </li><li>To use ACE with MFC libraries, also add the following to
546 your <code>config.h</code> file. Notice that if you want to
547 spawn a new thread with CWinThread, make sure you spawn the
548 thread with THR_USE_AFX flag set.<br>
549 <br>
550 <code>#define ACE_HAS_MFC 1</code><br>
551 <br>
552 By default, all of the ACE projects use the DLL versions of the
553 MSVC run-time libraries. You can still choose use the static (LIB)
554 versions of ACE libraries regardless of run-time libraries. The
555 reason we chose to link only the dynamic run-time library is that
556 almost every NT box has these library installed and to save disk
557 space. If you prefer to link MFC as a static library into ACE, you
558 can do this by defining <code>ACE_USES_STATIC_MFC</code> in your
559 <code>config.h</code> file. However, if you would like to link
560 everything (including the MSVC run-time libraries) statically,
561 you'll need to modify the project files in ACE yourself.<p>
562 </p></li><li>Static version of ACE libraries are built with
563 <code>ACE_AS_STATIC_LIBS</code><br> defined. This macro should
564 also be used in application projects that link to static ACE
565 libraries<br>
566 <br>
567 Optionally you can also add the line <br>
568 <br>
569 <code>#define ACE_NO_INLINE</code><br>
570 <br>
571 before the #include statement in ACE_ROOT\ace\config.h to disable
572 inline function and reduce the size of static libraries (and your
573 executables.)<br>
574 <br>
575 </li><li>ACE DLL and LIB naming scheme:<br>
576 <br>
577 We use the following rules to name the DLL and LIB files in ACE
578 when using MSVC.<br>
579 <br>
580 "Library/DLL name" + (Is static library ? "s" :
581 "") + (Is Debugging enable ? "d" : "")
582 + {".dll"|".lib"}<br>
583 <br>
584 </li></ol>
586 <p>More information for ACE/TAO on MSVC can be found
587 <a href="docs/msvc_notes.txt">here</a>. The doxygen version of this
588 document is available under Related Topics in the ACE Library.</p>
590 <b>ACE TESTS</b><p>
592 The tests are located in ACE_ROOT\tests. There is also a solution in
593 that directory to build all the tests (tests.sln)</p><p>
595 Once you build all the tests (Batch Build works well for this), you
596 can run perl script <code>run_test.pl</code> in the
597 <code>tests</code> directory to try all the tests.</p><p>
599 <a name="win32nonic">
600 <b> BUILDING ACE ON A WIN32 MACHINE THAT LACKS A NETWORK CARD </b></a></p><p>
602 <a name="win32nonic">You may want to run ACE on a non-networked machine. To do so, you must
603 install TCP/IP and configure it to ignore the absence of a network
604 card. This is one method:
606 </a></p><ol>
607 <a name="win32nonic"> <li>Run Control Panel
608 </li><li>Choose Network from Control Panel
609 </li><li>Add Adapter: MS Loopback Adapter
610 </li><li>Configure MS Loopback Adapter with 802.3 (default)
611 </li><li>Add Protocol: TCP/IP Protocol
612 </li><li>Configure TCP/IP Protocol with a valid IP address and subnet mask.
613 Leave everything else at the default settings.
614 </li><li>Add Service: Workstation
615 </li><li>Exit and Restart System
616 </li><li>Run Control Panel again
617 </li><li>Choose Services from Control Panel
618 </li><li>The following services are not necessary and may
619 be set to Disabled Startup: <br>
620 Alerter<br>
621 Computer Browser<br>
622 Net logon<br>
623 Messanger<br>
624 </li><li>Choose Network from Control Panel
625 </li><li>Confirm the following setup. This is all you need to run ACE:<br>
626 Installed Software:<br>
627 Computer Browser<br>
628 MS Loopback Adapter Driver<br>
629 TCP/IP Protocol<br>
630 Workstation<br>
631 Installed Adapter Cards:<br>
632 MS Loopback Adapter<p>
633 </p></li></a></ol>
635 <hr align="left" width="50%"><p>&nbsp;</p>
636 <h3><a name="embarcadero">Building and Installing ACE on Windows with Embarcadero C++</a></h3>
638 If you are building for a machine without a network card, you may want
639 to check <a href="#win32nonic">here</a> first. <p>
641 </p><ol>
642 <li>Uncompress the ACE distribution into a directory, where it will
643 create an
644 ACE_wrappers directory containing the source. The ACE_wrappers
645 directory will be referred to as ACE_ROOT in the following steps -- so
646 <code>ACE_ROOT\ace</code> would be <code>C:\ACE_wrappers\ace</code> when you uncompressed into the
647 root directory.<br>
648 <br>
649 </li><li>Create a file called <code>config.h</code> in the ACE_ROOT\ace
650 directory that contains at least: <br>
651 <br>
652 <code>#include "ace/config-win32.h"</code><br>
653 <br>
654 </li><li>Open a RAD Studio Command Prompt.<br>
655 <br>
656 </li><li>Set the ACE_ROOT environment variable to point to the ACE_wrappers
657 directory. For example:<br>
658 <br>
659 <code>set ACE_ROOT=C:\ACE_wrappers</code><br>
660 <br>
661 </li><li>Add ACE_wrappers\lib and ACE_wrappers\bin to the PATH environment variable:<br>
662 <br>
663 <code>set PATH=%ACE_ROOT%\lib;%ACE_ROOT%\bin;%PATH%</code><br>
664 <br>
665 </li><li>Change to the ACE_ROOT\ace directory.<br>
666 <br>
667 <code>cd %ACE_ROOT%\ace</code><br>
668 <br>
669 </li><li>Generate the bmake makefiles using <a href="#MPC">MPC</a>. Use the <code>bmake</code> project type for C++ Builder:<br>
670 <br>
671 <code>%ACE_ROOT%\bin\mwc.pl -type bmake</code><br>
672 <br>
673 </li><li>You can build several different versions of ACE by setting the following optional environment
674 variables before you run make:<br>
675 <br>
676 Set the environment variable below to build a debug version of ACE<br>
677 <code>set DEBUG=1</code><br>
678 <br>
679 Set the environment variable below to build a unicode version of ACE<br>
680 <code>set UNICODE=1</code><br>
681 <br>
682 Set the environment variable below to build a version of ACE with
683 Codeguard support. Should only be used when DEBUG is also set<br>
684 <code>set CODEGUARD=1</code><br>
685 <br>
686 By default we are using the clang based compilers. At the moment you
687 want to compile using the old bcc32 compiler set the CLASIC environment variable<br>
688 <code>set CLASSIC=1</code><br>
689 <br>
690 Set the environment variable below to build a version of ACE optimized
691 for a certain CPU. For this there are special compiler flags
692 (-3/-4/-5/-6), see the Embarcadero help for more info.<br>
693 <code>set CPU_FLAG=-6</code><br>
694 <br>
695 You can then start the build with the command
696 <br><code>make -f Makefile.bmak all</code><br>
697 <br>
698 You may also enable the options by passing them as command line options to make, for example:<br>
699 <code>make -f Makefile.bmak -DDEBUG all</code><br>
700 <br>
701 </li><li>Build ACE by doing:<br>
702 <br>
703 <code>make -f Makefile.bmak all</code><br>
704 <br>
705 </li></ol>
709 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>
711 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>
713 <b>ACE TESTS</b></p><p>
715 Before you can build the tests you need to build the protocols directory.
716 Change the directory to ACE_ROOT\protocols and start: </p><p>
717 </p><blockquote><code>
718 %ACE_ROOT%\bin\mwc.pl -type bmake<br>
719 make -f Makefile.bmak all
720 </code></blockquote><p>
722 The tests are located in ACE_ROOT\tests, change to this directory.
723 You build then the tests with the following commands:</p><p>
724 </p><blockquote><code>
725 %ACE_ROOT%\bin\mwc.pl -type bmake<br>
726 make -f Makefile.bmak all
727 </code></blockquote><p>
729 Once you build all the tests, you can run the automated test script using:</p><p>
730 </p><blockquote><code>perl run_test.pl</code></blockquote><p> in the
731 <code>tests</code> directory to try all the tests. You need to make
732 sure the ACE bin and lib directory (in this case
733 <code>%ACE_ROOT%\bin</code> and <code>%ACE_ROOT%\lib</code>)
734 are on the path before you try to run the tests. If your executables are
735 compiled into a subdirectory, add <code>-ExeSubDir subdirname</code> to the
736 command.</p><p>
738 <p></p><hr align="left" width="50%"><p>
739 </p><h3><a name="mingw">Building and Installing ACE on Win32 with MinGW/ MSYS</a></h3>
742 If you are building for a machine without a network card, you may want
743 to check <a href="#win32nonic">here</a> first.
745 </p><p>
746 Building and installing ACE on <a href="http://www.mingw.org/">MinGW</a>
747 uses a mix of a <a href="#unix">UNIX</a> building process and
748 <a href="#win32">Win32</a> configuration files.
749 Also, as MinGW uses GNU g++, you may want to take
750 a look at the <a href="#g++">Compiling ACE with GNU g++</a> section.
752 </p><p>
753 You will need the MinGW build tools and libraries, downloable from
754 <a href="http://www.mingw.org/"><tt>http://www.mingw.org</tt></a>.
756 <br>
757 For our build we require the packages
758 <b><tt>MinGW</tt></b> and <b><tt>MSYS</tt></b>.
760 </p><ol>
762 <li> Install the MinGW tools (including the MinGW Development toolkit) into a common directory, say c:/mingw.
763 <br><br>
765 </li><li> Install the MSYS tools into a common directory, say c:/msys.
766 <br><br>
768 </li><li> Open a MSYS shell. Set your <tt>PATH</tt> environment variable so
769 your MinGW's <tt>bin</tt> directory is first:
771 <blockquote><pre> % export PATH=/c/mingw/bin:$PATH
772 </pre></blockquote>
774 </li><li> Add an <tt>ACE_ROOT</tt> environment variable pointing to the
775 root of your ACE wrappers source tree:
777 <blockquote><pre> % export ACE_ROOT=/c/work/mingw/ACE_wrappers
778 </pre></blockquote>
780 From now on, we will refer to the root directory of the ACE
781 source tree as <tt>$ACE_ROOT</tt>.
782 <br><br>
784 </li><li> Create a file called <tt>config.h</tt> in the
785 <tt>$ACE_ROOT/ace</tt> directory that contains:
787 <blockquote><pre> #include "ace/config-win32.h"
788 </pre></blockquote>
790 </li><li> Create a file called <tt>platform_macros.GNU</tt> in the
791 <tt>$ACE_ROOT/include/makeinclude</tt> directory containing:
793 <blockquote><pre> include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
794 </pre></blockquote>
796 In the above text, don't replace <tt>$(ACE_ROOT)</tt> with the
797 actual directory, GNU make will take the value from the
798 environment variable you defined previously.
801 If you lack Winsock 2, add the line
803 </p><blockquote><pre> winsock2 = 0
804 </pre></blockquote>
806 before the previous one.
807 <br><br>
810 If you want to install ACE (using "make install") and want all the <tt>.pc</tt> files generated,
811 set the installation prefix in platform_macros.GNU.
812 </p><blockquote><pre> INSTALL_PREFIX=/c/ACE
813 </pre></blockquote>
814 Headers will be installed to $INSTALL_PREFIX/include, documentation and
815 build system files to $INSTALL_PREFIX/share and libraries to $INSTALL_PREFIX/lib. With INSTALL_PREFIX set, RPATH will be enabled.
816 To disable RPATH (for example, if $INSTALL_PREFIX/$INSTALL_LIB is already
817 a system-known location for shared libraries), set the make macro
818 install_rpath to 0 by adding install_rpath=0 to platform_macros.GNU.
820 <br><br>
822 </li><li> In the MSYS shell, change to the $ACE_ROOT/ace directory and
823 run make:
825 <blockquote><pre> % cd $ACE_ROOT/ace
826 % make
827 </pre></blockquote>
830 This should create <tt>libACE.dll</tt> (the Win32 shared library) and
831 <tt>libACE.dll.a</tt> (the Win32 import library for the DLL).
832 Note that the name for the ACE DLL follows the MinGW convention, which itself
833 resembles UNIX.
835 </p><p>
836 If you want static libs also, you may run:
838 </p><blockquote><pre> % make static_libs_only=1
839 </pre></blockquote>
841 </li><li> Run make install:
843 <blockquote><pre> % make install
844 </pre></blockquote>
846 This should create <tt>ACE.pc</tt> to use with pkg-config.
847 </p>
849 </li><li> <a name="mingwrunpath">
850 The same rules for Win32 search of DLLs apply for MinGW. If you
851 want to run some ACE programs from the MSYS shell, you may
852 need to add the directory for <tt>libACE.dll</tt> to your PATH:
854 </a><blockquote><pre><a name="mingwrunpath"> % export PATH=/c/work/mingw/ACE_wrappers/ace:$PATH
855 </a></pre></blockquote>
857 </li></ol>
859 <a name="mingwrunpath"><b>ACE TESTS</b></a><p>
861 <a name="mingwrunpath">The tests are located in <tt>$ACE_ROOT/tests</tt>.
862 After building the library, you can change to that directory and run
863 make:
865 </a></p><blockquote><pre><a name="mingwrunpath"> % cd $ACE_ROOT/tests
866 % make
867 </a></pre></blockquote>
870 <a name="mingwrunpath">Once you build all the tests, you can run
871 <code>run_tests.pl</code> in the
872 <code>tests</code> directory to try all the tests:
874 </a></p><blockquote><pre><a name="mingwrunpath"> % perl run_test.pl
875 </a></pre></blockquote>
878 <a name="mingwrunpath">If you are using ACE as a DLL, you will need to modify your PATH
879 variable as explained </a><a href="#mingwrunpath">above</a>.
881 </p><p>
882 You may want to check <tt>$ACE_ROOT/tests/README</tt> for the status
883 of the various tests on MinGW and the different Windows flavors.
885 </p><p></p><hr align="left" width="50%"><p>
886 </p><h3><a name="cygwin">Building and Installing ACE on Win32 with Cygwin</a></h3>
889 If you are building for a machine without a network card, you may want
890 to check <a href="#win32nonic">here</a> first.
892 </p><p>
893 Building and installing ACE on <a href="http://www.cygwin.com/">Cygwin</a>
894 uses the <a href="#unix">UNIX</a> building process.
895 Also, as Cygwin uses GNU g++, you may want to take
896 a look at the <a href="#g++">Compiling ACE with GNU g++</a> section.
898 </p><p>
899 You will need the Cygwin build tools and libraries, downloable from
900 <a href="http://www.cygwin.com/"><tt>http://www.cygwin.com</tt></a>.
901 For our build we require the following packages besides the packages the
902 setup selects by default:
903 <a name="cygwinpacks">
904 </a></p><blockquote>
905 <a name="cygwinpacks"><b><tt>gcc (version 3.3.3), cygserver, make, perl, binutils</tt></b>.
906 </a></blockquote>
908 <ol>
910 <a name="cygwinpacks"> <li> Install Cygwin (this can be easy downloading and running
911 <a href="http://cygwin.com/setup.exe"><tt>setup.exe</tt></a>
912 from the Cygwin site). For working with ACE we recommend
913 to select <code>DOS</code> as default text file type.
914 <br><br>
916 <li> Open a Cygwin shell. Set your <tt>PATH</tt> environment variable so
917 your Cygwin <tt>bin</tt> directory is first:
919 <blockquote><pre> % export PATH=//c/cygwin/bin:$PATH
920 </pre></blockquote>
924 <blockquote><pre> % export PATH=/cygdrive/c/cygwin/bin:$PATH
925 </pre></blockquote>
928 Note Cygwin uses ``<tt>/</tt>'' as directory separator,
929 and ``<tt>//X</tt>'' as a notation for Win32 drive <tt>X</tt>.
930 Note also that you <em>can't</em> use ``<tt>c:/cygwin/bin</tt>''
931 because, for Cygwin,
932 ``<tt>:</tt>'' is path separator character, as in UNIX.
933 <br><br>
935 </p></li><li> Add an <tt>ACE_ROOT</tt> environment variable pointing to the
936 root of your ACE wrappers source tree (in this example c:/work/cygwin/ACE_wrappers):
938 <blockquote><pre> % export ACE_ROOT=/cygdrive/c/work/cygwin/ACE_wrappers
939 </pre></blockquote>
942 Note here you <em>can't</em> use the ``<tt>//X</tt>'' Cygwin
943 notation as this is seen by Cygwin's compiler and it doesn't
944 support that (it <em>does</em> support ``<tt>/</tt>'' as directory
945 separator however).
947 </p><p>
948 From now on, we will refer to the root directory of the ACE
949 source tree as <tt>$ACE_ROOT</tt>.
950 <br><br>
952 </p></li><li> Create a file called <tt>config.h</tt> in the
953 <tt>$ACE_ROOT/ace</tt> directory that contains:
955 <blockquote><pre> #include "ace/config-cygwin32.h"
956 </pre></blockquote>
958 </li><li> Create a file called <tt>platform_macros.GNU</tt> in the
959 <tt>$ACE_ROOT/include/makeinclude</tt> directory containing:
961 <blockquote><pre> include $(ACE_ROOT)/include/makeinclude/platform_cygwin32.GNU
962 </pre></blockquote>
964 In the above text, don't replace <tt>$(ACE_ROOT)</tt> with the
965 actual directory, GNU make will take the value from the
966 environment variable you defined previously.
968 </li><li> On the Cygwin shell, change to the $ACE_ROOT/ace directory and
969 run make:
971 <blockquote><pre> % cd $ACE_ROOT/ace
972 % make
973 </pre></blockquote>
976 This should create <tt>libACE.dll</tt> (the Win32 shared library) and
977 <tt>libACE.dll.a</tt> (the Win32 import library for the DLL).
978 Note the name for the ACE DLL on Cygwin follows the UNIX convention.
979 <br><br>
981 </p><p>
982 If you want static libs also, you may run:
984 </p><blockquote><pre> % make static_libs_only=1
985 </pre></blockquote>
987 </li><li> <a name="cygwinrunpath">
988 The same rules for Win32 search of DLLs apply for Cygwin. If you
989 want to run some ACE programs from the Cygwin shell, you may
990 need to add the directory for <tt>libACE.dll</tt> to your PATH:
992 </a><blockquote><pre><a name="cygwinrunpath"> # export PATH=//c/work/cygwin/ACE_wrappers/ace:$PATH
993 </a></pre></blockquote>
995 <a name="cygwinrunpath"> If you are using MPC-generated Makefiles, then the DLLs have been
996 placed in the lib directory instead of ace and thus your PATH
997 addition would need to look like this:
999 </a><blockquote><pre><a name="cygwinrunpath"> # export PATH=//c/work/mingw/ACE_wrappers/lib:$PATH
1000 </a></pre></blockquote>
1003 </li></ol>
1005 <a name="cygwinrunpath"><b>ACE TESTS</b></a><p>
1007 <a name="cygwinrunpath">The tests are located in <tt>$ACE_ROOT/tests</tt>.
1008 After building the library, you can change to that directory and run
1009 make:
1011 </a></p><blockquote><pre><a name="cygwinrunpath"> % cd $ACE_ROOT/tests
1012 % make
1013 </a></pre></blockquote>
1016 <a name="cygwinrunpath">Once you build all the tests, you can run
1017 <code>run_tests.pl</code> in the
1018 <code>tests</code> directory to try all the tests:
1020 </a></p><blockquote><pre><a name="cygwinrunpath"> % perl run_test.pl
1021 </a></pre></blockquote>
1024 <a name="cygwinrunpath">If you are using ACE as a DLL, you will need to modify your PATH
1025 variable as explained </a><a href="#cygwinrunpath">above</a>.
1027 </p><p>
1028 You may want to check <tt>$ACE_ROOT/tests/README</tt> for the status
1029 of the various tests on Cygwin and the different Windows flavors.
1030 </p>
1032 <p></P>
1033 <hr align=left width="50%">
1036 <H2><a name="interix">Building and Installing ACE on Win32 with Interix</H2>
1037 <P>Interix comes with a BSD style make; you need GNU make.
1038 Make builds easily under Interix or there is a prebuilt
1039 package at: </P>
1040 <P><A
1041 href="http://www.interopsystems.com/tools/warehouse.htm">http://www.interopsystems.com/tools/warehouse.htm</A> </P>
1042 <P>If you are building for a machine without a network
1043 card, you may want to check <A href="#win32nonic" ><FONT color=#0000ff>here</FONT></A> first. </P>
1044 <P>This port was built and tested under Interix 3.5. a.k.a.
1045 <A href="http://www.microsoft.com/windows/sfu/">Windows
1046 Services for UNIX 3.5.</A></P>
1047 <P>To build follow the <A href="#unix_traditional" >Traditional ACE/GNU Make
1048 Configuration</A> instructions replacing the following include directives:</P>
1049 <P><TT>#include
1050 "ace/config-win32-interix.h"</TT> </P>
1051 <P>for the config.h header </P>
1052 <P>and: </P>
1053 <P><TT>include
1054 $(ACE_ROOT)/include/makeinclude/platform_win32_interix.GNU</TT></P>
1055 <P>for your platform_macros.GNU file.</P>
1056 <P>ACE should build fine with just '<TT>make</TT>', the only other option tried thus far is
1057 '<TT>make static_libs_only=1</TT>' which also works. Any
1058 other options may not work.</P>
1059 <P><b>ACE TESTS</B> </P>
1060 <p>The tests are located in <TT>$ACE_ROOT/tests</TT>. After building the library, you can
1061 change to that directory and run make: </P>
1062 <P><TT>% cd $ACE_ROOT/tests </TT><BR><TT>% make </TT>
1063 <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>
1064 <P><TT>% run_test.pl </TT></P>
1065 <p>If you are using ACE as a shared library, you will need
1066 to modify your LD_LIBRARY_PATH as explained in<A href="#unix_traditional" ><FONT color=#800080>Traditional ACE/GNU Make Configuration</FONT></A>. </P>
1067 <p></P>
1069 <p></p><hr align="left" width="50%"><p>
1070 </p><h2><a name="vxworks">Building and Installing ACE on VxWorks</a></h2>
1071 For the most part, you should be able to follow the instructions above
1072 to build ACE and applications that use it. Start with the
1073 <a href="#unix">Unix instructions</a> above to build ACE and the
1074 applications that use it. Please see below for more information on
1075 <a href="#VxWorks/NT">building ACE on NT hosts for VxWorks targets</a>.<p>
1077 A few notes on VxWorks builds (thanks to
1078 <a href="mailto:Paul_von_Behren@stortek.com">Paul von Behren</a> and
1079 <a href="https://www.remedy.nl">Remedy IT</a> for these notes):</p>
1081 </p><ul>
1082 <li>VxWorks builds are done with a cross compiler, i.e., the compiles
1083 are done on a workstation creating object modules which are
1084 downloaded and loaded into the VxWorks target system.<p>
1085 </p></li><li>C++ object modules must be post-processed by a VxWorks
1086 utility called "munch" to set up calls to static constructors and destructors.
1087 ACE integrates the makefile includes/rules files
1088 distributed with VxWorks to achieve maximum compatibility and reuse the target
1089 specifications and buildcommands defined by Windriver itself.
1090 The original ACE support for VxWorks included a perl script called
1091 <a href="bin/ace_ld">$ACE_ROOT/bin/ace_ld</a>,
1092 which was called from the Makefiles, replacing
1093 the traditional <code>ld</code> step. Although this script is currently still
1094 available it is not used anymore.<BR>
1095 You must have perl installed to use <code>ace_ld</code>. If perl is not on your path, you'll
1096 have to set <code>PERL_PATH</code> to the full path (including
1097 perl.exe), either in your
1098 <code>$(ACE_ROOT)/include/makeinclude/platform_macros.GNU</code>
1099 or in your environment.<p>
1100 </p></li><li>Wind River provides GCC/G++ cross-compilers for the
1101 supported target platforms. The executables are named cc&lt;target&gt;
1102 and g++&lt;target&gt;; for example, ccppc and g++cpp for PowerPC
1103 targets.<p>
1104 </p></li></ul>
1106 You'll have to let ACE know the target type at compile time. There
1107 are several ways to do this; please see the
1108 <code>$ACE_ROOT/include/makeinclude/platform_vxworks5.5.x.GNU</code>
1109 platform file for detailed information.<p>
1111 The VxWorks platform_vxworks*.GNU files are set up so that shared
1112 libraries are not built on VxWorks, by default. Only static
1113 libraries, with .a extension, are built. Therefore, it's not
1114 necessary to set the LD_LIBRARY_PATH environment variable on your host
1115 system when building for VxWorks targets. Please note, however, if
1116 you use TAO on VxWorks that you will need to set your LD_LIBRARY_PATH
1117 to find the TAO IDL compiler libraries (installed in the ace
1118 directory) on the host.</p><p>
1120 These non-default VxWorks kernel configuration <code>#defines</code>
1121 are required with ACE:</p><p>
1123 </p><pre>#define INCLUDE_CPLUS /* include C++ support */
1124 #define INCLUDE_CPLUS_IOSTREAMS /* include iostreams classes */
1125 #define INCLUDE_POSIX_ALL /* include all available POSIX functions */
1126 </pre>
1128 For completeness, here are the non-default <code>#defines</code> that
1129 we used for VxWorks 5.3.1/g++ 2.7.2:
1131 <pre>#define INCLUDE_CPLUS /* include C++ support */
1132 #define INCLUDE_CPLUS_IOSTREAMS /* include iostreams classes */
1133 #define INCLUDE_CONFIGURATION_5_2 /* pre-tornado tools */
1134 #define INCLUDE_DEBUG /* pre-tornado debugging */
1135 #define INCLUDE_LOADER /* object module loading */
1136 #define INCLUDE_NET_SYM_TBL /* load symbol table from network */
1137 #define INCLUDE_SYM_TBL_SYNC /* synchronize host and target symbol tables */
1138 #define INCLUDE_NFS /* nfs package */
1139 #define INCLUDE_PING /* ping() utility */
1140 #define INCLUDE_POSIX_ALL /* include all available POSIX functions */
1141 #define INCLUDE_RDB /* remote debugging package */
1142 #define INCLUDE_RLOGIN /* remote login */
1143 #define INCLUDE_RPC /* rpc package */
1144 #define INCLUDE_SECURITY /* shell security for network access */
1145 #define INCLUDE_SHELL /* interactive c-expression interpreter */
1146 #define INCLUDE_SHOW_ROUTINES /* show routines for system facilities*/
1147 #define INCLUDE_SPY /* spyLib for task monitoring */
1148 #define INCLUDE_STARTUP_SCRIPT /* execute start-up script */
1149 #define INCLUDE_STAT_SYM_TBL /* create user-readable error status */
1150 #define INCLUDE_SYM_TBL /* symbol table package */
1151 #define INCLUDE_UNLOADER /* object module unloading */
1152 #define INCLUDE_WINDVIEW /* WindView command server */
1153 </pre>
1155 Also, automatic construction/destruction of static objects
1156 should be enabled.<p>
1158 If you use TAO, it's also a good idea to increase the
1159 <code>NUM_FILES</code> parameter from its default of 50 to,
1160 say, 1000.</p><p>
1162 Please note that those VxWorks kernel configuration parameters
1163 are set in the VxWorks configAll.h file. You must rebuild your
1164 VxWorks kernel after modifying that file.</p><p>
1166 If you're first getting started with ACE and/or VxWorks, I recommend
1167 just building the ACE library and tests first. (Some of the ACE
1168 examples, in System_V_IPC, don't build on VxWorks yet.) Then try
1169 running the tests. Please see $ACE_ROOT/tests/README for the latest
1170 status of the ACE tests on VxWorks.</p><p>
1172 Please note that the <code>main</code> entry point is renamed to
1173 <code>ace_main</code> (configurable via ACE_MAIN) on VxWorks with g++,
1174 to comply with its restriction against using <code>main</code>.
1175 In addition, ACE_HAS_NONSTATIC_OBJECT_MANAGER is enabled by default
1176 to cleanly support construction and destruction of static objects.
1177 Please see the <a href="#NonStaticObjectManager">Non-static
1178 ACE_Object_Manager</a> discussion for the important implication
1179 of this feature.</p><p>
1181 ACE threads (VxWorks tasks) can be named, for example, by supplying a
1182 non-null argument to the Thread_Manager spawn routines. However,
1183 names beginning with <code>"==ace_t=="</code> are forbidden because
1184 that prefix is used internally by ACE.</p><p>
1186 You can spawn a new task to run <code>ace_main</code>, using either
1187 VxWorks <code>sp</code>, or ACE'S <a name="spa"><code>spa</code></a>.
1188 <code>spa</code> can be used from the VxWorks shell to pass arguments
1189 to <code>ace_main</code>. Its usage is:
1191 </p><pre><code>
1192 spa ace_main, "arg1" [, ...]
1193 </code></pre>
1195 All arguments must be quoted, even numbers. You can start also ace_main
1196 without spawning another thread by using:<p>
1198 </p><pre><code>
1199 spaef ace_main, "arg1" [, ...]
1200 </code></pre>
1202 ACE also provides the function <code>vx_execae</code> which is capable of running
1203 <code>ace_main</code> in a separate thread, wait for the task to finish and return
1204 the return code from <code>ace_main</code>:
1206 <pre><code>
1207 int vx_execae (FUNCPTR acemain,char* arguments, int prio = 0, int opt = 0, int stacksz = 0);
1208 </code></pre>
1210 You could call this from the VxWorks shell like:
1211 </p>
1212 <pre><code>
1213 my_rc = vx_execae ace_main, "-o server.ior -ORBDottedDecimalAddresses 1"
1214 </code></pre><p>
1216 When <code>prio</code>, <code>opt</code> or <code>stacksz</code> are omitted or specified
1217 as <code>0</code> default values will be used. See the VxWorks shell documentation for the
1218 defaults for <code>prio</code> and <code>opt</code>. For <code>stacksz</code> the default is
1219 <code>ACE_NEEDS_HUGE_THREAD_STACKSIZE</code>.
1220 The <code>arguments</code> string will be parsed and passed on to <code>ace_main</code> as
1221 a regular <code>argc</code> and <code>argv</code>.</p><p>
1223 Be aware of the fact that when you execute <code>ace_main</code> directly from the VxWorks
1224 shell argc will be zero and argv* will also be zero. Using <code>argv[0]</code> will not return
1225 the program name, but will result in a crash.<br>
1226 The ACE helper functions <code>spa</code>, <code>spaef</code> and <code>vx_execae</code> prevent
1227 this problem by building a regular <code>argc</code> and <code>argv</code> which also contain a
1228 valid <code>argv[0]</code> element.</p>
1230 <h3><a name="VxWorks/SharedLibs">Building Shared Libraries for VxWorks</a>.</h3>
1232 <strong>NOTE</strong>: Since VxWorks support is currently being reworked with
1233 an initial focus on static builds the support for shared builds is momentarily
1234 broken. This will be remedied(!) as soon as possible.<p>
1236 ACE supports shared libraries for VxWorks, but only with the g++
1237 compiler. To build shared libraries instead of the default static
1238 libraries, added <code>shared_libs_only=1</code> to either your
1239 <code>ACE_wrappers/include/makeinclude/platform_macros.GNU</code> or
1240 your <code>make</code> invocation. Then, be sure to load the ACE (and
1241 any other) shared library before loading your executable(s).</p><p>
1243 A shared library for VxWorks uses the same code as for a static
1244 (non-shared) library. However, calls to static constructors/
1245 destructors are added. The code in the shared library <strong>must</strong>
1246 be reentrant if you shared it between programs (tasks). The
1247 ACE library meets this requirement.</p><p>
1249 Shared libraries reduce build time, executable size, and load
1250 time of the executable. But, you must manually load the shared
1251 library before loading your executable(s) with a command such as:
1252 </p><pre><code>
1253 -&gt; ld &lt; libACE.so
1254 </code></pre>
1255 Shared libraries can be unloaded the same way an executable
1256 (module) is unloaded.<p>
1258 <strong>NOTE</strong>: Shared libraries on VxWorks aren't the same as
1259 shared libraries on other operating systems. In particular, there is
1260 no support for creating copies of writeable global (static) data in
1261 the shared library. This includes the singleton ACE_Object_Manager
1262 instance pointer. If you share global data between separate programs,
1263 they may not work properly. See the discussion of shared code and
1264 reentrancy in the VxWorks' <em>Programmers Guide</em>.</p><p>
1266 Instead of trying to run separate programs onto a VxWorks target, we
1267 recommend creating just one program, and spawning a thread for each
1268 task. The TAO IDL_Cubit test <a href="TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation_test.cpp">collocation
1269 test</a> is a good example.</p><p>
1271 </p><h3><a name="VxWorks/LinkToKernel">Linking ACE and/or TAO Libraries into the VxWorks Kernel</a>.</h3>
1273 It's easy to link your ACE and/or TAO libraries into the VxWorks kernel.
1274 Just build <a href="#VxWorks/SharedLibs">shared versions</a>, but
1275 disable the munch step. The easiest way to do that is to set the
1276 <code>LD</code> make variable to the name of your linker. For
1277 example, to build a libACE.so for PowerPC that can be linked into
1278 the kernel:
1279 <pre>% cd $ACE_ROOT/ace
1280 % make LD=ldppc shared_libs_only=1
1281 </pre>
1282 After building the shared lib, link it into the kernel by setting
1283 the <code>MACH_EXTRA</code> make variable in the kernel configuration
1284 Makefile. Then, build the kernel using <code>make exe</code>.<p>
1286 </p><h3><a name="VxWorksTestScript">Using the one-button ACE tests with VxWorks</a>.</h3>
1288 It is possible to generate a script to execute all ACE tests. You can do this by executing
1289 </a></p><blockquote><pre><a name="vxworksscript">% perl run_test.pl -v -o > run_test.vxworks
1290 </a></pre></blockquote>
1292 The ACE tests write their output files in a directory named
1293 <code>log/</code>, below the current (<code>tests</code>) directory.<br/>
1294 </p>
1296 To run the tests from the build directory on an NT host where you crossbuild your
1297 VxWorks ACE/TAO you can set up the Target Server File System (TSFS) in your Target Server
1298 configuration. If you f.i. set the root for the TSFS to the root directory of your builddisk
1299 you can set the default directory for the target by issueing the following command
1300 from a Host shell: '@cd "/tgtsvr/{path to ACE}/ACE_wrappers/tests"'.
1301 The '@' addition makes sure this command is executed for the target environment and not the
1302 local host shell environment.
1303 If you also issue the command 'cd {path to ACE}/ACE_wrappers/tests' you can execute the
1304 generated one button testscript like: '&lt; run_test.vxworks'.
1305 </p>
1307 Running the ACE tests automatically from the ACE autobuild tool using Target Server and Host
1308 shell options is also supported.
1309 </p>
1311 If you don't have NFS included in your VxWorks kernel, you can use these steps, provided by
1312 <a href="mailto:clarence_m_weaver@md.northgrum.com">Clarence M. Weaver</a>,
1313 to run the tests and capture their output:</p><p>
1314 </p><ol>
1315 <li>What I did was create a log directory on the boot NT host of my VxWorks
1316 target.<p>
1317 </p></li><li>I copied all the test applications and the run_test.vxworks script to
1318 the parent of the log directory.<p>
1319 </p></li><li>Using the target shell not the host shell, I "cd" to the directory
1320 containing the script and test programs.<p>
1321 </p></li><li>Invoked the script using <code>&lt; run_test.vxworks</code> from this target shell.<p>
1322 </p></li></ol>
1324 <a href="mailto:Kirk.Davies@pobox.com">Kirk Davies</a> provided this
1325 approach for running the ACE tests on Tornado II:
1327 <ul>
1328 <li>Under Tornado II, I set up the Target Server File System (TSFS), and
1329 the test logs get written to the log subdirectory under that.<p>
1330 </p></li><li>You have to set an environment variable before running the tests:
1331 <pre>putenv("ACE_TEST_DIR=/tgtsvr")
1332 </pre><p>
1333 </p></li></ul>
1335 </p><h3><a name="VxWorks/NT">Building ACE on Tornado/NT hosts for VxWorks targets</a>.</h3>
1336 The following, very useful information was contributed by
1337 <a href="http://people.qualcomm.com/cryan">Chris Ryan</a>
1338 and <a href="mailto:Paul_von_Behren@stortek.com">Paul von Behren</a>.
1339 Please submit corrections, additions, or clarifications to the
1340 the <a href="mailto:ace-users@list.isis.vanderbilt.edu">ACE mailing list</a>.<p>
1342 <strong>NOTE:</strong>The make (version 3.74) that is provided with
1343 Tornado 2.2 cannot be used to build ACE. A working version is available
1344 from the WindRiver support site, download the
1345 <a href="https://secure.windriver.com/cgi-bin/windsurf/downloads/view_binary.cgi?binaryid=838">
1346 make3_80.gvk_patches</a> and the
1347 <a href="https://secure.windriver.com/cgi-bin/windsurf/downloads/view_binary.cgi?binaryid=100340">
1348 make3_80.tor2_2.new_dependency_rules</a> package and install them.</p><p>
1350 Using the Cygnus tools, this approach works:
1351 </p><ul>
1352 <li>You'll build both your NT and VxWorks executables in the same
1353 workspace (directory hierarchy). This works because the NT
1354 compiler and ACE's Makefiles put their output in different
1355 directories.<p>
1356 </p></li><li>Set up your
1357 <code>ACE_wrappers/include/makeinclude/platform_macros.GNU</code>
1358 as usual for VxWorks. See
1359 <a href="include/makeinclude/platform_vxworks5.5.x.GNU">the
1360 g++/VxWorks platform file</a> for more information.<p>
1361 </p></li><li>Create an <code>ACE_wrappers/ace/config.h</code> file that looks
1362 something like the following.
1363 <pre>#if defined (_MSC_VER) || defined (__BORLANDC__)
1364 # include "ace/config-win32.h"
1365 #else
1366 # include "ace/config-vxworks5.x.h"
1367 #endif
1368 </pre><p>
1369 </p></li><li>Set your <code>ACE_ROOT</code>, <code>CPP_LOCATION</code>,
1370 <code>WIND_BASE</code>, and <code>WIND_HOST_TYPE</code> environment
1371 variables.<p>
1372 </p></li><li>Build for NT, then build for VxWorks.<p>
1373 </p></li></ul>
1375 A few additional Windows Notes, from Paul von Behren:<p>
1376 </p><ul>
1377 <li>Cygnus has created a Win32 API which is compatible with a
1378 "generic" Unix environment. Using this library, they have ported a
1379 large collection of GNU tools to WinNT/95 - including a port of
1380 gcc/g++. See <a href="http://www.cygnus.com/misc/gnu-win32/">http://www.cygnus.com/misc/gnu-win32/</a>
1381 A related link is <a href="ftp://ftp.cygnus.com/pub/gnu-win32/latest/">ftp://ftp.cygnus.com/pub/gnu-win32/latest/</a><p>
1382 </p></li><li>To set up the command-prompt build environment, run
1383 <code>Tornado\host\x86-win32\bin\TorVars.bat</code>. This is done
1384 implicitly within the Tornado IDE.<p>
1385 </p></li><li>To run <code>ace_ld</code>, you still need perl installed -
1386 see <a href="https://www.activestate.com/products/perl">ActiveState Perl</a>
1387 or <a href="http://strawberryperl.com">Strawberry Perl</a>.<p>
1388 </p></li><li>The Tornado IDE will use a standard Makefile for project
1389 builds, but does not have a GUI interface for managing the
1390 Makefile. By default, it will use rules from Makefile in the current
1391 directory and you can configure it to add certain Makefile
1392 targets to the project. If you have <code>ACE_ROOT</code> defined
1393 before starting Tornado, you can specify an ACE Makefile as a Tornado
1394 target and Tornado will then call make from the menu.<p>
1395 </p></li></ul>
1397 And Chris Ryan's instructions for building for VxWorks targets
1398 on Windows NT hosts:
1400 <ol>
1401 <li>Path setting that seems to be working is:<p>
1402 </p><pre> /tornado/host/x86-win32/bin:
1403 /tornado/host/x86-win32/lib/gcc-lib/i386-wrs-vxworks/cygnus-2.7.2-960126:
1404 /tornado/host/x86-win32/i386-wrs-vxworks/bin:
1405 /ace/ace_wrappers/bin:
1406 /gnuwin32/b18/H-i386-cygwin32/bin:
1407 /gnuwin32/b18/tcl/bin:
1408 /WINNT/system32:
1409 /WINNT:
1410 /WINNT/system32/nls/ENGLISH:
1411 /bin
1412 </pre>
1414 Other environment variables:<p>
1415 </p><pre> WIND_BASE=/tornado
1416 SHELL=/bin/sh.exe
1417 TERM=pcbios
1418 TAO_ROOT=/ace/ACE_wrappers.vxworks/TAO
1419 CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.EXE
1420 GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/
1421 WIND_HOST_TYPE=x86-win32
1422 ACE_ROOT=/ace/ACE_wrappers.vxworks
1423 </pre>
1425 </li><li><code>/tornado</code> is the root of the Tornado install
1426 (<code>$WIND_BASE</code>).
1428 </li><li><code>/gnuwin32</code> is the root of a Cygnus GNU download and install.
1430 </li><li><code>/bin</code> content is:<p>
1431 </p><pre> aced.dll
1432 cygwin.dll
1433 perl.exe
1434 rm.exe
1435 sh.exe
1436 true
1437 </pre>
1439 <code>aced.dll</code> is produced in an ACE NT source tree according to
1440 documented procedure for Windows VC++ ACE build.
1442 <code>cygwin.dll</code> is from the Cygnus GNU software download and install.
1444 </li><li>Basically, follow documented procedure for ACE build/install on UNIX
1445 platform. Create a <code>$ACE_ROOT/ace/config.h</code> that looks
1446 like:<p>
1447 </p><pre> #include "config-vxworks5.x.h"
1448 </pre>
1450 And create a
1451 <code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code>
1452 that looks like:<p>
1453 </p><pre>
1454 WIND_BASE = /tornado
1455 WIND_HOST_TYPE = x86-win32
1456 CPU = I80486
1457 include $(ACE_ROOT)/include/makeinclude/platform_vxworks5.5.x.GNU
1458 </pre>
1460 </li><li>When using cygnus windows GNUTools on WinNT you have to start
1461 make with "--unix" option, otherwise WinNT shell cmd.exe is responded and
1462 not sh.exe, i.e.,
1463 <pre> make --unix static_libs_only=1
1464 </pre>
1465 </li></ol>
1467 <h3>TAO on NT Tornado host, VxWorks target.</h3>
1469 <ol>
1470 <li>Build ACE and TAO_IDL in the NT tree as already documented.
1471 Be sure to build ACE's gperf on NT, in
1472 <code>ACE_wrappers/apps/gperf/src</code>.<p>
1474 </p></li><li>Build $TAO_ROOT/tao
1475 <pre> CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe
1476 cd $TAO_ROOT/tao
1477 /gnuwin32/b18/H-i386-cygwin32/bin/make
1478 </pre>
1480 </li><li>Build orbsvcs.
1481 <pre> CPP_LOCATION=/Program Files/DevStudio/VC/bin/CL.exe
1482 cd $TAO_ROOT/orbsvcs/orbsvcs
1483 /gnuwin32/b18/H-i386-cygwin32/bin/make
1484 </pre>
1486 </li><li>Build $TAO_ROOT/tests<p>
1487 </p></li></ol>
1490 <h3><a href="mailto:Jaffar_Shaikh@Mitel.COM">Jaffar Shaikh's</a>
1491 Notes for Building ACE and TAO for VxWorks on NT host</h3>
1492 <b></b><p><b>Scenario:</b> I was building the ACE and TAO for VxWorks
1493 on NT. The target system was a PPC860 based chassis and another a NT
1494 host based card.</p>
1495 <b><p>Host System:</p>
1496 </b><p>NT 4.0 workstation with 128 M RAM, 266MHz Pentium.</p>
1498 <b><p>Software Needed For Building TAO</p>
1499 </b><p>1) <a href="https://www.activestate.com/products/perl">ActiveState Perl</a>
1500 or <a href="http://strawberryperl.com">Strawberry Perl</a>
1501 </p>
1503 <p>2) Tornado 2.2.1 from Windriver.</p>
1505 <p>3) Cygwin GNU to build TAO. It is available for NT as a freeware
1506 from the <a href="http://www.cygwin.com">Cygwin</a> site</p>
1507 <p>The Cygwin Make (version 3.75) can only build the TAO not the
1508 Tornado II make (version 3.74)</p>
1510 <b><p>Environment Variables:</p>
1511 </b><p>On NT the environment Variables are set as follows, (from
1512 Control Panel-&gt; System -&gt; Environment)</p>
1513 <p>I added following Environment variable entries to PATH </p>
1515 <pre>
1516 C:\Perl\bin\;
1517 C:\tornado\host\x86-win32\bin;
1518 C:\tornado\host\x86-win32\powerpc-wrs-vxworks\bin;
1519 C:\tornado\host\x86-win32\lib\gcc-lib\powerpc-wrs-vxworks\cygnus-2.7.2-960126;
1520 C:\Corba\Ace_wrappers\bin;
1521 C:\Cygwin\bin;
1522 C:\Cygwin\usr\bin;
1523 C:\bin
1524 </pre>
1526 <p>Additional Environmental variables and the values,</p>
1527 <pre>
1528 CPU=PPC860
1529 LD_LIBRARY_PATH=
1530 SHELL=/bin/sh.exe
1531 ACE_ROOT=/Corba/ACE_wrappers
1532 WIND_BASE=/tornado
1533 SHELL=/bin/sh.exe
1534 TERM=pcbios
1535 TAO_ROOT=/Corba/ACE_wrapper/Tao
1536 CPP_LOCATION=/Program Files/Microsoft Visual Studio/VC98/Bin/CL.exe
1537 GCC_EXEC_PREFIX=/tornado/host/x86-win32/lib/gcc-lib/
1538 WIND_HOST_TYPE=x86-win32
1539 PERL_PATH=/perl/bin/perl.exe
1540 </pre>
1542 <b><p>Directories of importance</p>
1543 </b><p>C:\Corba &lt;-- Ace_wrappers (uzipped)</p>
1544 <p>C:\tornado &lt;-- Tornado installed</p>
1545 <p>C:\Perl &lt;-- Perl installed</p>
1546 <p>C:\Cygwin &lt;-- Cygwin installed</p>
1547 <p>C:\bin &lt;-- Copy these files,</p>
1548 <p> Ace.dll, &lt;-- After you build Ace</p>
1549 <p> gperf.exe &lt;-- After you build gperf</p>
1550 <p> Cygwin1.dll, &lt;-- After you install Cygwin</p>
1551 <p> perl.exe, &lt;-- After you install Perl</p>
1552 <p> rm.exe &lt;-- After you install Cygwin</p>
1553 <p> sh.exe &lt;-- After you install Cygwin</p>
1554 <p> true &lt;-- After you install Cygwin</p>
1555 <b><p>Create Files</p>
1556 </b><p>1) C:\Corba\ACE_Wrappers\ace\config.h</p>
1557 <p>with entry</p>
1558 <pre>
1559 #if defined (_MSC_VER) || (__BORLANDC__)
1560 #include "ace/config-win32.h"
1561 #else
1562 #define ACE_HAS_IP_MULTICAST
1563 #include "ace/config-vxworks5.x.h"
1564 #endif
1565 </pre>
1567 <p>2) C:\Corba\ACE_wrappers\include\makeinclude\platform_macros.GNU</p>
1568 <pre>
1569 WIND_BASE = /tornado
1570 WIND_HOST_TYPE = x86-win32
1571 include $(ACE_ROOT)/include/makeinclude/platform_vxworks5.5.x.GNU
1572 ACE_COMPONENTS=FOR_TAO (you may choose this option to build ACE library that supports TAO)
1573 </pre>
1575 <p></p>
1576 <b><p>Steps to Build</p>
1577 </b><p>1) Build Ace.dll under NT</p>
1578 <p>In MS Visual C++ open C:\Corba\ACE_wrappers\ace.sln And build Ace
1579 DLL</p>
1580 <p>Copy Ace.dll in C:\bin</p>
1582 <p>2) Build gperf utility under NT</p>
1583 <p>In MS Visual C++ open
1584 C:\Corba\ACE_wrappers\apps\gperf\src\gperf.sln. Build gperf.exe</p>
1585 <p>Copy gperf.exe to C:\bin</p>
1587 <p>3) Mount Directries in Cygwin</p>
1588 <p>Click on Cygnus Solutions -&gt; Cygwin Bash Shell</p>
1589 <p>Mount following directories by using mount command.</p>
1590 <p>create respective directories first then use mount command </p>
1592 <p>e.g. Create /Corba directory then use $mount -s "C:\Corba"
1593 /Corba</p>
1595 <p>C:\Corba mount to /Corba</p>
1596 <p>C:\tornado mount to /tornado</p>
1597 <p>C:\Perl mount to /perl</p>
1598 <p>C:\Cygwin mount to /cygwin</p>
1599 <p>C:\bin mount to /bin</p>
1600 <p>C:\Program Files mount to /Program Files </p>
1602 <p>4) Build ACE in Cygwin</p>
1603 <p>$cd /Corba/ACE_wrappers/ace </p>
1604 <p>$make static_libs_only=1</p>
1605 <p>This will build your ace library libACE.a for VxWorks. If you use
1606 option shared_libs_only=1 then the build will be libACE.so. The other
1607 options are same as follows.</p>
1609 <p>5) Build TAO in Cygwin</p>
1610 <p>$cd $TAO_ROOT/tao</p>
1611 <p>$make debug=0 optimize=1 static_libs_only=1 minimum_orb=1
1612 </p>
1613 <p>for shared libs use shared_libs_only=1</p>
1615 <p>The minimum Tao does not have following components,</p>
1616 <p>Dynamic Skeleton Interface</p>
1617 <p>Dynamic Invocation Interface</p>
1618 <p>Dynamic Any</p>
1619 <p>Interceptors</p>
1620 <p>Interface Repository</p>
1621 <p>Advanced POA features</p>
1622 <p>CORBA/COM interworking</p>
1624 <p>You may play around with above options to find suitable build for
1625 your needs. For example when you give option debug=1 all the debug
1626 symbols will be created and the build will huge in size. The debug
1627 symbols are necessary when you want to debug your code.</p>
1629 <hr align="left" width="50%">
1631 <h2><a name="android">Building and Installing ACE on Android</a></h2>
1633 <ul>
1634 <li><a href="#android-target">Choosing the Target</a></li>
1635 <li><a href="#android-toolchain">Generating a Toolchain (Optional)</a></li>
1636 <li><a href="#android-oldndks">Using Older NDKs</a></li>
1637 <li><a href="#android-building">Building</a></li>
1638 <li><a href="#android-install">Installing ACE on Android</a></li>
1639 <li><a href="#android-logging">Logging</a></li>
1640 <li><a href="#android-openssl">OpenSSL</a></li>
1641 </ul>
1643 <p>ACE can be built for Android by using the <a
1644 href="https://developer.android.com/ndk/">Android Native Development Kit
1645 (NDK)</a>. This is different than the standard way of writing Android
1646 applications in Java which run the on the Android Runtime or the older Dalvik
1647 Virtual Machine. Applications and libraries built using the NDK are native
1648 Linux applications written in C or C++ specifically compiled to run on Android
1649 systems and libraries can be included in normal Android apps. In addition,
1650 applications and libraries built using the NDK have access to Android-specific
1651 APIs much like the ones available to Java-based Android applications.
1652 </p>
1654 <div class="boxed">
1655 <p><b>Windows Users:</b> These instructions are written for a Unix based
1656 platform like Linux, but can also be used on Windows. If you are using an
1657 virtualized Linux environment like Windows Subsystem for Linux (WSL), Docker,
1658 or a traditional VM, then you can use the Linux version of the NDK and ignore
1659 rest of this note and all the other Windows specific notes.
1660 </p>
1662 <p>If that is not the case, you should also pay attention to the notes marked
1663 with "<b>Windows Users:</b>" in addition to the rest of the instructions. In
1664 addition to the Windows version of the Android NDK, you will also need
1665 <a href="https://www.msys2.org">MSYS2 for Unix utilities that ACE needs</a>.
1666 </div>
1668 After downloading the NDK, you will have to decide on what target you want to
1669 build for, which is covered in the next section, then decide if you want to
1670 build directly using the NDK or using
1671 <a href="#android-toolchain">a generated standalone toolchain</a>. Generating a
1672 toolchain is optional and only really makes sense if you're building for just
1673 one architecture/API level pair and don't need to keep the entire NDK around.
1674 Using the NDK directly requires Android NDK r19 or later.
1676 <h3><a name="android-toolchain">Choosing the Target</a></h3>
1678 <p>To build ACE for Android you need to know the specific Android target you
1679 want. The specific target is defined by two things:</p>
1681 <dl class="indent">
1682 <dt>- The minimal API level to target.</dt>
1683 <dd>A lower level means larger amount of potential users but also
1684 potentially less features. Android has <a
1685 href="https://source.android.com/setup/start/build-numbers">many API levels
1686 to target</a>. They roughly correspond to the versions of Android.
1687 </dd>
1688 <dt>- The CPU architecture to target (Also called the Application Binary
1689 Interface or ABI by the NDK documentation).</dt>
1690 <dd>In addition to ARM, Android also supports x86 and MIPS,
1691 although support for MIPS has been dropped from the NDK. <a
1692 href="https://developer.android.com/ndk/guides/abis">This is the official
1693 documentation on the ABIs</a>. These are the ABIs that ACE supports at the
1694 time of writing and must be passed to ACE as <code>android_abi</code>:
1695 <!-- Check to see if any architectures have been added or removed. If so
1696 update this list and the table below as well-->
1697 <dl id="android_abis">
1698 <dt><code>armeabi-v7a</code></dt>
1699 <dd>32-bit ARM, The default ABI for both the NDK and ACE.</dd>
1700 <dt><code>armeabi-v7a-with-neon</code></dt>
1701 <dd><code>armeabi-v7a</code> with NEON extensions enabled.</dd>
1702 <dt><code>arm64-v8a</code></dt>
1703 <dd>64-bit ARM, Sometimes referred to as <code>aarch64</code>.</dd>
1704 <dt><code>x86</code></dt>
1705 <dd>32-bit x86</dd>
1706 <dt><code>x86_64</code></dt>
1707 <dd>64-bit x86</dd>
1708 </dl>
1709 <p><b>
1710 It should be noted that starting in August 2019, the Google Play
1711 Store will require new apps to have 64-bit libraries if they have native
1712 libraries. 32-bit native libraries will still be supported but apps must
1713 also have 64-bit libraries. Look up any restrictions that may affect apps
1714 you want to publish on the Play Store, including targeted API level
1715 requirements.
1716 </b></p>
1717 </dd>
1718 </li>
1719 </dl>
1721 <h3><a name="android-toolchain">Generating a Toolchain (Optional)</a></h3>
1723 <p>To generate a toolchain, one use must use
1724 <code>build/tools/make_standalone_toolchain.py</code> in the NDK. A destination must be
1725 chosen and is denoted here as <code>$TOOLCHAIN</code>. For example, to generate a
1726 toolchain targeting 32-bit ARM Android 7.0 "Nougat" (API Level 24) and later: </p>
1727 <p class="indent">
1728 <code>./make_standalone_toolchain.py --arch arm --api 24 --install-dir $TOOLCHAIN</code>
1729 </p>
1730 <p><code>$TOOLCHAIN/bin</code> must be in your <code>$PATH</code> when building ACE and
1731 applications using ACE.</p>
1733 <p>This table shows how the <code>android_abi</code> variable and the
1734 <code>--arch</code> argument correlate:</p>
1735 <table class="indent" id="android_abi_toolchain_table">
1736 <tr>
1737 <th><code>android_abi</code></th>
1738 <th><code>--arch</code></th>
1739 </tr>
1740 <tr>
1741 <td><code>armeabi-v7a</code></td>
1742 <td><code>arm</code></td>
1743 </tr>
1744 <tr>
1745 <td><code>armeabi-v7a-with-neon</code></td>
1746 <td><code>arm</code></td>
1747 </tr>
1748 <tr>
1749 <td><code>arm64-v8a</code></td>
1750 <td><code>arm64</code></td>
1751 </tr>
1752 <tr>
1753 <td><code>x86</code></td>
1754 <td><code>x86</code></td>
1755 </tr>
1756 <tr>
1757 <td><code>x86_64</code></td>
1758 <td><code>x86_64</code></td>
1759 </tr>
1760 </table>
1762 <div class=boxed>
1763 <p><b>Windows Users:</b>
1764 Android NDK includes Python in <code>prebuilt\windows-x86_64\bin</code> for
1765 64-bit Windows NDKs. For the example above, assuming <code>%NDK%</code> is the
1766 location of the NDK and <code>%TOOLCHAIN%</code> is the desired location of the
1767 toolchain, run this command instead:</p>
1769 <p class="indent">
1770 <code>
1771 %NDK%\prebuilt\windows-x86_64\bin\python.exe
1772 %NDK%\build\tools\make_standalone_toolchain.py
1773 --arch arm --api 24
1774 --install-dir %TOOLCHAIN%</code>
1775 </p>
1777 <p>For Windows <code>%TOOLCHAIN%\bin</code> and the location of the MSYS2
1778 utilities must be in <code>%PATH%</code> when cross compiling ACE. The default
1779 location for these would be <code>C:\msys64\usr\bin</code>.
1780 </div>
1782 <!-- Remove this section if these NDKs can be considered not supported anymore -->
1783 <h3><a name="android-oldndks">Using Older NDKs</a></h3>
1785 <p><b>Skip this section if using NDK r18 or later.</b></p>
1788 It is <b>highly recommended</b> to use the latest NDK available assuming
1789 that it works with ACE. It is possible to use NDKs older than r18, but these
1790 have caveats:
1791 </p>
1792 <ul>
1793 <li>
1794 In NDK r16, a file called <code>ndk-version.h</code> was added that
1795 contains the version of the NDK. If using an earlier NDK, you <b>must</b>
1796 define the macros <code>__NDK_MAJOR__</code> and <code>__NDK_MINOR__</code>
1797 in <code>ace/config.h</code> before
1798 <code>#include "ace/config-android.h"</code>.
1799 The scheme works like this:
1800 <table class="indent" style="margin-top: .5em; margin-bottom: .5em;">
1801 <tr>
1802 <th>Revision</th>
1803 <th><code>__NDK_MAJOR__</code></th>
1804 <th><code>__NDK_MINOR__</code></th>
1805 </tr>
1806 <tr>
1807 <td>r16</td>
1808 <td>16</td>
1809 <td>0</td>
1810 </tr>
1811 <tr>
1812 <td>r16a</td>
1813 <td>16</td>
1814 <td>1</td>
1815 </tr>
1816 <tr>
1817 <td>r16b</td>
1818 <td>16</td>
1819 <td>2</td>
1820 </tr>
1821 </table>
1822 </li>
1823 <li>
1824 As of NDK r18, the only compiler that comes with the NDK is clang and by
1825 default the build system assumes that clang is available and will use it.
1826 However there was a transitional period between r12 and r17 where GCC and
1827 clang both exist in the NDK. In some cases GCC should be used if linking
1828 errors occur with these NDKs (For example missing references to
1829 <code>stderr</code>). To let the build system decide between them, set
1830 <code>android_force_clang:=0</code> in
1831 <code>include/makeinclude/platform_macros.GNU</code> before including
1832 <code>platform_android.GNU</code>. <b>This should be set for NDKs before r15.</b>
1833 </li>
1834 <li>
1835 ACE does not support using the NDK directly before r18.
1836 </li>
1837 <li>
1838 There are probably unknown conflicts, especially in the minor revisions
1839 before the last minor revision of a NDK revision.
1840 </li>
1841 </ul>
1843 <h3><a name="android-building">Building</a></h3>
1845 <ul>
1846 <li>
1847 If building TAO, build the ACE and TAO tools (<code>ace_gperf</code> and
1848 <code>tao_idl</code>) for the host. Follow the <a
1849 href="../TAO/TAO-INSTALL.html">cross compilation setup instructions provide
1850 in TAO-INSTALL.html</a>.
1851 <div class="boxed indent">
1852 <p><b>Windows Users:</b> If cross compiling TAO and the host tools were
1853 built using using Visual Studio, make sure <code>cl.exe</code> can be run
1854 from the environment when building for Android, as <code>tao_idl</code>
1855 will need to use it as a C preprocessor.
1856 </div>
1857 </li>
1858 <li>Setup the Android build<ul>
1859 <li>Create <code>ace/config.h</code>: <code>#include "ace/config-android.h"</code></li>
1860 <li>Create <code>include/makeinclude/platform_macros.GNU</code>:
1861 <ul>
1862 <li>
1863 Set <code>android_abi</code> to one of
1864 <a href="#android_abis">the options above</a>.
1865 If using a standalone toolchain this must match the
1866 <code>--arch</code> argument used according
1867 to <a href="#android_abi_toolchain_table">the table above</a>.
1868 </li>
1869 <li>If using the NDK directly, set <code>android_ndk</code> to the
1870 location of the extracted NDK and <code>android_api</code> to the API
1871 level desired.</li>
1872 <li>Set options for debug and optimization options as desired.</li>
1873 <li>If you want to compile static, add <code>static_libs_only:=1</code></li>
1874 <li>Must include <code>include $(ACE_ROOT)/include/makeinclude/platform_android.GNU</code>.</li>
1875 <li>
1876 If building TAO, set the <code>tao_idl</code> options specified in
1877 the cross compiling instructions in <code>TAO-INSTALL.html</code>
1878 </li>
1879 </ul>
1880 </ul>
1881 </li>
1882 </li>
1883 <li>Generate makefiles (if necessary).</li>
1884 <li>Build with GNU make. If using a standalone toolchain, make sure you
1885 have <code>$TOOLCHAIN/bin</code> in your <code>$PATH</code>.
1886 <div class="boxed indent"><p>
1887 <b>Windows Users:</b> If using a standalone toolchain,
1888 Make sure you have <code>%TOOLCHAIN%\bin</code>
1889 and MSYS2's <code>bin</code> in your <code>%PATH%</code> when building.
1890 If you are cross compiling TAO you will also need a preprocessor for
1891 <code>tao_idl</code> available (See Windows note above).</p>
1892 </div>
1893 </li>
1894 </ul>
1895 </p>
1897 <h3><a name="android-install">Installing ACE on Android</a></h3>
1899 <p>Native applications using the ACE library can be installed onto devices by
1900 several different methods. The files can be include as assets of Java
1901 application and can be written by the Java application into it's executable
1902 program directory. The native application can be downloaded by a Java
1903 application and written into the Java applications executable program
1904 directory. The native application can also be uploaded using the Software
1905 Development Kit's ADB tool. This method requires uploading the native
1906 application to a directory that allows execution and having any output
1907 directed to a writable directory.</p>
1909 <h3><a name="android-logging">Logging</a></h3>
1911 On Android, <code>ACE_Log_Msg</code> (and therefore <code>ACE_DEBUG</code> and
1912 <code>ACE_ERROR</code>) uses Android's logging system (aka Logcat) by default
1913 in addition to <code>stderr</code> because <code>stdout</code> and
1914 <code>stderr</code> are discarded under normal circumstances. To disable this
1915 at runtime, run:
1916 </p>
1918 <pre class="indent">
1919 ACE_LOG_MSG-&gt;clr_flags (ACE_Log_Msg::SYSLOG);
1920 </pre>
1922 <p>To disable this at compile time include these lines in <code>config.h</code>:</p>
1924 <pre class="indent">
1925 #define ACE_DEFAULT_LOG_FLAGS ACE_Log_Msg::STDERR
1926 #define ACE_DEFAULT_LOG_BACKEND_FLAGS 0
1927 </pre>
1929 <h3><a name="android-openssl">OpenSSL</a></h3>
1931 Depending on the features of ACE, TAO, or other software desired, you might need
1932 OpenSSL. On Android, OpenSSL isn't part of the NDK Library and Android
1933 preloads the system SSL library (either OpenSSL or BoringSSL) for the Java
1934 Android API. This means OpenSSL <b>MUST</b> be statically linked to avoid
1935 conflicts with the almost certianly incompatible system SSL library.
1937 To build OpenSSL for Android, please read <code>NOTES.ANDROID</code> that comes
1938 with OpenSSL's source code. The static libraries will used if the shared
1939 libraries are not found. This can be accomplished by either disabling the
1940 generation of the shared libraries by passing <code>no-shared</code> to
1941 OpenSSL's <code>Configure</code> script or just deleting the so files after
1942 building OpenSSL.
1943 </p>
1945 <hr>
1946 <h1><a name="svcsinstall">Building and Installing ACE Network Services</a></h1>
1948 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>.
1950 <p></p><hr align="left" width="50%"><p>
1951 </p><h2><a name="unixsvcs">Building and Installing ACE Network Services on UNIX</a></h2>
1953 Building and installing ACE Network Services on UNIX is relatively
1954 simple (the <a href="#win32svcs">process</a> for Win32 is different).
1955 Here's what you need to do:<p>
1957 </p><ol>
1959 <li>Build and install ACE on UNIX as described <a href="#unix">earlier</a>. If ACE is built at the root of the ACE
1960 source tree (and ACE has been ported to your platform, of course) the
1961 netsvcs static and shared object libraries should be built
1962 automatically. In addition, the server driver program
1963 (<code>main</code>) contained in <a href="netsvcs/servers/main.cpp">$ACE_ROOT/netsvcs/servers/main.cpp</a>
1964 should also be compiled and ready to run.<p>
1966 </p></li><li>Set your <code>LD_LIBRARY_PATH</code> environment variable to
1967 where the binary version of the ACE netsvcs library. For
1968 example, you probably want to do something like the following<p>
1970 </p><pre><code>
1971 % setenv LD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib:$LD_LIBRARY_PATH
1972 </code></pre><p>
1974 </p></li><li>By default, if the shared object library is built, the services
1975 are linked into the <code>main</code> driver program dynamically.
1976 To specify which services should be linked in and executed, edit the
1977 <a href="netsvcs/servers/svc.conf">$ACE_ROOT/netsvcs/servers/svc.conf</a>
1978 file. During your editing, you should update information (such as the
1979 default service port numbers) that affects the initialization of
1980 services in this file. Refer to the
1981 <a href="http://www.dre.vanderbilt.edu/~schmidt/ACE-papers.html#config">Service Configurator</a>
1982 documentation to learn how the configuration file is parsed and
1983 how the services are dynamically linked and executed. In
1984 addition, refer to the <a href="http://www.dre.vanderbilt.edu/~schmidt/ACE-netsvcs.html">Network
1985 Services</a> documentation to learn more about how to configure
1986 each network service.<p>
1988 </p></li><li>If you only want to link the services statically, simply remove
1989 or rename the svc.conf file.<p>
1990 </p></li></ol>
1992 <p></p><hr align="left" width="50%"><p>
1993 </p><h2><a name="win32svcs">Building and Installing ACE Network Services on Win32</a></h2>
1995 Once again, there are supplied project for Visual C++ 7.1 or later for
1996 the Network Services.<p>
1998 </p><hr>
1999 <h1><a name="sslinstall">Building and Installing the ACE_SSL Library</a></h1>
2001 <p>The first step for all platforms is to build and install the
2002 <a href="http://www.openssl.org/">OpenSSL</a> distribution. The
2003 ACE_SSL library must then be built according to the instructions
2004 below.</p>
2005 <h2>Unix</h2>
2006 <ol>
2007 <li>Make sure the OpenSSL header file directory is in your compiler's
2008 include path, and that OpenSSL libraries are in your library link/load
2009 path (e.g. <code>LD_LIBRARY_PATH</code>). If you
2010 installed OpenSSL into a set of directories unknown by the compiler,
2011 set the <code>SSL_ROOT</code> environment variable to point to the
2012 top level directory of your OpenSSL distribution, i.e. the one
2013 containing OpenSSL's <code>include</code> and <code>lib</code>
2014 directories.</li>
2015 <li>Build ACE as described above. When building ACE, add
2016 <code>ssl=1</code>
2017 to your <code>make</code>
2018 command line invocation, or add it to your
2019 <code>platform_macros.GNU</code> file.</li>
2020 <li>Build the ACE_SSL library in the <tt>$ACE_ROOT/ace/SSL</tt>
2021 directory. The <code>ACE_ROOT</code> environment variable should be set
2022 prior to this point.</li>
2023 </ol>
2024 <h2>Microsoft Visual Studio</h2>
2025 <ol>
2026 <li>Set the <code>SSL_ROOT</code> environment variable to the location
2027 of the directory containing the OpenSSL <code>inc32</code> and
2028 <code>out32dll</code> directories.
2029 <li>Add <code>ssl=1</code> to your MPC
2030 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
2031 or <code>$ACE_ROOT/local.features</code> file.
2032 <li>At the moment you are using OpenSSL v1.1 or
2033 newer also add <code>openssl11=1</code> to your MPC
2034 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
2035 or <code>$ACE_ROOT/local.features</code> file.
2036 <li>Re-run MPC to add
2037 support for building the ACE_SSL library to your MSVC++
2038 workspaces and projects.
2039 <li>Open the <code>ACE.sln</code> solution, and refer to the ACE build
2040 and installation instructions above for details on creating a
2041 <code>config.h</code> configuration header for this platform. Once
2042 the <code>config.h</code> file has been created, build the
2043 <code>ACE_SSL</code> project.</li>
2044 </ol>
2045 <h2>Embarcadero C++</h2>
2046 <p>Support for building ACE's ACE_SSL library and TAO's SSLIOP
2047 pluggable protocol with Embarcadero C++ does exist.
2048 <ol>
2049 <li>Set the <code>SSL_ROOT</code> environment variable to the location
2050 of the directory containing the OpenSSL <code>inc32</code> and
2051 <code>out32</code> directories.
2052 <li>Add <code>ssl=1</code> to your MPC
2053 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
2054 or <code>$ACE_ROOT/local.features</code> file, and re-run MPC to add
2055 support for building the ACE_SSL library to your Embarcadero C++ makefiles.
2056 <li>Build ACE and TAO.
2057 </ol>
2058 </p>
2060 <hr><p>
2061 </p><h1><a name="guireactor_install">Building and Using GUI Reactors Libraries</a></h1>
2062 There is a general method for building and using <code>ACE_Reactors</code> for various GUI
2063 libraries.
2064 <h2> Building GUI Reactor Library </h2>
2065 <ol>
2066 <li>Try to generate build files using MPC. Inspect the output of MPC to find out which features are
2067 necessary to build given reactor. Add these features to
2068 <code>ACE_wrappers/bin/MakeProjectCreator/*.features</code> file, or pass them directly to MPC
2069 using <code>-features</code> command line option. For example, for <code>FlReactor</code> the procedure
2070 consists of five steps
2071 <ol>
2072 <li> In the first pass one gets that <code>x11</code> (X11 libraries) is missing.<br>
2073 <code>$ mwc.pl -type gnuace
2074 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires x11.
2075 </code></li>
2076 Ensure that <code>X11</code> libraries are installed, then pass <code>x11=1</code> feature to MPC.
2077 <li>In the second pass one gets that <code>gl</code> (OpenGL library) is missing.<br>
2078 <code>$ mwc.pl -type gnuace -features x11=1 ace.mwc
2079 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires gl.
2080 </code></li>
2081 Ensure that <code>OpenGL</code> libraries are installed, then pass <code>gl=1</code> feature to MPC.
2082 <li>In the third pass one gets that <code>fl</code> (Fast Light Toolkit) is missing.<br>
2083 <code>$ mwc.pl -type gnuace -features x11=1,gl=1 ace.mwc
2084 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires fl.
2085 </code></li>
2086 Ensure that <code>Fast Light Toolkit</code> libraries are installed, then pass <code>fl=1</code>
2087 feature to MPC.
2088 <li>In the fourth pass one gets that <code>ace_flreactor</code> feature is missing<br>
2089 <code>$ mwc.pl -type gnuace -features x11=1,gl=1,fl=1 ace.mwc
2090 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires ace_flreactor.
2091 </code></li>
2092 Allow MPC to generate makefiles for <code>FlReactor</code> by setting <code>ace_flreactor=1</code> feature.
2093 <li>In the last pass one obtains files for building <code>FlReactor</code>.<br>
2094 <code>$ mwc.pl -type gnuace -features x11=1,gl=1,fl=1,ace_flreactor=1 ace.mwc
2095 </code></li>
2096 </ol>
2097 Currently to simplify MPC generation some of features are turned on by default in
2098 <code>ACE_wrappers/bin/MakeProjectCreator/global.features</code>. For examples to generate
2099 files related with Fl one has to provide only fl=1 feature. To obtain a more fine grained controll
2100 over MPC generation process one may modify <code>ACE_wrappers/bin/MakeProjectCreator/*.features</code>
2101 files.
2102 </li>
2103 <li> Required build files are generated now, it is enough then to invoke build tool.
2104 For example for under <code>MPC::gnuace</code> one has to call
2105 <code>make fl=1</code>. For <code>MPC::vc7</code> target all features are
2106 encoded in generated project files, thus it is enough to compile ACE using MSVC.
2107 </li>
2108 </ol>
2109 The build procedure leads to a specific GUI Reactor library. For example, for
2110 <code>Qt</code> and <code>Linux </code> one gets <code>libQtReactor.so</code>, while for
2111 <code>Windows</code> the results are shared <code>QtReactor.dll</code> and import
2112 <code>QtReactor.lib</code> libraries or their variants depending on build options.
2113 When compiling TAO also GUI related libraries are created like <code>libTAO_QtResource.so</code>.
2114 <h2> Using GUI Reactor Library </h2>
2115 Here one has at least three use cases:
2116 <ol>
2117 <li><b>Applications with their own build system.</b>
2118 To use ACE support for GUI one has to include specific GUI headers and
2119 link with specific <code>ACE_[GUI]Reactor</code> library. When using TAO support for GUI one has
2120 also to link with specific <code>TAO_[GUI]Resource</code> library.</li>
2121 <li><b>Applications with build system using MPC.</b>
2122 In general, it is better to create specific base projects for using ACE GUI support in such application.
2123 Base projects provided by ACE <code>ACE_wrappers/bin/MakeProjectCreator/[ace,tao]_[gui][reactor,resource].mpb</code>
2124 may be an examples of how to do this.</li>
2125 <li><b>Internal ACE applications like tests or examples.</b>
2126 MPC project for internal ACE application using GUI support should be derived from
2127 <code>ace_[gui]reactor.mpb</code> base projects. To employ TAO support for GUI one should derive
2128 the project from <code>tao_[gui]resource.mpb</code> These base projects ensure that all necessary libraries
2129 are linked to the application, specifies features necessary to build a project and moreover impose a
2130 build order consistant with ACE. For example, the application project using <code>XtReactor</code> should be
2131 derived from <code>ace_xtreactor.mpb</code>.</li>
2132 </ol>
2133 <h2>Notes on specific GUI Reactors</h2>
2134 <ul>
2135 <li> <code>QtReactor</code></li>
2136 The build is controlled by <code>ace_qtreactor</code> [1 by default] feature.
2137 To build this reactor one has to provide feature <code>qt</code> [0 by default] (Qt library). Moreover,
2138 it is assumed that <code>Qt</code> was installed in a standard way
2139 and <code>QTDIR</code> points to <code>Qt</code> installation folder. To build TAO
2140 support for <code>Qt</code> one should use <code>tao_qtresource</code> [1 by default] feature.
2141 <li> <code>XtReactor</code></li>
2142 The build is controlled by <code>ace_xtreactor</code> [1 by default] feature.
2143 To build this reactor one has to provide the following features: <code>x11</code> [1 by default]
2144 (X11 libraries) and <code>xt</code> [1 by default] (X11 Toolkit).
2145 Moreover, some examples and tests related with <code>XtReactor</code>
2146 needs additionall features namely either <code>motif</code> [0 by default] (Motif/Lesstif libraries) or
2147 <code>athena</code> [0 by default] (Athena widgets). To build TAO
2148 support for <code>xt</code> one should use <code>tao_xtresource
2149 </code> [1 by default] feature.
2150 <li> <code>TkReactor</code></li>
2151 The is controlled by <code>ace_tkreactor</code> [1 by default] feature. To build this reactor one has to provide
2152 <code>tk</code> [0 by default] (Tcl libraries) feature. To build TAO
2153 support for <code>Tk</code> one should use <code>tao_tkresource</code> [1 by default] feature.
2154 <li> <code>FlReactor</code></li>
2155 The build is controlled by <code>ace_flreactor</code> [1 by default] feature.
2156 To build this reactor one has to provide the following features: <code>x11</code>
2157 [1 by default] (X11 libraries),
2158 <code>gl</code> [1 by default] (OpenGl) and <code>fl</code>
2159 [0 by default] (Fast Light Toolkit). To build TAO
2160 support for <code>Fl</code> one should use <code>tao_flresource</code> [1 by default] feature.
2161 <strong>MS Windows:</strong> The paths to <code>fltkdll</code> and
2162 <code>OpenGL32</code> libraries, as well as <code>fltk</code> header files
2163 should be setup manually for succesfull compilation. Obviosuly,
2164 <code>x11</code>switch is ignored for this platform.</li>
2165 </ul>
2167 <hr>
2168 <h1><a name="installnotes">Installation Notes</a></h1>
2170 <ul>
2171 <li><b>Windows (Windows NT, 2000, XP, 2003, etc., and Windows '9x/ME) </b><p>
2173 Please see the <a href="#NonStaticObjectManager">Non-static
2174 ACE_Object_Manager</a> discussion below.</p><p>
2176 </p></li><li><b>Windows CE</b><p>
2178 Take a look at (<a href="docs/CE-status.txt">CE-status.txt</a>) for
2179 up-to-date information about ACE on Windows CE and Windows Mobile.
2181 </p></li><li><b> Solaris 7, 8, 9, and 10 using Sun ONE Studio 8 (C++ 5.5)
2182 or higher, Centerline C++ 2.x, GNU gcc 2.95 and
2183 later.</b><p>
2185 All the source code and tests should build and run without any
2186 problems on Solaris 7, 8, and 9 platforms using the above
2187 Sun C++ compilers.
2189 There are likely to be build problems with older versions or
2190 different patchlevels of Sun C++. Likewise, on
2191 Solaris with g++ you may need to use GNU as instead of
2192 /usr/ccs/bin/as, if you want -gstabs+ and -pipe support.
2194 Thanks to Susan Liebeskind &lt;shl@janis.gtri.gatech.edu&gt;
2195 for providing the following useful information:</p><p>
2197 By default, ACE uses both the Solaris and POSIX thread
2198 interface. To disable use of the Solaris thread interface, add
2199 <code>-D_POSIX_PTHREAD_SEMANTICS</code> to the
2200 <code>CFLAGS</code> in your
2201 <code>$(ACE_ROOT)/include/makeinclude/platform_macros.GNU</code>.
2202 See the Solaris Intro (3) man page for more information.</p><p>
2204 To disable ACE thread support completely, build with the
2205 <code>threads=0</code> make flag. See the <a href="#flags">Makefile Flags</a> section below for more
2206 information on make flags.</p><p>
2208 If you use g++ on Solaris 7, you might need to rebuild
2209 it on a SunOS 5.7 (Solaris 7) host. Some versions of g++
2210 provide replacements for system header files. The
2211 replacements on older SunOS systems are not compatible with the
2212 SunOS 5.7 system headers. </P>
2214 </li><li><b>AIX</b><p>
2216 ACE is currently supported on AIX 5.2 and higher using IBM's
2217 Visual Age C++ 6 and XL C++ 7 compilers as well as g++ 3.2.</p><p>
2219 The <code>ace/config-aix-5.x.h</code> file is recommended for all
2220 compilers on all AIX 5L versions. The Asynchronous I/O functionality
2221 is disabled by default because its use requires the system administrator
2222 to explicitly enable it in the kernel using SMIT. If this has been
2223 done and you want to enable asynchronous I/O support in ACE, add:
2224 <code>#define ACE_HAS_AIO_CALLS</code> to your <code>config.h</code>
2225 file before including <code>ace/config-aix-5.x.h</code>.</p><p>
2227 The Visual Age 6.0.0.3 and 6.0.0.4 do have some bugs that makes
2228 them unusable for building TAO. TAO has been tested with 6.0.0.12 and
2229 had no problems with that version.</p><p>
2231 For your <code>platform_macros.GNU</code> file, you should use
2232 <code>platform_aix_ibm.GNU</code> when building ACE with any of the
2233 IBM compilers and <code>platform_aix_g++.GNU</code> when building ACE
2234 with g++.</p><p>
2236 BTW, here's a technique from Rob Jordan &lt;<a href="mailto:jordan@hursley.ibm.com">jordan@hursley.ibm.com</a>&gt;
2237 that can reduce the size of the ACE libraries by about one
2238 third, and can also be applied to applications. It works by
2239 optimising the sharing of template functions, which are created
2240 in an "unusual" way under AIX. It also speeds up
2241 compilation.</p><p>
2243 Here's how to optimise the ACE library generation:</p><p>
2245 Look at the <a href="ace/GNUmakefile.ACE">ace/GNUmakefile.ACE</a>
2246 in <code>$ACE_ROOT/ace</code>. Create a file called
2247 <code>ACE_All_Src.cpp</code>, and add a line to #include
2248 each of the source files
2249 listed under <code>FILES=</code> in the GNUmakefile. Create a
2250 file called <code>ACE_All_Tmp.h</code>
2251 and add a line to #include each of the .h files listed under
2252 <code>TEMPLATE_FILES=</code> in the GNUmakefile. Now update the
2253 GNUmakefile so that
2254 <code>FILES=ACE_All_Src</code> and
2255 <code>TEMPLATE_FILES=ACE_All_Tmp</code>.</p><p>
2257 </p></li><li><b><a name="Linux">Linux</a></b><p>
2259 ACE has been ported to Linux on
2260 Intel, Alpha, and PowerPC platforms. If you use a RedHat 5.x
2261 distribution, it's best to use RedHat 5.1 or later. ACE works
2262 without any modifications on RedHat 5.1 and later, and on
2263 Debian 2.1 on both Intel and Alpha. Use the
2264 <code>platform_linux.GNU</code> and <code>ace/config-linux.h</code>
2265 in your <code>platform_macros.GNU</code> and
2266 <code>config.h</code> files, respectively. The same
2267 files can be used on PowerPC, with LinuxPPC
2268 1999 (R5), with glibc 2.1.1.</p><p>
2270 If you run out of memory, it's easy to add virtual memory on
2271 Linux. Please see the <code>mkswap</code> man page. You'll
2272 need at least 256 to 300 Mb of virtual memory (RAM + swap) to
2273 compile all of ACE+TAO. The <a href="#resource_requirements">System
2274 Resource Requirements section</a> has some suggestions on how
2275 to reduce the memory requirement.</p><p>
2277 The glibc 2.0 dynamic loader isn't thread safe. If you want to
2278 use the Invocation API you'll have to set
2279 <code>LD_BIND_NOW=true</code>. If you want to use
2280 <code>dlopen</code>, you should use <code>RTLD_NOW</code>. The
2281 dynamic loader in glibc 2.1 is thread safe.</p><p>
2283 <strong>NOTE:</strong> The TAO NameService uses IP multicasting
2284 by default, though it is not required. IP multicast on Linux
2285 requires the following:</p><p>
2287 </p><ul>
2288 <li>Enable IP multicast in the Linux kernel. It is enabled in
2289 the default RedHat 5.1 kernel. In older distributions, you
2290 can enable it by rebuilding your kernel with CONFIG_IP_MULTICAST
2291 enabled.<p>
2292 </p></li><li>Enable IP multicast in ACE. It is enabled by default in
2293 <code>ace/config-linux.h</code>. If you don't use
2294 IP multicast, add <code>#define ACE_HAS_IP_MULTICAST 0</code>
2295 to your <code>ace/config.h</code> before building ACE.<p>
2296 </p></li><li>There must be a network interface that is up and supports
2297 multicast. If you have linuxconf, it's easiest to use that
2298 to add a network route for multicast (224.0.0.0) on one of
2299 your network interfaces, such as <code>eth0</code>. If
2300 you don't have or use linuxconf, try adding a multicast
2301 routing table entry using something like this:<p>
2302 </p><pre> <code># route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0</code>
2303 </pre><p>
2304 </p></li></ul>
2306 Some of the ACE tests fail on older, pre-glibc2 Linux platforms,
2307 such as RedHat 4.2. The problems are with threads and
2308 thread-specific storage.</p><p>
2310 </p></li><li><b>SCO UNIX</b><p>
2312 ACE has been ported to SCO UNIX using the GNU g++ 2.7.2
2313 compiler. Arturo Montes &lt;<a href="mailto:mitosys@colomsat.net.co">mitosys@colomsat.net.co</a>&gt;
2314 maintains this code. In addition, he also maintains a version
2315 of <a href="http://www.cs.wustl.edu/%7Eschmidt/ACE_wrappers/FSU-threads.tar.gz">FSU pthreads</a>.</p><p>
2317 </p></li><li><b>SGI IRIX 5.x and 6.x</b><p>
2319 ACE used to build fine using the SGI C++ and GNU GCC compilers
2320 for IRIX 5.x. It has been ported to IRIX 6.x using the SGI
2321 MipsPro 7.1 C++ compiler; be aware that in IRIX 6.2 there is a
2322 number of patches that have to be installed and exceptions
2323 appear to fail with the O32 ABI. Please check the config files
2324 for the details.</p><p>
2326 </p></li><li><b>OSF/1 3.2 and 4.0 (a.k.a. Digital UNIX 4.0)</b> <p>
2328 The Digital UNIX C++ 5.4 through 5.7 compilers have problems
2329 with ACE's templates. They compile the lib and most of the test
2330 programs, although they warn about template usage. Most tests
2331 run, some dump core. If you use a 5.x version of cxx, be sure
2332 to set the CXX_VER variable to CXX_5, either on your make
2333 command line or in an environment variable. The ACE Makefiles
2334 assume by default that the cxx version is 6.x or later.</p><p>
2336 CXX 6.0 and 6.1 are much improved over 5.x: V6.0-020, V6.1-025,
2337 and later build all of ACE cleanly. All of the tests in
2338 $(ACE_ROOT)/tests run successfully with CXX 6.0 and CXX 6.1.
2339 Please note that problems have been reported with some versions
2340 of CXX 6.1, notably versions -021 and earlier. It's best to use
2341 V6.1-022 or later.</p><p>
2343 NOTE: if you use Digital UNIX 4.0f or later, you <strong>must</strong>
2344 use <code>ace/config-tru64.h</code> instead of
2345 <code>ace/config-osf1-4.0.h</code>. <code>ace/config-tru64.h</code>
2346 can be used for all supported compilers on any version of
2347 Digital UNIX after and include 4.0. And, with 4.0f and later when
2348 using Digital CXX, you <strong>must</strong> use
2349 <code>include/makeinclude/platform_tru64_cxx.GNU</code> instead of
2350 <code>include/makeinclude/platform_osf1_4.0.GNU</code>.</p>
2352 </li><li><b> FreeBSD </b><p>
2354 FreeBSD is a fast evolving platform. However, it has the
2355 advantage of having standard releases. At this moment, ACE is
2356 only perodically tested against -stable (3.1R) and we rely a lot
2357 on FreeBSD users' feedbacks. </p><p>
2359 Notice that on older FreeBSD, <code>ld.so</code> only looks for
2360 so libraries with <b>version number</b> appended. ACE makefiles
2361 create symlinks for most shared libraries if
2362 <code>versioned_so</code> is defined to 1 in
2363 <code>$ACE_ROOT/ace</code> with appropriate ACE version.
2364 However, this does not work for libACE.so itself so you have to
2365 create it manually (If you figure out how to do this, please let
2366 us know) like this: </p><p>
2368 <code>ln -sf $ACE_ROOT/ace/libACE.so $ACE_ROOT/ace/libACE.so.4.5</code></p><p>
2370 On newer FreeBSD (3.0 or later,) this is no longer necessary.</p><p>
2372 </p></li><li><b>NetBSD</b><p>
2374 Like older FreeBSD, NetBSD's <code>ld.so</code> also requires
2375 versioned .so files.</p><p>
2377 </p></li><li><b>OpenBSD</b><p>
2379 ACE has been ported to OpenBSD 3.1 and GNU g++ 2.95.3.</p><p>
2381 As with FreeBSD and NetBSD, OpenBSD requires versioned .so
2382 files. This is currently handled by the build files and no
2383 additional work is needed.</p><p>
2385 ACE has been ported to OpenBSD with and without pthreads
2386 enabled. When using pthreads, though, C++ exceptions must be
2387 disabled. This is a known problem with the current release of
2388 OpenBSD (see www.openbsd.org, bug #1750). ACE emulated
2389 exceptions work fine.</p><p>
2391 Compiling TAO may require the user data segment size
2392 restrictions and possibly other options to be increased. This
2393 is done by modifying the default user class in /etc/login.conf
2394 or by adding a new class and modifying the master passwer file
2395 accordingly.</p><p>
2397 </p></li><li><b> UnixWare </b> <p>
2399 Steve Huston &lt;<a href="mailto:shuston@riverace.com">shuston@riverace.com</a>&gt;
2400 has ported ACE to work with UnixWare 2.01 and g++.</p><p>
2402 Ganesh Pai &lt;<a href="mailto:gpai@voicetek.com">gpai@voicetek.com</a>&gt;
2403 subsequently did the port for version 2.1.2, also with g++.</p><p>
2405 Phil Mesnier &lt;<a href="mailto:mesnier_p@ociweb.com">
2406 mesnier_p@ociweb.com</a>&gt; updated the port to support
2407 UnixWare 7.1.0, with help from Michael Meissnitzer
2408 &lt;<a href="mailto:michael.meissnitzer@siemens.at">
2409 michael.meissnitzer@siemens.at</a>&gt;, Christian Klepp &lt;
2410 <a href="mailto:christian.klepp@siemens.at">christian.klepp@siemens.at
2411 </a>&gt; and Engelbert Staller &lt;<a href="mailto:engelbert.staller@siemens.at">
2412 engelbert.staller@siemens.at</a>&gt;
2413 Building ACE (and TAO) on Unixware 7.1.0 requires a very specific
2414 g++ build environment. In particular, you must build and install
2415 g++ 2.95.2, along with binutils 2.9.1. The order (and the declaration
2416 of configuration) is extremely important. Using the gcc compiler
2417 provided on the Skunkware CD on a pentium system, here is the recipe
2418 I used to build a working environment (as root):<br>
2419 </p><pre> mkdir /usr/local/newgnu
2420 &lt; ftp and untar binutils-2.9.1 &gt;
2421 &lt; ftp and untar gcc-2.95.2 &gt;
2422 mkdir -p build/binutils build/gcc
2423 cd build/binutils
2424 ../../binutils-2.9.1/configure i386-sco-sysv4
2425 gmake # takes a long time
2426 gmake install # this creates /usr/local/i386-sco-sysv4/...
2427 mkdir /usr/local/i486-pc-sysv5/bin
2428 cd /usr/local/i486-pc-sysv5/bin
2429 for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
2430 #links all the newly installed utilities
2432 cd /usr/local/newgnu/build/gcc
2433 ../../gcc-2.95.2/configure --with-gnu-as --with-gnu-ld
2434 gmake bootstrap # takes a long time
2435 gmake install
2436 mkdir /usr/local/i586-UnixWare7.1.0-sysv5/bin
2437 for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
2438 </pre>
2439 Once done, ACE and TAO will successfully build and link.<p>
2441 </p></li><li><b><a name="LynxOS">LynxOS</a></b><p>
2443 ACE builds and runs properly on LynxOS 4.0 for Intel
2444 and PowerPC targets. LynxOS 2.x and 3.x are no longer supported.
2446 If you run out of memory on LynxOS, these might help:</p><p>
2448 </p><ul>
2449 <li>Increase the limits in <code>/etc/starttab</code>,
2450 then reboot system. We use these limits:
2451 <pre># Data, stack, and core file limits (in Kbytes)
2452 80000
2453 16000
2454 102400</pre><p>
2455 </p></li><li>Enable or expand virtual memory, with something like:
2456 <pre># mkcontig /swap 320
2457 # prio 17 vmstart /swap</pre>
2458 See the <code>mkcontig</code> and <code>vmstart</code>
2459 man pages, and <code>/bin/rc</code>.<p>
2460 </p></li></ul>
2462 Please see the comments in the
2463 <a href="include/makeinclude/platform_lynxos.GNU">ACE
2464 platform_lynxos.GNU file</a> for information on, and an
2465 example of, tailoring for your particular platform.<p>
2467 NOTE: if you want to use IP multicast on LynxOS, be sure to add
2468 this line to your <code>/net/rc.network</code>, and reboot:</p><p>
2469 </p><pre><code>
2470 /bin/route add "224.0.0.0" "$my_name"
2471 </code></pre>
2473 </li><li><strong>VxWorks</strong><p>
2475 David Levine has
2476 ported ACE to VxWorks 5.2/5.3/5.3.1/5.4 with the GreenHills
2477 1.8.8/1.8.9, g++ and diab compilers that are distributed with
2478 VxWorks/Tornado. It is not possible to use VxWorks 5.4
2479 and earlier with ACE anymore because the compilers delivered with
2480 5.4 and earlier don't support the C++ features ACE needs.</p><p>
2482 At this moment <a href="https://www.remedy.nl">Remedy IT</a> is upgrading
2483 and stabilizing ACE/TAO support for Tornado 2.2/VxWorks 5.5.1.
2484 Since the existing support for previous VxWorks version has been unsupported
2485 and broken for some time and most (potential) users seem to have upgraded to
2486 VxWorks 5.5.1 no backporting effort is done. See also <a href="#vxworks">here</a>.
2487 </p><p>
2489 Tornado 2.2/VxWorks 5.5.1 support IP multicast. That is not enabled
2490 by default in ACE for VxWorks, because it depends on your
2491 kernel configuration. To enable it, add
2492 <code>#define ACE_HAS_IP_MULTICAST</code> to your
2493 <code>ace/config.h</code>.</p><p>
2495 NOTE: In order for the ACE Broadcast and Multicast tests to work the VxWorks kernel
2496 should receive the packages it sends out locally. By default this is not supported.
2497 To enable this behaviour you need to include the IFF_SIMPLEX flag for your required
2498 NIC driver. See the following Windriver <a href="https://secure.windriver.com/cgi-bin/windsurf/techtips/public/viewSum.cgi?4542">SPR 4542</a>
2499 for more information.</p><p>
2501 In addition to all of the other benefits of ACE, it helps work
2502 around some deficiencies with VxWorks. The problems are:</p>
2505 </p><ol>
2506 <li>The program entry point cannot be called "main" with g++. ACE
2507 renames it to "ace_main" (configurable via ACE_MAIN) on VxWorks.
2508 While this may seem trivial, it is important with legacy code.
2509 ACE itself ran into this problem.<p>
2511 </p></li><li>argc/argv isn't used with VxWorks entry points. ACE provides
2512 a wrapper function that transparently converts shell command
2513 line arguments to argc/argv form. See <a href="#spa">below</a>
2514 for details.<p>
2516 </p></li></ol>
2518 Please note that ACE uses one of the spare fields in the Wind
2519 River task control block, spare4, for thread-specific storage.
2520 This field is specified in only one place, in ace/OS_NS_Thread.inl, so it
2521 can easily be changed to one of the other spare fields, if
2522 necessary.</p><p>
2524 ACE destroys dynamically
2525 allocated singletons in the ACE library. But, they may not
2526 properly destroy some static objects. If you have trouble
2527 running a program multiple times, it may be necessary to unload
2528 the module, using unld, and reload it between runs.
2529 Alternatively, you could try calling <code>cplusDtors</code> and
2530 then <code>cplusCtors</code> between runs.</p><p>
2532 </p></li><li><b>MVS OpenEdition</b> <p>
2534 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;.
2535 The ACE library, all the tests and most of the examples and apps
2536 build clean. There are still some problems that need to be
2537 ironed out:</p><p>
2539 MVS does not support the dynamic linking dl...() calls that the
2540 Service Configurator uses to dynamically link services at run
2541 time. As a result, all the examples and apps that use a svc.conf
2542 file (for dynamically configuring service objects) do not work,
2543 however, most of these apps can be built/run statically. Also,
2544 the Svc_Conf_l.cpp and Svc_Conf_y.cpp files are generated using
2545 flex and yacc on a ascii (not ebcdic) machine and as a result
2546 they don't work very well with ebcdic svc.conf files. We should
2547 be able to regenerate these files on MVS but MVS doesn't have
2548 flex. This is something that needs to be done.</p><p>
2550 Some of the tests do not execute properly. This is a minority
2551 and over time the goal is to get to 100%.</p><p>
2553 The make scheme for some of the apps still doesn't work
2554 perfectly on MVS. This is mainly due to the way shared
2555 libraries are handled on MVS. See <a href="#mvs">additional
2556 build tips for MVS</a> for more on this.</p><p>
2558 </p></li><li><strong>QNX Neutrino</strong><p>
2560 ACE has been ported to <a href="http://www.qnx.com/products/os/neutrino.html">QNX Neutrino
2561 2.0</a>. We cross-compile for Neutrino on a QNX4 host using g++
2562 2.8.1, using the <a href="ace/config-qnx-neutrino.h">ace/config-qnx-neutrino.h</a>
2563 and <a href="include/makeinclude/platform_qnx_neutrino.GNU">include/makeinclude/platform_qnx_neutrino.GNU</a>
2564 configuration files. Many of the ACE tests succeed, though some
2565 fail. As the porting effort progresses, we hope to eliminate
2566 these failures. If you know of fixes, please send them to
2567 us.</p><p>
2568 </p></li><li><strong>QNX RTP</strong><p>
2570 ACE has been ported to <a href="http://get.qnx.com/">QNX RTP
2571 </a>. We compile for QNX RTP using the GCC compiler shipped with the
2572 distribution, using the <a href="ace/config-qnx-rtp.h">ace/config-qnx-rtp.h</a>
2573 and <a href="include/makeinclude/platform_qnx_rtp_gcc.GNU">include/makeinclude/platform_qnx_rtp_gcc.GNU</a>
2574 configuration files.
2575 Many of the ACE tests succeed, though some
2576 fail. As the porting effort progresses, we hope to eliminate
2577 these failures. If you know of fixes, please send them to
2578 us.</p><p>
2579 <strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
2580 Under the current version of QNX RTP ACE fails if compiled with
2581 inline=0 . </p><p>
2583 </p></li><li><strong><a name="rtems">RTEMS</a></strong><p>
2585 The support for RTEMS has been revived from version x.5.4. This version
2586 was the first version that build again out of the box on RTEMS. Compilation
2587 and testing was done for RTEMS with and without networking support. The
2588 ACE GNU makefiles do automatically detect whether networking support
2589 is available or not.
2591 Besides the standard config.h/platform_macros.GNU file you will need
2592 to set <code>RTEMS_MAKEFILE_PATH</code> to point to the location
2593 of your RTEMS installation, see below for an example.</p>
2594 <p><code>export RTEMS_MAKEFILE_PATH=/opt/rtems/CPU-rtems/BSP</code></p>
2596 When building without network support you will need the ace_for_tao
2597 subsetting functionality enabled. For this add <code>ace_for_tao = 1</code>
2598 to your <code>bin/MakeProjectCreator/config</code> file and regenerate the
2599 GNU makefiles as described <a href="#power">here</a>.</p><p>
2601 </p></li><li><strong>PharLap ETS</strong><p>
2603 ACE has been ported to Ardence's
2604 <a href="http://www.ardence.com/embedded/products.aspx?ID=71">PharLap ETS</a>
2605 version 13. The port was originally done for Pharlap 9.1 and MSVC 6,
2606 but has been updated to Pharlap ETS 13 with Visual Studio .NET 2003
2607 (VC7.1).</p><p> To build for PharLap, you'll need to use MPC to
2608 generate .sln/.vcproj files with the ETS configurations. For example:
2609 <pre>
2610 cd \ace\ACE_wrappers
2611 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
2612 </pre>
2613 That command will generate the same .sln and .vproj files as for
2614 regular Windows builds with VC7.1, but they'll have names with an
2615 <code>_ETS</code> suffix and will include the "ETS Debug" and
2616 "ETS Release" configurations.</p><p>
2617 After generating the needed VC7.1 files, use the ace/config-pharlap.h
2618 configuration file, and the instructions
2619 for building on Windows. Building the ACE library is the same as
2620 for regular Windows platforms, except you choose one of the PharLap
2621 ETS configurations to build within Visual Studio.
2622 For an example of how to build binaries, see the tests directory.
2623 The tests_pharlap_msvc.lnk file is a LinkLoc commands file that the
2624 ACE tests are built with. It is likely that local sites may need
2625 to adjust this file for their target environment.
2626 </p><p>
2627 When executing programs on the target system, it is possible that not
2628 all of the VC++ support DLLs are resident on the target. In particular,
2629 the debug-supporting DLLs may not be present. If you require these, be
2630 sure to add those needed. For example, on the standard LabVIEW RT 8.2
2631 distribution using Pharlap ETS, the following DLLs must be copied to
2632 the target before being able to run Debug programs:
2633 <ul>
2634 <li>msvcp71d.dll</li>
2635 <li>msvcr71d.dll</li>
2636 </ul>
2637 </p><p>
2638 <note>To build ACE for National Instruments' LabVIEW RT, use
2639 the Pharlap ETS information above, but add the following line to your
2640 config.h file:
2641 <pre>
2642 #define ACE_PHARLAP_LABVIEW_RT
2643 </pre>
2644 This setting makes the necessary adjustments for LabVIEW's implementation
2645 of Pharlap ETS.</note>
2647 <note>By default, the ACE tests log their output/results to the
2648 system console on Pharlap ETS. To change this behavior and make the
2649 test output log to a file in the <code>log</code> directory under the
2650 current working directory while executing, add the following line to
2651 your config.h file:
2652 <pre>
2653 #define ACE_PHARLAP_TESTLOG_TO_FILE
2654 </pre>
2655 This setting has no affect on TAO tests which always write test output
2656 to stdout.
2657 </note>
2659 </p></li><li><strong>Mac OS X (10.2.x)</strong><p>
2661 </p><p>ACE builds and runs on Mac OS X 10.2.x, but the following are
2662 needed to build it:</p>
2664 <p>1. The latest version of the Apple Developer Tools
2665 (December 2002)</p>
2666 <p>2. The dlcompat library (obtained either through Fink or
2667 SourceForge)</p>
2669 <p>When creating $ACE_ROOT/ace/config.h for Mac OS X, you need
2670 to add the following if you obtained dlcompat via Fink:</p>
2672 <p>#define ACE_NEEDS_DL_UNDERSCORE</p>
2674 <p>You'll also need to do:</p>
2676 <p>setenv DYLD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib</p>
2677 <p>setenv MACOSX_DEPLOYMENT_TARGET 10.2</p>
2679 <p>Currently, all ACE tests pass except Process_Mutex_Test and
2680 MEM_Stream_Test. Also, Mac OS X doesn't yet support *nix
2681 aio_* calls, and ACE does not know anything about Mach.</p>
2683 <p>The work to port ACE to Mac OS X was done by several people,
2684 John Zorko
2685 &lt;<a href="mailto:j.zorko@att.net">j.zorko@att.net</a>&gt; is
2686 only one of them.</p>
2688 </p></li><li><strong>iPhone/iPod Touch/iPad</strong><p>
2690 </p><p>ACE builds and runs on the iPhone/iPod Touch/iPad Hardware
2691 and Simulator. Keep in mind that ACE/TAO needs to be built
2692 statically since Apple does not allow third party dynamic libraries
2693 to be deployed on the hardware. The following are needed to build ACE:</p>
2695 <p>1. The iPhone SDK.</p>
2696 <p>2. When creating $ACE_ROOT/ace/config.h, include
2697 config-macosx-iphone-hardware.h if you want to deploy on the
2698 hardware, include config-macosx-iphone-simulator.h if you want
2699 to deploy on the simulator. Even though those includes are named
2700 after the iPhone, the includes work for iPhone/iPod Touch, and iPad.</p>
2701 <p>3. You need to define two environment variables. The first is
2702 IPHONE_TARGET. Set IPHONE_TARGET to SIMULATOR if you want to deploy
2703 on SIMULATOR. Set IPHONE_TARGET to HARDWARE if you want to deploy on
2704 the hardware device.</p>
2705 <p>4. When creating $ACE_ROOT/include/makeinclude/platform_macros.GNU,
2706 include 'include $(ACE_ROOT)/include/makeinclude/platform_macosx_iphone.GNU'
2707 in the file.</p>
2711 </li></ul>
2714 <hr>
2715 <h2><a name="g++">Compiling ACE with GNU g++</a></h2>
2717 If you use the GNU GCC g++ compiler please note the following:
2719 <ul>
2720 </p></li><li>ACE/TAO needs g++ 2.95.x or better. Older versions are not usable anymore<p>
2722 </p></li><li>Make sure to update your gcc <code>config.status</code>
2723 file. This file is produced when installing gcc; it specifies
2724 where to install the binary files that gcc uses. For example,
2725 it specifies whether to use Solaris's <code>/usr/ccs/bin</code>
2726 binary utils or GNU binary utils. The
2727 <code>config.status</code> file is an output of the gcc
2728 <code>configure</code> script; it is preferable to use the
2729 <code>--prefix</code> option to <code>configure</code> instead
2730 of hacking its output.<p>
2732 </p></li><li>If you are getting weird link errors when building libACE
2733 on Solaris you are probably using the GNU linker. Try using the
2734 Sun linker (/usr/ccs/bin/ld) instead. Note that gcc first looks
2735 for the GNU linker if it is installed along with gcc. The only
2736 way to not use the GNU linker is to delete it from the
2737 installation or to build your own compiler with no linker. Be
2738 aware that you still need the libraries and includes of gcc.<p>
2740 NOTE: if you do use the GNU linker, you might need to change
2741 the <code>-G</code> flag to <code>-shared</code> in
2742 the <code>SOFLAGS</code> definition in your
2743 <code>include/makeinclude/platform_macros.GNU</code>.</p><p>
2745 </p></li><li>Don't get too confused about contradictory statements in
2746 the gcc documentation. It was written by different
2747 people...<p>
2749 </p></li><li>Make sure that the linker invoked by gcc produces code
2750 that initializes static objects. Please see gcc's
2751 documentation for using <code>collect2</code>.<p>
2753 </p></li></ul>
2756 <hr><p>
2757 </p><h2><a name="minimum_build">What Do I Need to Build for TAO?</a></h2>
2758 Toshio Hori &lt;toshi@etl.go.jp&gt; provided these suggestions on building
2759 just what's needed for (a subset of) TAO:<p>
2761 I usually make:
2762 </p><pre> $ACE_ROOT/ace,
2763 $ACE_ROOT/apps/gperf,
2764 $TAO_ROOT/tao,
2765 $TAO_ROOT/TAO_IDL, and
2766 $TAO_ROOT/orbsvcs/orbsvcs
2767 </pre>
2768 and the whole make takes less than an hour on my Solaris 7 for intel,
2769 Pentium-III/550MHz, 256MB memory, 512MB swap machine. (Top secret: I
2770 renice the 'make' process to the highest priority, -20... ;-)
2772 To save time and space, I set
2773 <pre> TAO_ORBSVCS = Naming Time Trader ImplRepo
2774 </pre>
2775 in <code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code> also. See
2776 <a href="TAO/docs/configurations.html#orbsvcs">TAO's orbsvcs
2777 library customization instructions</a> for more information.<p>
2780 </p><hr><p> </p><h2><a name="resource_requirements">System Resource
2781 Requirements</a></h2> The amount of system resources required to build
2782 ACE and TAO varies greatly. The required system resources are
2783 influenced by OS and compiler platform, build options, and component
2784 configurations. As a rough guide, the typical peak memory requirement
2785 can be well over 512 MB (notably, for TAO's orbsvcs). Depending on
2786 your OS and compiler configuration, an <strong>entire</strong> build
2787 of ACE and TAO can use well over 4 GB of disk space. It's usually not
2788 necessary to build <strong>all</strong> of ACE and TAO, though.<p>
2790 Much less disk space is required for just the libraries. For example,
2791 see the <a href="docs/ACE-subsets.html#ACE%20Library%20Size%20Breakdown">ACE
2792 library subset sizes</a>.</p><p>
2794 If you run out of memory when building, you might consider trying
2795 some or all of these suggestions:</p><p>
2796 </p><ul>
2797 <li>Enable or increase virtual memory. If you're on a <a href="#Linux">Linux</a> or <a href="#LynxOS">LynxOS</a> platform,
2798 please see the appropriate sections above.<p>
2799 </p></li><li>Disable/enable optimization and/or debugging. See the
2800 <a href="#flags">Makefile Flags</a> discussion for information
2801 on how to do that via ACE's Makefiles.<p>
2802 </p></li><li>If you're using g++, try removing <code>-pipe</code> from
2803 <code>CFLAGS</code> in your
2804 <code>include/makeinclude/platform_macros.GNU</code> file.<p>
2805 </p></li><li>Restrict the components that you build. For ACE and TAO, see the
2806 discussion of <code>ACE_COMPONENTS</code> in the
2807 <a href="docs/ACE-subsets.html">ACE subsets</a> page. For TAO's
2808 orbsvcs, see the discussion of <code>TAO_ORBSVCS</code> in
2809 <a href="TAO/docs/configurations.html#orbsvcs">orbsvcs Library configuration information</a>.<p>
2811 If disk space is a problem, disabling debugging should greatly
2812 reduce object code, and therefore, library size. This is especially
2813 true with g++.</p><p>
2815 Toshio Hori &lt;toshi@etl.go.jp&gt; provided these tips for reducing
2816 disk space usage:</p><p>
2818 To save space on a Unix machine, I usually run
2819 'find . -name \*.sln -o -name \*.vcproj -o -name \*.bmak | xargs rm -f'
2820 in $ACE_ROOT at first after I untar the distribution. They are
2821 meaningless in my environment (Files named '*.sln' and '*.vcproj' are
2822 used for MSVC++ and files named '*.bmak' are for Embarcadero C++
2823 Builder.)</p><p>
2825 Finally, to save space, may want to run 'make clean' after 'make'. It
2826 removes generated object files and leaves libraries/executables
2827 intact. If you want to remove any of the libraries/executables, as
2828 well, try 'make realclean'.</p><p>
2830 </p></li></ul>
2832 <p></p><hr><p>
2833 </p><h1 name="MPC">General MPC information</a></h1>
2836 The <A HREF="
2837 http://htmlpreview.github.io/?https://github.com/DOCGroup/MPC/blob/master/docs/html/MakeProjectCreator.html">
2838 Makefile Project Creator (MPC)</A> is a tool that takes platform and
2839 building tool generic files (mpc files) as input, which describe basic
2840 information needed to generate a "project" file for various build
2841 tools, including Make, NMake, Visual C++ 6, Visual C++ 7, etc. Please
2842 see <a href="MPC/docs/USAGE">USAGE</a>, <a
2843 href="MPC/docs/README">README</a> for documentation on MPC.
2844 </p>
2847 A common usage for creating a Windows workspace containing just the
2848 core ACE and TAO libraries and executables is the following:
2849 </p>
2851 <pre><code>
2852 C:> cd %TAO_ROOT%
2853 C:> %ACE_ROOT%\bin\mwc.pl -type vc71 TAO_ACE.mwc
2854 </pre></code>
2857 Replace vc71 with whatever project type you want to use. On Linux and
2858 other UNIX platform use the gnuace type:
2859 </p>
2861 <pre><code>
2862 % cd $TAO_ROOT
2863 % $ACE_ROOT/bin/mwc.pl -type gnuace TAO_ACE.mwc
2864 </pre></code>
2867 This creates the appropriate GNUmakefiles. Additional information on
2868 how to obtain, configuration, and build ACE+TAO using MPC appear at
2869 the OCI <A
2870 HREF="http://www.theaceorb.com/faq/index.html#HowToBuildACEandTAOonWindows">FAQ</A>.
2871 </p>
2874 If you are attempting to generate project files using MPC, and you get
2875 the following error message:
2876 </p>
2878 <pre>ERROR: Unable to find the MPC modules in /builds/ACE_wrappers/MPC.
2879 You can set the MPC_ROOT environment variable to the location of MPC.
2880 </pre>
2883 You need to do one of the following:
2884 </p>
2886 <ol>
2887 <li>If you have already obtained MPC, either move it underneath the
2888 ACE_wrappers directory or set your MPC_ROOT environment variable to point
2889 to the full path of MPC.</li>
2890 <li>Check out MPC from the DOC Group git repository
2891 and set your MPC_ROOT environment variable.</li>
2892 </ol>
2895 You can check
2896 out MPC from the DOCGroup git repository using the following command.
2897 </p>
2899 <pre>git clone https://github.com/DOCGroup/MPC.git MPC
2900 </pre>
2903 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
2904 source of documentation, however it is not a complete set of
2905 documentation. The TAO Developer's Guide from OCI starting with the
2906 1.3a version contains more information about MPC.
2907 </p>
2910 The MPC chapter from the TAO Developer's Guide is available at <a
2911 href="http://downloads.ociweb.com/MPC/">
2912 http://downloads.ociweb.com/MPC/</a>. Some of MPC has changed since
2913 this version, but it is largely accurate. An updated version will be
2914 available as newer versions of the TAO Developer's Guide are released.
2915 In the meantime, please see the README and USAGE files in the MPC
2916 directory.
2917 </p>
2920 </p><h1><a name="eclipse">Working with ACE in Eclipse</a></h1>
2924 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.
2925 </p>
2928 <h2>To create an Eclipse project for ACE starting from CVS:</h2>
2929 <ol>
2930 <li>In the "CVS Repository Exploring" perspective, navigate to the module containing ACE.</li>
2931 <li>Checkout the module using "Check Out As" and select the "project configured using the New Project Wizard" option.</li>
2932 <li>Select "Standard Make C++ Project" for the project type.</li>
2933 <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.
2934 <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>
2935 <li>Select the root folder for the project and use the "Create Make Target" wizard to setup the appropriate make command and options.</li>
2936 <li>Select the root folder and run "Build Make Target." This will build ACE.</li>
2937 </ol>
2938 </p>
2943 <h2>To create an Eclipse project for ACE from a local source distribution:</h2>
2944 <ol>
2945 <li>Launch the "New Project Wizard" in Eclipse.</li>
2946 <li>Select "Standard Make C++ Project" for the project type.</li>
2947 <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>
2948 <li>Follow the steps, up to the point of running make, for building ACE on your platform.
2949 <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>
2950 <li>Select the root folder for the project and use the "Create Make Target" wizard to setup the appropriate make command and options.</li>
2951 <li>Select the root folder and run "Build Make Target." This will build ACE.</li>
2954 </ol>
2955 </p>
2957 </p>
2959 <hr><p>
2960 </p><h1><a name="advanced">Advanced Topics</a></h1>
2962 <ul>
2963 <li><a href="docs/ACE-porting.html">Porting ACE and TAO to a New OS Platform</a>
2964 </li><li><a href="#NonStaticObjectManager">Non-static ACE_Object_Manager</a>
2965 </li><li><a href="#cloning">Cloning the Source Tree</a>
2966 </li><li><a href="#mvs">Additional Build Tips for MVS</a>
2967 </li><li><a href="#flags">Makefile Flags</a>
2968 </li><li><a href="docs/ACE-SSL.html">ACE SSL effort</a>
2969 </li></ul>
2971 <p></p><hr align="left" width="50%"><p>
2972 </p><h2><a name="NonStaticObjectManager">Non-static
2973 ACE_Object_Manager</a></h2> The ACE_Object_Manager can be instantiated
2974 as a static object, can be instantiated on the stack of the main
2975 program thread, or can be explicitly instantiated and destroyed by the
2976 application with <code>ACE::init ()</code> and <code>ACE::fini
2977 ()</code>. The comments in the header file,
2978 <a href="ace/Object_Manager.h"><code>ace/Object_Manager.h</code></a>, as well as Section 1.6.3 in
2979 <a href="http://www.riverace.com/docs">The ACE Programmer's Guide</a>
2980 provide more detail.<p>
2982 <strong><blink><font color="#ff0000">NOTE:</font></blink></strong>
2983 Special requirements are imposed on applications if the
2984 ACE_Object_Manager is instantiated, by ACE, on the stack of the main
2985 thread. This behavior is selected by defining
2986 <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> in
2987 <code>ace/config.h</code>. Again, see the ACE Object_Manager header file,
2988 <a href="ace/Object_Manager.h"><code>ace/Object_Manager.h</code></a> for more information. One of
2989 these requirements is discussed here, because it is so important.
2990 Please note that <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> is
2991 defined in the distributed ACE <code>config.h</code> headers for
2992 VxWorks and Win32.</p><p>
2994 The important requirement is that the program <strong>must</strong>
2995 declare its <code>main</code> function with two arguments, even if
2996 they're not used, and with <code>int</code> return type:
2998 </p><pre><code>
3000 main (int, char *[])
3001 </code></pre>
3003 If you don't declare <code>main</code> <strong>exactly</strong> that
3004 way, then you'll see a link error about <code>ace_main_i</code> being
3005 undefined.<p>
3007 Alternatively, this feature can be disabled by commenting out the
3008 #define ACE_HAS_NONSTATIC_OBJECT_MANAGER in the
3009 <code>ace/config.h</code>. But, that will make repeated testing more
3010 difficult on VxWorks. And, you'd either have to call static
3011 constructors and destructors manually or unload/load the program
3012 between runs. On Win32, disabling the feature can possibly lead to
3013 shutdown difficulties.</p><p>
3015 <strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
3016 <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> assumes that your
3017 <code>main</code> function is named <code>main</code>. Any violation
3018 of this assumption is at your peril. If you really need to call your
3019 entry point something other than <code>main</code>, you'll need to
3020 construct and destroy the ACE_Object_Manager. The best way to do that
3021 is to call <code>ACE::init ()</code> and <code>ACE::fini ()</code>.
3022 Or, see the <code>#define</code> of <code>main (int, char *[])</code>
3023 in <a href="ace/OS_main.h"><code>ace/OS_main.h</code></a> to see how ACE does
3024 that for entry points named <code>main</code>.
3026 </p><p></p><hr align="left" width="50%"><p>
3027 </p><h2><a name="cloning">Cloning the Source Tree</a></h2>
3029 On UNIX platforms, we typically like to support multiple platform
3030 builds using the same ACE source tree. This idiom is supported by ACE
3031 using the $ACE_ROOT/bin/create_ace_build.pl script.
3033 To clone the source tree, create ./build and ./build/{your build name}
3034 subdirectories under the ACE_wrappers directory.
3035 Then invoke the create_ace_build.pl script to clone the source tree using
3036 soft links from your build directory back to the actual sources.
3037 Here is an example:</p><p>
3039 </p><pre>% cd ACE_wrappers
3040 % mkdir build build/build-SunOS5
3041 % perl bin/create_ace_build.pl -a -v build-SunOS5
3042 % cd build/build-SunOS5
3043 % setenv ACE_ROOT $cwd
3044 % make
3045 </pre><p>
3047 This will establish a complete tree of links. In addition, make sure
3048 you set your <code>LD_LIBRARY_PATH</code> to
3049 <code>$ACE_ROOT/lib:$LD_LIBRARY_PATH</code> on SVR4 UNIX
3050 platforms.</p><p>
3052 When you do a make in the $ACE_ROOT directory you will be producing
3053 object code that is not stored in the same place as the original
3054 source tree. This way, you can easily build another platform in a
3055 parallel tree structure.</p><p>
3057 See the comments at the top of the create_ace_build.pl script for
3058 further usage information.
3060 </p><p></p><hr align="left" width="50%"><p>
3061 </p><h2><a name="mvs">Additional Build Tips for MVS</a></h2>
3063 For all intents and purpose, MVS OpenEdition (OE) is another flavor of
3064 UNIX, therefore, the instructions under <a href="#aceinstall">Building
3065 and Installing ACE on Unix</a> can be used along with the following
3066 additional tips:<p>
3068 You can get a copy of GNU make that has been ported to MVS OpenEdition from
3069 the <a href="http://www.s390.ibm.com/products/oe/index.html">IBM OpenEdition web site</a>.
3070 ACE's make scheme generates compile commands that have options and
3071 operands interspersed. By default, the c89/cc/c++ compiler expects all options to
3072 precede all operands. To get around this, you must set a special
3073 compiler environment variable (_CXX_CCMODE) to 1 which tells the compiler
3074 to allow options and operands to be interspersed.</p><p>
3076 Note that the environment variable <code>LD_LIBRARY_PATH</code> is
3077 called <code>LIBPATH</code> on MVS.</p><p>
3079 Shared objects are built a little different on MVS than on
3080 other UNIX implementations. This has been accounted for in the makefiles
3081 that come with ACE When the linker (via the cxx command) builds the
3082 libACE.so file it will also create a file called libACE.x. This is a
3083 side-deck file and it must be included in subsequent link edits with
3084 application code. For more information on this see the C/C++ MVS
3085 Programming Guide. If you want to build your application statically,
3086 i.e., using libACE.a instead of libACE.so, you can set ACELIB to
3087 ACELIB_STATIC in platform_mvs.GNU.</p><p>
3089 When the libACE.so file is built (via the MVS pre-linker and binder), you
3090 will get a rc=4 from the pre-linker. This is ok. This is due to some
3091 warnings about unresolved references which should get resolved during the
3092 link step. Note, however, there shouldn't be any unresolved references
3093 from the binder (linkage editor). You can get pre-link and link maps by
3094 uncommenting the PMAP and LMAP lines in the platform_mvs.GNU file.
3096 </p><p></p><hr align="left" width="50%"><p>
3097 </p><h2><a name="flags">Makefile Flags</a></h2>
3099 GNU make provides many options to customize its operation. See its
3100 documentation for more information. One example is that for multi-cpu
3101 UNIX machines you will be able to build faster if you use:<p>
3103 </p><pre><code>
3104 % make -j <em>n</em>
3105 </code></pre><p>
3107 which allows parallel compilation. The number <i>n</i> should
3108 typically be the number of CPUs. It is likely that builds will be
3109 faster even on single-CPU UNIX machines with <code>make -j
3110 2</code>.</p><p>
3112 ACE further supports the following flags. They can be enabled either
3113 on the command line, e.g., "make purify=1", or added to your
3114 <code>platform_macros.GNU</code>. To disable the option,
3115 set the flag to null,
3116 e.g., "make debug=". Some flags support setting to 0 disable, e.g.,
3117 "make debug=0". debug=1 is enabled in the platform files that are
3118 released with ACE.</p><p>
3120 Please note that the effects of a flag may be platform specific.
3121 Also, combinations of certain flags may or may not be allowed on
3122 specific platforms, e.g., debug=1 opt=1 is supported by g++ but
3123 not all other C++ compilers.</p><p>
3125 If you use Purify or Quantify: purify or quantify <strong>must</strong>
3126 be on your <code>PATH</code>. By default, ACE puts the Purify/Quantify
3127 caches below <code>/tmp</code>. To override that, set the
3128 <code>PURE_CACHE_BASE_DIR</code> variable, either in your environment
3129 or on the <code>make</code> make command line, to the destination
3130 directory for your instrumented libraries.</p><p>
3132 </p><pre>Flag Description
3133 ---- -----------
3134 debug Enable debugging; see DCFLAGS and DCCFLAGS.
3135 exceptions Enable exception handling (not supported by all platforms).
3136 include_env Support old-style ACE_TRY_ENV declarations in methods.
3137 This switch is necessary for compiling TAO applications
3138 in the native exception configuration that were written
3139 for TAO versions before 1.2.2.
3140 In TAO 1.2.2, new macros were introduced that supercede
3141 the direct ACE_TRY_ENV declarations. These are the
3142 ACE_ENV_ARG macros that are defined in ace/CORBA_macros.h
3143 and are documented in docs/exceptions.html.
3144 This switch only affects the exceptions=1 configuration.
3145 It is for backward compatibility only.
3146 There will be warnings about unused _ACE_environment_variable
3147 parameters when using include_env=1.
3148 If possible, do not use it, but instead change your TAO
3149 applications to use the ACE_ENV_ARG macros.
3150 fast Enable -fast option, e.g., with Sun C++.
3151 inline Enable ACE inlining. Some platforms enable inlining by
3152 default, others do not.
3153 optimize Enable optimization; see OCFLAGS and OCCFLAGS.
3154 pace Enable PACE as the underpinnings of ACE_OS.
3155 probe Enable ACE_Timeprobes.
3156 profile Enable profiling; see PCFLAGS and PCCFLAGS.
3157 purify Purify all executables.
3158 quantify Quantify all executables.
3159 repo Use GNU template repository (g++ with repo patches only).
3160 rtti Enable run-time type identification. On some platforms,
3161 it is enabled by default, so this is ignored.
3162 shared_libs If migrating from prior version use <code>shared_libs_only</code>
3163 static_libs If migrating from prior version use <code>static_libs_only</code>
3164 shared_libs_only Only build shared libraries. Ignored if no SHLIBs are
3165 specified by the Makefile, as in performance-tests/Misc.
3166 static_libs_only Only build static libraries.
3167 threads Build with thread support.
3168 xt Build with Xt (X11 Toolkit) support.
3169 fl Build with FlTk (Fast Light Toolkit) support.
3170 tk Build with Tk (Tcl/Tk) support.
3171 qt Build with Qt (Trolltech Qt) support.
3172 ssl Build with OpenSSL support.
3173 rapi Build with RAPI
3174 split Build the library by first splitting up the ACE source
3175 to several files, with one object code entity for each
3176 source file. This allows an application that is linked
3177 with ACE to extract _exactly_ what it needs from the
3178 library, resulting in a smaller executable. Setting this
3179 to 1 overrides debug to 0.
3181 Usually, users do not need to be concerned with make targets.
3182 Just enter "make" on the command line to build. A few notable
3183 targets are listed below.
3185 Target Description
3186 ------ -----------
3187 show_statics Lists all static objects in object files built for
3188 current directory. Only supported for g++.
3189 show_uninit Lists all uninitialized in object files built for
3190 current directory. Only supported for g++.
3192 </pre>
3194 </p><hr>
3196 <h2><a name="power">Building from git</a></h2>
3198 If users are building from our <a href="https://github.com/DOCGroup/ACE_TAO">Git repository</a> the
3199 GNUmakefiles, and project files for building on various platforms will
3200 not be available. Git users are expected to <a href="#generate_using_mpc">generate them</a>
3201 using <a href="https://raw.githubusercontent.com/DOCGroup/MPC/master/docs/README">MPC</a> before building ACE, TAO or
3202 CIAO. We point out some suggestions below to get bootstrapped
3203 quickly.
3205 <ul>
3206 <li>You can clone all code easily from our git repository.
3207 <ul>
3208 <code>git clone https://github.com/DOCGroup/ACE_TAO.git</code>
3209 </ul>
3210 </p></li><li>Please make sure that you have <a href="http://www.perl.org/">
3211 perl</a> installed, preferably perl
3212 5.8 or higher. Users on Win32 based platforms are recommended to use
3213 <a href="https://www.activestate.com/products/perl"> Active
3214 State Perl</a> or <a href="http://strawberryperl.com">Strawberry Perl</a>.
3215 We use both perl versions without problems. We have
3216 ran into problems trying to use the cygwin version of perl on Win32
3217 based platforms. <p>
3218 </p></li>
3219 <a name="generate_using_mpc"></a>
3220 <li>To build ACE and associated tests, examples,
3221 and associated utility libraries with GNUmakefiles, you must
3222 generate GNUmakefiles with MPC:<p>
3223 <code> $ACE_ROOT/bin/mwc.pl -type gnuace ACE.mwc</code> </p>
3224 <p>On Windows, with Visual Studio 2015, you must generate solution and project files with MPC:<p>
3226 <code> $ACE_ROOT/bin/mwc.pl -type vc14 ACE.mwc </code> </p><p>
3228 On Windows, with Visual Studio 2017, you must generate solution and project files with MPC:<p>
3229 <code> $ACE_ROOT/bin/mwc.pl -type vs2017 ACE.mwc </code> </p>
3231 On Windows, with Visual Studio 2019, you must generate solution and project files with MPC:<p>
3232 <code> $ACE_ROOT/bin/mwc.pl -type vs2019 ACE.mwc </code> </p>
3233 </li><li>If you want to build TAO and its associated libraries
3234 please see <a href="TAO/TAO-INSTALL.html">TAO-INSTALL</a> for details.
3235 </li></ul>
3237 <hr><p>
3238 Back to the <a href="https://www.dre.vanderbilt.edu/~schmidt/ACE.html">ACE</a>
3239 home page.
3240 </p><p>
3241 <!--<EM>
3242 Visitor #
3243 from
3244 <EM><br> -->
3246 <!-- hhmts start -->
3248 <!-- hhmts end -->
3251 </p></body></html>