Merge pull request #1236 from jwillemsen/jwi-codeql
[ACE_TAO.git] / ACE / ACE-INSTALL.html
blobc05056712f4c88dc456e9cd651e845529f19d857
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-toolchain">Generating a Toolchain</a></li>
1635 <li><a href="#android-oldndks">Using Older NDKs</a></li>
1636 <li><a href="#android-building">Building</a></li>
1637 <li><a href="#android-install">Installing ACE on Android</a></li>
1638 <li><a href="#android-logging">Logging</a></li>
1639 <li><a href="#android-openssl">OpenSSL</a></li>
1640 </ul>
1642 <p>ACE can be built for Android by using the <a
1643 href="https://developer.android.com/ndk/">Android Native Development Kit
1644 (NDK)</a>. This is different than the standard way of writing Android
1645 applications in Java which run the on Android Runtime or the older Dalvik
1646 Virtual Machine. Applications built using the NDK are native Linux applications
1647 written in C or C++ specifically compiled to run on Android systems. In
1648 addition, applications built using the NDK have access to Android-specific APIs
1649 much like the ones available to Java-based Android applications.
1650 </p>
1652 <div class="boxed">
1653 <p><b>Windows Users:</b> These instructions are written for a Unix based
1654 platform like Linux, but can also be used on Windows. If you are using an
1655 virtualized Linux environment like Windows Subsystem for Linux (WSL), Docker,
1656 or a traditional VM, then you can use the Linux version of the NDK and ignore
1657 rest of this note and all the other Windows specific notes.
1658 </p>
1660 <p>If that is not the case, you should also pay attention to the notes marked
1661 with "<b>Windows Users:</b>" in addition to the rest of the instructions. In
1662 addition to the Windows version of the Android NDK, you will also need
1663 <a href="https://www.msys2.org">MSYS2 for Unix utilities that ACE needs</a>.
1664 </div>
1666 <h3><a name="android-toolchain">Generating a Toolchain</a></h3>
1668 <p>To build ACE for Android you need to download the NDK and generate a
1669 toolchain for the specific Android target you want. The specific target is
1670 defined by two things:</p>
1672 <dl class="indent">
1673 <dt>- The minimal API level to target.</dt>
1674 <dd>A lower level means larger amount of potential users but also
1675 potentially less features. Android has <a
1676 href="https://source.android.com/setup/start/build-numbers">many API levels
1677 to target</a>. They roughly correspond to the versions of Android.
1678 </dd>
1679 <dt>- The CPU architecture to target (Also called the Application Binary
1680 Interface or ABI by the NDK documentation).</dt>
1681 <dd>In addition to ARM, Android also supports x86 and MIPS,
1682 although support for MIPS has been dropped from the NDK. <a
1683 href="https://developer.android.com/ndk/guides/abis">This is the official
1684 documentation on the ABIs</a>. These are the ABIs that ACE supports at the
1685 time of writing and must be passed to ACE as <code>ANDROID_ABI</code>:
1686 <!-- Check to see if any architectures have been added or removed. If so
1687 update this list and the table below as well-->
1688 <dl>
1689 <dt><code>armeabi-v7a</code></dt>
1690 <dd>32-bit ARM, The default ABI for both the NDK and ACE.</dd>
1691 <dt><code>armeabi-v7a-with-neon</code></dt>
1692 <dd><code>armeabi-v7a</code> with NEON extensions enabled.</dd>
1693 <dt><code>arm64-v8a</code></dt>
1694 <dd>64-bit ARM, Sometimes referred to as <code>aarch64</code>.</dd>
1695 <dt><code>x86</code></dt>
1696 <dd>32-bit x86</dd>
1697 <dt><code>x86_64</code></dt>
1698 <dd>64-bit x86</dd>
1699 </dl>
1700 <p><b>
1701 It should be noted that starting in August 2019, the Google Play
1702 Store will require new apps to have 64-bit libraries if they have native
1703 libraries. 32-bit native libraries will still be supported but they must also
1704 have 64-bit libraries. Look up any restrictions that may affect
1705 apps you want to publish on the Play Store, including minimum API
1706 level.
1707 </b></p>
1708 </dd>
1709 </li>
1710 </dl>
1713 <p>To generate a toolchain, one use must use
1714 <code>build/tools/make_standalone_toolchain.py</code> in the NDK. A destination must be
1715 chosen and is denoted here as <code>$TOOLCHAIN</code>. For example, to generate a
1716 toolchain targeting 32-bit ARM Android 7.0 "Nougat" (API Level 24) and later: </p>
1717 <p class="indent">
1718 <code>./make_standalone_toolchain.py --arch arm --api 24 --install-dir $TOOLCHAIN</code>
1719 </p>
1720 <p><code>$TOOLCHAIN/bin</code> must be in your <code>$PATH</code> when building ACE and
1721 applications using ACE.</p>
1723 <p>This table shows how the <code>ANDROID_ABI</code> variable and the <code>--arch</code> argument correlate:</p>
1724 <table class="indent">
1725 <tr>
1726 <th><code>ANDROID_ABI</code></th>
1727 <th><code>--arch</code></th>
1728 </tr>
1729 <tr>
1730 <td><code>armeabi-v7a</code></td>
1731 <td><code>arm</code></td>
1732 </tr>
1733 <tr>
1734 <td><code>armeabi-v7a-with-neon</code></td>
1735 <td><code>arm</code></td>
1736 </tr>
1737 <tr>
1738 <td><code>arm64-v8a</code></td>
1739 <td><code>arm64</code></td>
1740 </tr>
1741 <tr>
1742 <td><code>x86</code></td>
1743 <td><code>x86</code></td>
1744 </tr>
1745 <tr>
1746 <td><code>x86_64</code></td>
1747 <td><code>x86_64</code></td>
1748 </tr>
1749 </table>
1751 <div class=boxed>
1752 <p><b>Windows Users:</b>
1753 Android NDK includes Python in <code>prebuilt\windows-x86_64\bin</code> for
1754 64-bit Windows NDKs. For the example above, assuming <code>%NDK%</code> is the
1755 location of the NDK and <code>%TOOLCHAIN%</code> is the desired location of the
1756 toolchain, run this command instead:</p>
1758 <p class="indent">
1759 <code>
1760 %NDK%\prebuilt\windows-x86_64\bin\python.exe
1761 %NDK%\build\tools\make_standalone_toolchain.py
1762 --arch arm --api 24
1763 --install-dir %TOOLCHAIN%</code>
1764 </p>
1766 <p>For Windows <code>%TOOLCHAIN%\bin</code> and the location of the MSYS2
1767 utilities must be in <code>%PATH%</code> when cross compiling ACE. The default
1768 location for these would be <code>C:\msys64\usr\bin</code>.
1769 </div>
1771 <!-- Remove this section if these NDKs can be considered not supported anymore -->
1772 <h3><a name="android-oldndks">Using Older NDKs</a></h3>
1774 <p><b>Skip this section if using NDK r18 or later.</b></p>
1777 It is <b>highly recommended</b> to use the latest NDK available assuming
1778 that it works with ACE. It is possible to use NDKs older than r18, but these
1779 have caveats:
1780 </p>
1781 <ul>
1782 <li>
1783 In NDK r16, a file called <code>ndk-version.h</code> was added that
1784 contains the version of the NDK. If using an earlier NDK, you <b>must</b>
1785 define the macros <code>__NDK_MAJOR__</code> and <code>__NDK_MINOR__</code>
1786 in <code>ace/config.h</code> before
1787 <code>#include "ace/config-android.h"</code>.
1788 The scheme works like this:
1789 <table class="indent" style="margin-top: .5em; margin-bottom: .5em;">
1790 <tr>
1791 <th>Revision</th>
1792 <th><code>__NDK_MAJOR__</code></th>
1793 <th><code>__NDK_MINOR__</code></th>
1794 </tr>
1795 <tr>
1796 <td>r16</td>
1797 <td>16</td>
1798 <td>0</td>
1799 </tr>
1800 <tr>
1801 <td>r16a</td>
1802 <td>16</td>
1803 <td>1</td>
1804 </tr>
1805 <tr>
1806 <td>r16b</td>
1807 <td>16</td>
1808 <td>2</td>
1809 </tr>
1810 </table>
1811 </li>
1812 <li>
1813 As of NDK r18, the only compiler that comes with the NDK is clang and by
1814 default the build system assumes that clang is available and will use it.
1815 However there was a transitional period between r12 and r17 where GCC and
1816 clang both exist in the NDK. In some cases GCC should be used if linking
1817 errors occur with these NDKs (For example missing references to
1818 <code>stderr</code>). To let the build system decide between them, set
1819 <code>android_force_clang:=0</code> in
1820 <code>include/makeinclude/platform_macros.GNU</code> before including
1821 <code>platform_android.GNU</code>. <b>This should be set for NDKs before r15.</b>
1822 </li>
1823 <li>
1824 There are probably unknown conflicts, especially in the minor revisions
1825 before the last minor revision of a NDK revision.
1826 </li>
1827 </ul>
1829 <h3><a name="android-building">Building</a></h3>
1831 <ul>
1832 <li>
1833 If building TAO, build the ACE and TAO tools (<code>ace_gperf</code> and
1834 <code>tao_idl</code>) for the host. Follow the <a
1835 href="../TAO/TAO-INSTALL.html">cross compilation setup instructions provide
1836 in TAO-INSTALL.html</a>.
1837 <div class="boxed indent">
1838 <p><b>Windows Users:</b> If cross compiling TAO and the host tools were
1839 built using using Visual Studio, make sure <code>cl.exe</code> can be run
1840 from the environment when building for Android, as <code>tao_idl</code>
1841 will need to use it as a C preprocessor.
1842 </div>
1843 </li>
1844 <li>Setup the Android build<ul>
1845 <li>Create <code>ace/config.h</code>: <code>#include "ace/config-android.h"</code></li>
1846 <li>Create <code>include/makeinclude/platform_macros.GNU</code>:
1847 <ul>
1848 <li>
1849 Set <code>ANDROID_ABI</code> to one of the options above. This
1850 must match the toolchain <code>--arch</code> argument used according
1851 to the table above.
1852 </li>
1853 <li>Set options for debug and optimization options as desired.</li>
1854 <li>If you want to compile static, add <code>static_libs_only:=1</code></li>
1855 <li>Must include <code>include $(ACE_ROOT)/include/makeinclude/platform_android.GNU</code>.</li>
1856 <li>
1857 If building TAO, set the <code>tao_idl</code> options specified in
1858 the cross compiling instructions in <code>TAO-INSTALL.html</code>
1859 </li>
1860 </ul>
1861 </ul>
1862 </li>
1863 </li>
1864 <li>Generate makefiles (if necessary).</li>
1865 <li>Build with GNU make. Make sure you have <code>$TOOLCHAIN/bin</code> in
1866 your <code>$PATH</code>.
1867 <div class="boxed indent"><p>
1868 <b>Windows Users:</b> Make sure you have <code>%TOOLCHAIN%\bin</code>
1869 and MSYS2's <code>bin</code> in your <code>%PATH%</code> when building.
1870 If you are cross compiling TAO you will also need a preprocessor for
1871 <code>tao_idl</code> available (See Windows note above).</p>
1872 </div>
1873 </li>
1874 </ul>
1875 </p>
1877 <h3><a name="android-install">Installing ACE on Android</a></h3>
1879 <p>Native applications using the ACE library can be installed onto devices by
1880 several different methods. The files can be include as assets of Java
1881 application and can be written by the Java application into it's executable
1882 program directory. The native application can be downloaded by a Java
1883 application and written into the Java applications executable program
1884 directory. The native application can also be uploaded using the Software
1885 Development Kit's ADB tool. This method requires uploading the native
1886 application to a directory that allows execution and having any output
1887 directed to a writable directory.</p>
1889 <h3><a name="android-logging">Logging</a></h3>
1891 On Android, <code>ACE_Log_Msg</code> (and therefore <code>ACE_DEBUG</code> and
1892 <code>ACE_ERROR</code>) uses Android's logging system (aka Logcat) by default
1893 in addition to <code>stderr</code> because <code>stdout</code> and
1894 <code>stderr</code> are discarded under normal circumstances. To disable this
1895 at runtime, run:
1896 </p>
1898 <pre class="indent">
1899 ACE_LOG_MSG-&gt;clr_flags (ACE_Log_Msg::SYSLOG);
1900 </pre>
1902 <p>To disable this at compile time include these lines in <code>config.h</code>:</p>
1904 <pre class="indent">
1905 #define ACE_DEFAULT_LOG_FLAGS ACE_Log_Msg::STDERR
1906 #define ACE_DEFAULT_LOG_BACKEND_FLAGS 0
1907 </pre>
1909 <h3><a name="android-openssl">OpenSSL</a></h3>
1911 Depending on the features of ACE, TAO, or other software desired, you might need
1912 OpenSSL. On Android, OpenSSL isn't part of the NDK Library and Android
1913 preloads the system SSL library (either OpenSSL or BoringSSL) for the Java
1914 Android API. This means OpenSSL <b>MUST</b> be statically linked to avoid
1915 conflicts with the almost certianly incompatible system SSL library.
1917 To build OpenSSL for Android, please read <code>NOTES.ANDROID</code> that comes
1918 with OpenSSL's source code. The static libraries will used if the shared
1919 libraries are not found. This can be accomplished by either disabling the
1920 generation of the shared libraries by passing <code>no-shared</code> to
1921 OpenSSL's <code>Configure</code> script or just deleting the so files after
1922 building OpenSSL.
1923 </p>
1925 <hr>
1926 <h1><a name="svcsinstall">Building and Installing ACE Network Services</a></h1>
1928 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>.
1930 <p></p><hr align="left" width="50%"><p>
1931 </p><h2><a name="unixsvcs">Building and Installing ACE Network Services on UNIX</a></h2>
1933 Building and installing ACE Network Services on UNIX is relatively
1934 simple (the <a href="#win32svcs">process</a> for Win32 is different).
1935 Here's what you need to do:<p>
1937 </p><ol>
1939 <li>Build and install ACE on UNIX as described <a href="#unix">earlier</a>. If ACE is built at the root of the ACE
1940 source tree (and ACE has been ported to your platform, of course) the
1941 netsvcs static and shared object libraries should be built
1942 automatically. In addition, the server driver program
1943 (<code>main</code>) contained in <a href="netsvcs/servers/main.cpp">$ACE_ROOT/netsvcs/servers/main.cpp</a>
1944 should also be compiled and ready to run.<p>
1946 </p></li><li>Set your <code>LD_LIBRARY_PATH</code> environment variable to
1947 where the binary version of the ACE netsvcs library. For
1948 example, you probably want to do something like the following<p>
1950 </p><pre><code>
1951 % setenv LD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib:$LD_LIBRARY_PATH
1952 </code></pre><p>
1954 </p></li><li>By default, if the shared object library is built, the services
1955 are linked into the <code>main</code> driver program dynamically.
1956 To specify which services should be linked in and executed, edit the
1957 <a href="netsvcs/servers/svc.conf">$ACE_ROOT/netsvcs/servers/svc.conf</a>
1958 file. During your editing, you should update information (such as the
1959 default service port numbers) that affects the initialization of
1960 services in this file. Refer to the
1961 <a href="http://www.dre.vanderbilt.edu/~schmidt/ACE-papers.html#config">Service Configurator</a>
1962 documentation to learn how the configuration file is parsed and
1963 how the services are dynamically linked and executed. In
1964 addition, refer to the <a href="http://www.dre.vanderbilt.edu/~schmidt/ACE-netsvcs.html">Network
1965 Services</a> documentation to learn more about how to configure
1966 each network service.<p>
1968 </p></li><li>If you only want to link the services statically, simply remove
1969 or rename the svc.conf file.<p>
1970 </p></li></ol>
1972 <p></p><hr align="left" width="50%"><p>
1973 </p><h2><a name="win32svcs">Building and Installing ACE Network Services on Win32</a></h2>
1975 Once again, there are supplied project for Visual C++ 7.1 or later for
1976 the Network Services.<p>
1978 </p><hr>
1979 <h1><a name="sslinstall">Building and Installing the ACE_SSL Library</a></h1>
1981 <p>The first step for all platforms is to build and install the
1982 <a href="http://www.openssl.org/">OpenSSL</a> distribution. The
1983 ACE_SSL library must then be built according to the instructions
1984 below.</p>
1985 <h2>Unix</h2>
1986 <ol>
1987 <li>Make sure the OpenSSL header file directory is in your compiler's
1988 include path, and that OpenSSL libraries are in your library link/load
1989 path (e.g. <code>LD_LIBRARY_PATH</code>). If you
1990 installed OpenSSL into a set of directories unknown by the compiler,
1991 set the <code>SSL_ROOT</code> environment variable to point to the
1992 top level directory of your OpenSSL distribution, i.e. the one
1993 containing OpenSSL's <code>include</code> and <code>lib</code>
1994 directories.</li>
1995 <li>Build ACE as described above. When building ACE, add
1996 <code>ssl=1</code>
1997 to your <code>make</code>
1998 command line invocation, or add it to your
1999 <code>platform_macros.GNU</code> file.</li>
2000 <li>Build the ACE_SSL library in the <tt>$ACE_ROOT/ace/SSL</tt>
2001 directory. The <code>ACE_ROOT</code> environment variable should be set
2002 prior to this point.</li>
2003 </ol>
2004 <h2>Microsoft Visual Studio</h2>
2005 <ol>
2006 <li>Set the <code>SSL_ROOT</code> environment variable to the location
2007 of the directory containing the OpenSSL <code>inc32</code> and
2008 <code>out32dll</code> directories.
2009 <li>Add <code>ssl=1</code> to your MPC
2010 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
2011 or <code>$ACE_ROOT/local.features</code> file.
2012 <li>At the moment you are using OpenSSL v1.1 or
2013 newer also add <code>openssl11=1</code> to your MPC
2014 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
2015 or <code>$ACE_ROOT/local.features</code> file.
2016 <li>Re-run MPC to add
2017 support for building the ACE_SSL library to your MSVC++
2018 workspaces and projects.
2019 <li>Open the <code>ACE.sln</code> solution, and refer to the ACE build
2020 and installation instructions above for details on creating a
2021 <code>config.h</code> configuration header for this platform. Once
2022 the <code>config.h</code> file has been created, build the
2023 <code>ACE_SSL</code> project.</li>
2024 </ol>
2025 <h2>Embarcadero C++</h2>
2026 <p>Support for building ACE's ACE_SSL library and TAO's SSLIOP
2027 pluggable protocol with Embarcadero C++ does exist.
2028 <ol>
2029 <li>Set the <code>SSL_ROOT</code> environment variable to the location
2030 of the directory containing the OpenSSL <code>inc32</code> and
2031 <code>out32</code> directories.
2032 <li>Add <code>ssl=1</code> to your MPC
2033 <code>$ACE_ROOT/bin/MakeProjectCreator/config/default.features</code>
2034 or <code>$ACE_ROOT/local.features</code> file, and re-run MPC to add
2035 support for building the ACE_SSL library to your Embarcadero C++ makefiles.
2036 <li>Build ACE and TAO.
2037 </ol>
2038 </p>
2040 <hr><p>
2041 </p><h1><a name="guireactor_install">Building and Using GUI Reactors Libraries</a></h1>
2042 There is a general method for building and using <code>ACE_Reactors</code> for various GUI
2043 libraries.
2044 <h2> Building GUI Reactor Library </h2>
2045 <ol>
2046 <li>Try to generate build files using MPC. Inspect the output of MPC to find out which features are
2047 necessary to build given reactor. Add these features to
2048 <code>ACE_wrappers/bin/MakeProjectCreator/*.features</code> file, or pass them directly to MPC
2049 using <code>-features</code> command line option. For example, for <code>FlReactor</code> the procedure
2050 consists of five steps
2051 <ol>
2052 <li> In the first pass one gets that <code>x11</code> (X11 libraries) is missing.<br>
2053 <code>$ mwc.pl -type gnuace
2054 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires x11.
2055 </code></li>
2056 Ensure that <code>X11</code> libraries are installed, then pass <code>x11=1</code> feature to MPC.
2057 <li>In the second pass one gets that <code>gl</code> (OpenGL library) is missing.<br>
2058 <code>$ mwc.pl -type gnuace -features x11=1 ace.mwc
2059 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires gl.
2060 </code></li>
2061 Ensure that <code>OpenGL</code> libraries are installed, then pass <code>gl=1</code> feature to MPC.
2062 <li>In the third pass one gets that <code>fl</code> (Fast Light Toolkit) is missing.<br>
2063 <code>$ mwc.pl -type gnuace -features x11=1,gl=1 ace.mwc
2064 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires fl.
2065 </code></li>
2066 Ensure that <code>Fast Light Toolkit</code> libraries are installed, then pass <code>fl=1</code>
2067 feature to MPC.
2068 <li>In the fourth pass one gets that <code>ace_flreactor</code> feature is missing<br>
2069 <code>$ mwc.pl -type gnuace -features x11=1,gl=1,fl=1 ace.mwc
2070 Skipping ACE_FlReactor (ace_flreactor.mpc), it requires ace_flreactor.
2071 </code></li>
2072 Allow MPC to generate makefiles for <code>FlReactor</code> by setting <code>ace_flreactor=1</code> feature.
2073 <li>In the last pass one obtains files for building <code>FlReactor</code>.<br>
2074 <code>$ mwc.pl -type gnuace -features x11=1,gl=1,fl=1,ace_flreactor=1 ace.mwc
2075 </code></li>
2076 </ol>
2077 Currently to simplify MPC generation some of features are turned on by default in
2078 <code>ACE_wrappers/bin/MakeProjectCreator/global.features</code>. For examples to generate
2079 files related with Fl one has to provide only fl=1 feature. To obtain a more fine grained controll
2080 over MPC generation process one may modify <code>ACE_wrappers/bin/MakeProjectCreator/*.features</code>
2081 files.
2082 </li>
2083 <li> Required build files are generated now, it is enough then to invoke build tool.
2084 For example for under <code>MPC::gnuace</code> one has to call
2085 <code>make fl=1</code>. For <code>MPC::vc7</code> target all features are
2086 encoded in generated project files, thus it is enough to compile ACE using MSVC.
2087 </li>
2088 </ol>
2089 The build procedure leads to a specific GUI Reactor library. For example, for
2090 <code>Qt</code> and <code>Linux </code> one gets <code>libQtReactor.so</code>, while for
2091 <code>Windows</code> the results are shared <code>QtReactor.dll</code> and import
2092 <code>QtReactor.lib</code> libraries or their variants depending on build options.
2093 When compiling TAO also GUI related libraries are created like <code>libTAO_QtResource.so</code>.
2094 <h2> Using GUI Reactor Library </h2>
2095 Here one has at least three use cases:
2096 <ol>
2097 <li><b>Applications with their own build system.</b>
2098 To use ACE support for GUI one has to include specific GUI headers and
2099 link with specific <code>ACE_[GUI]Reactor</code> library. When using TAO support for GUI one has
2100 also to link with specific <code>TAO_[GUI]Resource</code> library.</li>
2101 <li><b>Applications with build system using MPC.</b>
2102 In general, it is better to create specific base projects for using ACE GUI support in such application.
2103 Base projects provided by ACE <code>ACE_wrappers/bin/MakeProjectCreator/[ace,tao]_[gui][reactor,resource].mpb</code>
2104 may be an examples of how to do this.</li>
2105 <li><b>Internal ACE applications like tests or examples.</b>
2106 MPC project for internal ACE application using GUI support should be derived from
2107 <code>ace_[gui]reactor.mpb</code> base projects. To employ TAO support for GUI one should derive
2108 the project from <code>tao_[gui]resource.mpb</code> These base projects ensure that all necessary libraries
2109 are linked to the application, specifies features necessary to build a project and moreover impose a
2110 build order consistant with ACE. For example, the application project using <code>XtReactor</code> should be
2111 derived from <code>ace_xtreactor.mpb</code>.</li>
2112 </ol>
2113 <h2>Notes on specific GUI Reactors</h2>
2114 <ul>
2115 <li> <code>QtReactor</code></li>
2116 The build is controlled by <code>ace_qtreactor</code> [1 by default] feature.
2117 To build this reactor one has to provide feature <code>qt</code> [0 by default] (Qt library). Moreover,
2118 it is assumed that <code>Qt</code> was installed in a standard way
2119 and <code>QTDIR</code> points to <code>Qt</code> installation folder. To build TAO
2120 support for <code>Qt</code> one should use <code>tao_qtresource</code> [1 by default] feature.
2121 <li> <code>XtReactor</code></li>
2122 The build is controlled by <code>ace_xtreactor</code> [1 by default] feature.
2123 To build this reactor one has to provide the following features: <code>x11</code> [1 by default]
2124 (X11 libraries) and <code>xt</code> [1 by default] (X11 Toolkit).
2125 Moreover, some examples and tests related with <code>XtReactor</code>
2126 needs additionall features namely either <code>motif</code> [0 by default] (Motif/Lesstif libraries) or
2127 <code>athena</code> [0 by default] (Athena widgets). To build TAO
2128 support for <code>xt</code> one should use <code>tao_xtresource
2129 </code> [1 by default] feature.
2130 <li> <code>TkReactor</code></li>
2131 The is controlled by <code>ace_tkreactor</code> [1 by default] feature. To build this reactor one has to provide
2132 <code>tk</code> [0 by default] (Tcl libraries) feature. To build TAO
2133 support for <code>Tk</code> one should use <code>tao_tkresource</code> [1 by default] feature.
2134 <li> <code>FlReactor</code></li>
2135 The build is controlled by <code>ace_flreactor</code> [1 by default] feature.
2136 To build this reactor one has to provide the following features: <code>x11</code>
2137 [1 by default] (X11 libraries),
2138 <code>gl</code> [1 by default] (OpenGl) and <code>fl</code>
2139 [0 by default] (Fast Light Toolkit). To build TAO
2140 support for <code>Fl</code> one should use <code>tao_flresource</code> [1 by default] feature.
2141 <strong>MS Windows:</strong> The paths to <code>fltkdll</code> and
2142 <code>OpenGL32</code> libraries, as well as <code>fltk</code> header files
2143 should be setup manually for succesfull compilation. Obviosuly,
2144 <code>x11</code>switch is ignored for this platform.</li>
2145 </ul>
2147 <hr>
2148 <h1><a name="installnotes">Installation Notes</a></h1>
2150 <ul>
2151 <li><b>Windows (Windows NT, 2000, XP, 2003, etc., and Windows '9x/ME) </b><p>
2153 Please see the <a href="#NonStaticObjectManager">Non-static
2154 ACE_Object_Manager</a> discussion below.</p><p>
2156 </p></li><li><b>Windows CE</b><p>
2158 Take a look at (<a href="docs/CE-status.txt">CE-status.txt</a>) for
2159 up-to-date information about ACE on Windows CE and Windows Mobile.
2161 </p></li><li><b> Solaris 7, 8, 9, and 10 using Sun ONE Studio 8 (C++ 5.5)
2162 or higher, Centerline C++ 2.x, GNU gcc 2.95 and
2163 later.</b><p>
2165 All the source code and tests should build and run without any
2166 problems on Solaris 7, 8, and 9 platforms using the above
2167 Sun C++ compilers.
2169 There are likely to be build problems with older versions or
2170 different patchlevels of Sun C++. Likewise, on
2171 Solaris with g++ you may need to use GNU as instead of
2172 /usr/ccs/bin/as, if you want -gstabs+ and -pipe support.
2174 Thanks to Susan Liebeskind &lt;shl@janis.gtri.gatech.edu&gt;
2175 for providing the following useful information:</p><p>
2177 By default, ACE uses both the Solaris and POSIX thread
2178 interface. To disable use of the Solaris thread interface, add
2179 <code>-D_POSIX_PTHREAD_SEMANTICS</code> to the
2180 <code>CFLAGS</code> in your
2181 <code>$(ACE_ROOT)/include/makeinclude/platform_macros.GNU</code>.
2182 See the Solaris Intro (3) man page for more information.</p><p>
2184 To disable ACE thread support completely, build with the
2185 <code>threads=0</code> make flag. See the <a href="#flags">Makefile Flags</a> section below for more
2186 information on make flags.</p><p>
2188 If you use g++ on Solaris 7, you might need to rebuild
2189 it on a SunOS 5.7 (Solaris 7) host. Some versions of g++
2190 provide replacements for system header files. The
2191 replacements on older SunOS systems are not compatible with the
2192 SunOS 5.7 system headers. </P>
2194 </li><li><b>AIX</b><p>
2196 ACE is currently supported on AIX 5.2 and higher using IBM's
2197 Visual Age C++ 6 and XL C++ 7 compilers as well as g++ 3.2.</p><p>
2199 The <code>ace/config-aix-5.x.h</code> file is recommended for all
2200 compilers on all AIX 5L versions. The Asynchronous I/O functionality
2201 is disabled by default because its use requires the system administrator
2202 to explicitly enable it in the kernel using SMIT. If this has been
2203 done and you want to enable asynchronous I/O support in ACE, add:
2204 <code>#define ACE_HAS_AIO_CALLS</code> to your <code>config.h</code>
2205 file before including <code>ace/config-aix-5.x.h</code>.</p><p>
2207 The Visual Age 6.0.0.3 and 6.0.0.4 do have some bugs that makes
2208 them unusable for building TAO. TAO has been tested with 6.0.0.12 and
2209 had no problems with that version.</p><p>
2211 For your <code>platform_macros.GNU</code> file, you should use
2212 <code>platform_aix_ibm.GNU</code> when building ACE with any of the
2213 IBM compilers and <code>platform_aix_g++.GNU</code> when building ACE
2214 with g++.</p><p>
2216 BTW, here's a technique from Rob Jordan &lt;<a href="mailto:jordan@hursley.ibm.com">jordan@hursley.ibm.com</a>&gt;
2217 that can reduce the size of the ACE libraries by about one
2218 third, and can also be applied to applications. It works by
2219 optimising the sharing of template functions, which are created
2220 in an "unusual" way under AIX. It also speeds up
2221 compilation.</p><p>
2223 Here's how to optimise the ACE library generation:</p><p>
2225 Look at the <a href="ace/GNUmakefile.ACE">ace/GNUmakefile.ACE</a>
2226 in <code>$ACE_ROOT/ace</code>. Create a file called
2227 <code>ACE_All_Src.cpp</code>, and add a line to #include
2228 each of the source files
2229 listed under <code>FILES=</code> in the GNUmakefile. Create a
2230 file called <code>ACE_All_Tmp.h</code>
2231 and add a line to #include each of the .h files listed under
2232 <code>TEMPLATE_FILES=</code> in the GNUmakefile. Now update the
2233 GNUmakefile so that
2234 <code>FILES=ACE_All_Src</code> and
2235 <code>TEMPLATE_FILES=ACE_All_Tmp</code>.</p><p>
2237 </p></li><li><b><a name="Linux">Linux</a></b><p>
2239 ACE has been ported to Linux on
2240 Intel, Alpha, and PowerPC platforms. If you use a RedHat 5.x
2241 distribution, it's best to use RedHat 5.1 or later. ACE works
2242 without any modifications on RedHat 5.1 and later, and on
2243 Debian 2.1 on both Intel and Alpha. Use the
2244 <code>platform_linux.GNU</code> and <code>ace/config-linux.h</code>
2245 in your <code>platform_macros.GNU</code> and
2246 <code>config.h</code> files, respectively. The same
2247 files can be used on PowerPC, with LinuxPPC
2248 1999 (R5), with glibc 2.1.1.</p><p>
2250 If you run out of memory, it's easy to add virtual memory on
2251 Linux. Please see the <code>mkswap</code> man page. You'll
2252 need at least 256 to 300 Mb of virtual memory (RAM + swap) to
2253 compile all of ACE+TAO. The <a href="#resource_requirements">System
2254 Resource Requirements section</a> has some suggestions on how
2255 to reduce the memory requirement.</p><p>
2257 The glibc 2.0 dynamic loader isn't thread safe. If you want to
2258 use the Invocation API you'll have to set
2259 <code>LD_BIND_NOW=true</code>. If you want to use
2260 <code>dlopen</code>, you should use <code>RTLD_NOW</code>. The
2261 dynamic loader in glibc 2.1 is thread safe.</p><p>
2263 <strong>NOTE:</strong> The TAO NameService uses IP multicasting
2264 by default, though it is not required. IP multicast on Linux
2265 requires the following:</p><p>
2267 </p><ul>
2268 <li>Enable IP multicast in the Linux kernel. It is enabled in
2269 the default RedHat 5.1 kernel. In older distributions, you
2270 can enable it by rebuilding your kernel with CONFIG_IP_MULTICAST
2271 enabled.<p>
2272 </p></li><li>Enable IP multicast in ACE. It is enabled by default in
2273 <code>ace/config-linux.h</code>. If you don't use
2274 IP multicast, add <code>#define ACE_HAS_IP_MULTICAST 0</code>
2275 to your <code>ace/config.h</code> before building ACE.<p>
2276 </p></li><li>There must be a network interface that is up and supports
2277 multicast. If you have linuxconf, it's easiest to use that
2278 to add a network route for multicast (224.0.0.0) on one of
2279 your network interfaces, such as <code>eth0</code>. If
2280 you don't have or use linuxconf, try adding a multicast
2281 routing table entry using something like this:<p>
2282 </p><pre> <code># route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0</code>
2283 </pre><p>
2284 </p></li></ul>
2286 Some of the ACE tests fail on older, pre-glibc2 Linux platforms,
2287 such as RedHat 4.2. The problems are with threads and
2288 thread-specific storage.</p><p>
2290 </p></li><li><b>SCO UNIX</b><p>
2292 ACE has been ported to SCO UNIX using the GNU g++ 2.7.2
2293 compiler. Arturo Montes &lt;<a href="mailto:mitosys@colomsat.net.co">mitosys@colomsat.net.co</a>&gt;
2294 maintains this code. In addition, he also maintains a version
2295 of <a href="http://www.cs.wustl.edu/%7Eschmidt/ACE_wrappers/FSU-threads.tar.gz">FSU pthreads</a>.</p><p>
2297 </p></li><li><b>SGI IRIX 5.x and 6.x</b><p>
2299 ACE used to build fine using the SGI C++ and GNU GCC compilers
2300 for IRIX 5.x. It has been ported to IRIX 6.x using the SGI
2301 MipsPro 7.1 C++ compiler; be aware that in IRIX 6.2 there is a
2302 number of patches that have to be installed and exceptions
2303 appear to fail with the O32 ABI. Please check the config files
2304 for the details.</p><p>
2306 </p></li><li><b>OSF/1 3.2 and 4.0 (a.k.a. Digital UNIX 4.0)</b> <p>
2308 The Digital UNIX C++ 5.4 through 5.7 compilers have problems
2309 with ACE's templates. They compile the lib and most of the test
2310 programs, although they warn about template usage. Most tests
2311 run, some dump core. If you use a 5.x version of cxx, be sure
2312 to set the CXX_VER variable to CXX_5, either on your make
2313 command line or in an environment variable. The ACE Makefiles
2314 assume by default that the cxx version is 6.x or later.</p><p>
2316 CXX 6.0 and 6.1 are much improved over 5.x: V6.0-020, V6.1-025,
2317 and later build all of ACE cleanly. All of the tests in
2318 $(ACE_ROOT)/tests run successfully with CXX 6.0 and CXX 6.1.
2319 Please note that problems have been reported with some versions
2320 of CXX 6.1, notably versions -021 and earlier. It's best to use
2321 V6.1-022 or later.</p><p>
2323 NOTE: if you use Digital UNIX 4.0f or later, you <strong>must</strong>
2324 use <code>ace/config-tru64.h</code> instead of
2325 <code>ace/config-osf1-4.0.h</code>. <code>ace/config-tru64.h</code>
2326 can be used for all supported compilers on any version of
2327 Digital UNIX after and include 4.0. And, with 4.0f and later when
2328 using Digital CXX, you <strong>must</strong> use
2329 <code>include/makeinclude/platform_tru64_cxx.GNU</code> instead of
2330 <code>include/makeinclude/platform_osf1_4.0.GNU</code>.</p>
2332 </li><li><b> FreeBSD </b><p>
2334 FreeBSD is a fast evolving platform. However, it has the
2335 advantage of having standard releases. At this moment, ACE is
2336 only perodically tested against -stable (3.1R) and we rely a lot
2337 on FreeBSD users' feedbacks. </p><p>
2339 Notice that on older FreeBSD, <code>ld.so</code> only looks for
2340 so libraries with <b>version number</b> appended. ACE makefiles
2341 create symlinks for most shared libraries if
2342 <code>versioned_so</code> is defined to 1 in
2343 <code>$ACE_ROOT/ace</code> with appropriate ACE version.
2344 However, this does not work for libACE.so itself so you have to
2345 create it manually (If you figure out how to do this, please let
2346 us know) like this: </p><p>
2348 <code>ln -sf $ACE_ROOT/ace/libACE.so $ACE_ROOT/ace/libACE.so.4.5</code></p><p>
2350 On newer FreeBSD (3.0 or later,) this is no longer necessary.</p><p>
2352 </p></li><li><b>NetBSD</b><p>
2354 Like older FreeBSD, NetBSD's <code>ld.so</code> also requires
2355 versioned .so files.</p><p>
2357 </p></li><li><b>OpenBSD</b><p>
2359 ACE has been ported to OpenBSD 3.1 and GNU g++ 2.95.3.</p><p>
2361 As with FreeBSD and NetBSD, OpenBSD requires versioned .so
2362 files. This is currently handled by the build files and no
2363 additional work is needed.</p><p>
2365 ACE has been ported to OpenBSD with and without pthreads
2366 enabled. When using pthreads, though, C++ exceptions must be
2367 disabled. This is a known problem with the current release of
2368 OpenBSD (see www.openbsd.org, bug #1750). ACE emulated
2369 exceptions work fine.</p><p>
2371 Compiling TAO may require the user data segment size
2372 restrictions and possibly other options to be increased. This
2373 is done by modifying the default user class in /etc/login.conf
2374 or by adding a new class and modifying the master passwer file
2375 accordingly.</p><p>
2377 </p></li><li><b> UnixWare </b> <p>
2379 Steve Huston &lt;<a href="mailto:shuston@riverace.com">shuston@riverace.com</a>&gt;
2380 has ported ACE to work with UnixWare 2.01 and g++.</p><p>
2382 Ganesh Pai &lt;<a href="mailto:gpai@voicetek.com">gpai@voicetek.com</a>&gt;
2383 subsequently did the port for version 2.1.2, also with g++.</p><p>
2385 Phil Mesnier &lt;<a href="mailto:mesnier_p@ociweb.com">
2386 mesnier_p@ociweb.com</a>&gt; updated the port to support
2387 UnixWare 7.1.0, with help from Michael Meissnitzer
2388 &lt;<a href="mailto:michael.meissnitzer@siemens.at">
2389 michael.meissnitzer@siemens.at</a>&gt;, Christian Klepp &lt;
2390 <a href="mailto:christian.klepp@siemens.at">christian.klepp@siemens.at
2391 </a>&gt; and Engelbert Staller &lt;<a href="mailto:engelbert.staller@siemens.at">
2392 engelbert.staller@siemens.at</a>&gt;
2393 Building ACE (and TAO) on Unixware 7.1.0 requires a very specific
2394 g++ build environment. In particular, you must build and install
2395 g++ 2.95.2, along with binutils 2.9.1. The order (and the declaration
2396 of configuration) is extremely important. Using the gcc compiler
2397 provided on the Skunkware CD on a pentium system, here is the recipe
2398 I used to build a working environment (as root):<br>
2399 </p><pre> mkdir /usr/local/newgnu
2400 &lt; ftp and untar binutils-2.9.1 &gt;
2401 &lt; ftp and untar gcc-2.95.2 &gt;
2402 mkdir -p build/binutils build/gcc
2403 cd build/binutils
2404 ../../binutils-2.9.1/configure i386-sco-sysv4
2405 gmake # takes a long time
2406 gmake install # this creates /usr/local/i386-sco-sysv4/...
2407 mkdir /usr/local/i486-pc-sysv5/bin
2408 cd /usr/local/i486-pc-sysv5/bin
2409 for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
2410 #links all the newly installed utilities
2412 cd /usr/local/newgnu/build/gcc
2413 ../../gcc-2.95.2/configure --with-gnu-as --with-gnu-ld
2414 gmake bootstrap # takes a long time
2415 gmake install
2416 mkdir /usr/local/i586-UnixWare7.1.0-sysv5/bin
2417 for a in /usr/local/i386-sco-sysv4/bin/*; do ln -s $a .; done
2418 </pre>
2419 Once done, ACE and TAO will successfully build and link.<p>
2421 </p></li><li><b><a name="LynxOS">LynxOS</a></b><p>
2423 ACE builds and runs properly on LynxOS 4.0 for Intel
2424 and PowerPC targets. LynxOS 2.x and 3.x are no longer supported.
2426 If you run out of memory on LynxOS, these might help:</p><p>
2428 </p><ul>
2429 <li>Increase the limits in <code>/etc/starttab</code>,
2430 then reboot system. We use these limits:
2431 <pre># Data, stack, and core file limits (in Kbytes)
2432 80000
2433 16000
2434 102400</pre><p>
2435 </p></li><li>Enable or expand virtual memory, with something like:
2436 <pre># mkcontig /swap 320
2437 # prio 17 vmstart /swap</pre>
2438 See the <code>mkcontig</code> and <code>vmstart</code>
2439 man pages, and <code>/bin/rc</code>.<p>
2440 </p></li></ul>
2442 Please see the comments in the
2443 <a href="include/makeinclude/platform_lynxos.GNU">ACE
2444 platform_lynxos.GNU file</a> for information on, and an
2445 example of, tailoring for your particular platform.<p>
2447 NOTE: if you want to use IP multicast on LynxOS, be sure to add
2448 this line to your <code>/net/rc.network</code>, and reboot:</p><p>
2449 </p><pre><code>
2450 /bin/route add "224.0.0.0" "$my_name"
2451 </code></pre>
2453 </li><li><strong>VxWorks</strong><p>
2455 David Levine has
2456 ported ACE to VxWorks 5.2/5.3/5.3.1/5.4 with the GreenHills
2457 1.8.8/1.8.9, g++ and diab compilers that are distributed with
2458 VxWorks/Tornado. It is not possible to use VxWorks 5.4
2459 and earlier with ACE anymore because the compilers delivered with
2460 5.4 and earlier don't support the C++ features ACE needs.</p><p>
2462 At this moment <a href="https://www.remedy.nl">Remedy IT</a> is upgrading
2463 and stabilizing ACE/TAO support for Tornado 2.2/VxWorks 5.5.1.
2464 Since the existing support for previous VxWorks version has been unsupported
2465 and broken for some time and most (potential) users seem to have upgraded to
2466 VxWorks 5.5.1 no backporting effort is done. See also <a href="#vxworks">here</a>.
2467 </p><p>
2469 Tornado 2.2/VxWorks 5.5.1 support IP multicast. That is not enabled
2470 by default in ACE for VxWorks, because it depends on your
2471 kernel configuration. To enable it, add
2472 <code>#define ACE_HAS_IP_MULTICAST</code> to your
2473 <code>ace/config.h</code>.</p><p>
2475 NOTE: In order for the ACE Broadcast and Multicast tests to work the VxWorks kernel
2476 should receive the packages it sends out locally. By default this is not supported.
2477 To enable this behaviour you need to include the IFF_SIMPLEX flag for your required
2478 NIC driver. See the following Windriver <a href="https://secure.windriver.com/cgi-bin/windsurf/techtips/public/viewSum.cgi?4542">SPR 4542</a>
2479 for more information.</p><p>
2481 In addition to all of the other benefits of ACE, it helps work
2482 around some deficiencies with VxWorks. The problems are:</p>
2485 </p><ol>
2486 <li>The program entry point cannot be called "main" with g++. ACE
2487 renames it to "ace_main" (configurable via ACE_MAIN) on VxWorks.
2488 While this may seem trivial, it is important with legacy code.
2489 ACE itself ran into this problem.<p>
2491 </p></li><li>argc/argv isn't used with VxWorks entry points. ACE provides
2492 a wrapper function that transparently converts shell command
2493 line arguments to argc/argv form. See <a href="#spa">below</a>
2494 for details.<p>
2496 </p></li></ol>
2498 Please note that ACE uses one of the spare fields in the Wind
2499 River task control block, spare4, for thread-specific storage.
2500 This field is specified in only one place, in ace/OS_NS_Thread.inl, so it
2501 can easily be changed to one of the other spare fields, if
2502 necessary.</p><p>
2504 ACE destroys dynamically
2505 allocated singletons in the ACE library. But, they may not
2506 properly destroy some static objects. If you have trouble
2507 running a program multiple times, it may be necessary to unload
2508 the module, using unld, and reload it between runs.
2509 Alternatively, you could try calling <code>cplusDtors</code> and
2510 then <code>cplusCtors</code> between runs.</p><p>
2512 </p></li><li><b>MVS OpenEdition</b> <p>
2514 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;.
2515 The ACE library, all the tests and most of the examples and apps
2516 build clean. There are still some problems that need to be
2517 ironed out:</p><p>
2519 MVS does not support the dynamic linking dl...() calls that the
2520 Service Configurator uses to dynamically link services at run
2521 time. As a result, all the examples and apps that use a svc.conf
2522 file (for dynamically configuring service objects) do not work,
2523 however, most of these apps can be built/run statically. Also,
2524 the Svc_Conf_l.cpp and Svc_Conf_y.cpp files are generated using
2525 flex and yacc on a ascii (not ebcdic) machine and as a result
2526 they don't work very well with ebcdic svc.conf files. We should
2527 be able to regenerate these files on MVS but MVS doesn't have
2528 flex. This is something that needs to be done.</p><p>
2530 Some of the tests do not execute properly. This is a minority
2531 and over time the goal is to get to 100%.</p><p>
2533 The make scheme for some of the apps still doesn't work
2534 perfectly on MVS. This is mainly due to the way shared
2535 libraries are handled on MVS. See <a href="#mvs">additional
2536 build tips for MVS</a> for more on this.</p><p>
2538 </p></li><li><strong>QNX Neutrino</strong><p>
2540 ACE has been ported to <a href="http://www.qnx.com/products/os/neutrino.html">QNX Neutrino
2541 2.0</a>. We cross-compile for Neutrino on a QNX4 host using g++
2542 2.8.1, using the <a href="ace/config-qnx-neutrino.h">ace/config-qnx-neutrino.h</a>
2543 and <a href="include/makeinclude/platform_qnx_neutrino.GNU">include/makeinclude/platform_qnx_neutrino.GNU</a>
2544 configuration files. Many of the ACE tests succeed, though some
2545 fail. As the porting effort progresses, we hope to eliminate
2546 these failures. If you know of fixes, please send them to
2547 us.</p><p>
2548 </p></li><li><strong>QNX RTP</strong><p>
2550 ACE has been ported to <a href="http://get.qnx.com/">QNX RTP
2551 </a>. We compile for QNX RTP using the GCC compiler shipped with the
2552 distribution, using the <a href="ace/config-qnx-rtp.h">ace/config-qnx-rtp.h</a>
2553 and <a href="include/makeinclude/platform_qnx_rtp_gcc.GNU">include/makeinclude/platform_qnx_rtp_gcc.GNU</a>
2554 configuration files.
2555 Many of the ACE tests succeed, though some
2556 fail. As the porting effort progresses, we hope to eliminate
2557 these failures. If you know of fixes, please send them to
2558 us.</p><p>
2559 <strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
2560 Under the current version of QNX RTP ACE fails if compiled with
2561 inline=0 . </p><p>
2563 </p></li><li><strong><a name="rtems">RTEMS</a></strong><p>
2565 The support for RTEMS has been revived from version x.5.4. This version
2566 was the first version that build again out of the box on RTEMS. Compilation
2567 and testing was done for RTEMS with and without networking support. The
2568 ACE GNU makefiles do automatically detect whether networking support
2569 is available or not.
2571 Besides the standard config.h/platform_macros.GNU file you will need
2572 to set <code>RTEMS_MAKEFILE_PATH</code> to point to the location
2573 of your RTEMS installation, see below for an example.</p>
2574 <p><code>export RTEMS_MAKEFILE_PATH=/opt/rtems/CPU-rtems/BSP</code></p>
2576 When building without network support you will need the ace_for_tao
2577 subsetting functionality enabled. For this add <code>ace_for_tao = 1</code>
2578 to your <code>bin/MakeProjectCreator/config</code> file and regenerate the
2579 GNU makefiles as described <a href="#power">here</a>.</p><p>
2581 </p></li><li><strong>PharLap ETS</strong><p>
2583 ACE has been ported to Ardence's
2584 <a href="http://www.ardence.com/embedded/products.aspx?ID=71">PharLap ETS</a>
2585 version 13. The port was originally done for Pharlap 9.1 and MSVC 6,
2586 but has been updated to Pharlap ETS 13 with Visual Studio .NET 2003
2587 (VC7.1).</p><p> To build for PharLap, you'll need to use MPC to
2588 generate .sln/.vcproj files with the ETS configurations. For example:
2589 <pre>
2590 cd \ace\ACE_wrappers
2591 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
2592 </pre>
2593 That command will generate the same .sln and .vproj files as for
2594 regular Windows builds with VC7.1, but they'll have names with an
2595 <code>_ETS</code> suffix and will include the "ETS Debug" and
2596 "ETS Release" configurations.</p><p>
2597 After generating the needed VC7.1 files, use the ace/config-pharlap.h
2598 configuration file, and the instructions
2599 for building on Windows. Building the ACE library is the same as
2600 for regular Windows platforms, except you choose one of the PharLap
2601 ETS configurations to build within Visual Studio.
2602 For an example of how to build binaries, see the tests directory.
2603 The tests_pharlap_msvc.lnk file is a LinkLoc commands file that the
2604 ACE tests are built with. It is likely that local sites may need
2605 to adjust this file for their target environment.
2606 </p><p>
2607 When executing programs on the target system, it is possible that not
2608 all of the VC++ support DLLs are resident on the target. In particular,
2609 the debug-supporting DLLs may not be present. If you require these, be
2610 sure to add those needed. For example, on the standard LabVIEW RT 8.2
2611 distribution using Pharlap ETS, the following DLLs must be copied to
2612 the target before being able to run Debug programs:
2613 <ul>
2614 <li>msvcp71d.dll</li>
2615 <li>msvcr71d.dll</li>
2616 </ul>
2617 </p><p>
2618 <note>To build ACE for National Instruments' LabVIEW RT, use
2619 the Pharlap ETS information above, but add the following line to your
2620 config.h file:
2621 <pre>
2622 #define ACE_PHARLAP_LABVIEW_RT
2623 </pre>
2624 This setting makes the necessary adjustments for LabVIEW's implementation
2625 of Pharlap ETS.</note>
2627 <note>By default, the ACE tests log their output/results to the
2628 system console on Pharlap ETS. To change this behavior and make the
2629 test output log to a file in the <code>log</code> directory under the
2630 current working directory while executing, add the following line to
2631 your config.h file:
2632 <pre>
2633 #define ACE_PHARLAP_TESTLOG_TO_FILE
2634 </pre>
2635 This setting has no affect on TAO tests which always write test output
2636 to stdout.
2637 </note>
2639 </p></li><li><strong>Mac OS X (10.2.x)</strong><p>
2641 </p><p>ACE builds and runs on Mac OS X 10.2.x, but the following are
2642 needed to build it:</p>
2644 <p>1. The latest version of the Apple Developer Tools
2645 (December 2002)</p>
2646 <p>2. The dlcompat library (obtained either through Fink or
2647 SourceForge)</p>
2649 <p>When creating $ACE_ROOT/ace/config.h for Mac OS X, you need
2650 to add the following if you obtained dlcompat via Fink:</p>
2652 <p>#define ACE_NEEDS_DL_UNDERSCORE</p>
2654 <p>You'll also need to do:</p>
2656 <p>setenv DYLD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib</p>
2657 <p>setenv MACOSX_DEPLOYMENT_TARGET 10.2</p>
2659 <p>Currently, all ACE tests pass except Process_Mutex_Test and
2660 MEM_Stream_Test. Also, Mac OS X doesn't yet support *nix
2661 aio_* calls, and ACE does not know anything about Mach.</p>
2663 <p>The work to port ACE to Mac OS X was done by several people,
2664 John Zorko
2665 &lt;<a href="mailto:j.zorko@att.net">j.zorko@att.net</a>&gt; is
2666 only one of them.</p>
2668 </p></li><li><strong>iPhone/iPod Touch/iPad</strong><p>
2670 </p><p>ACE builds and runs on the iPhone/iPod Touch/iPad Hardware
2671 and Simulator. Keep in mind that ACE/TAO needs to be built
2672 statically since Apple does not allow third party dynamic libraries
2673 to be deployed on the hardware. The following are needed to build ACE:</p>
2675 <p>1. The iPhone SDK.</p>
2676 <p>2. When creating $ACE_ROOT/ace/config.h, include
2677 config-macosx-iphone-hardware.h if you want to deploy on the
2678 hardware, include config-macosx-iphone-simulator.h if you want
2679 to deploy on the simulator. Even though those includes are named
2680 after the iPhone, the includes work for iPhone/iPod Touch, and iPad.</p>
2681 <p>3. You need to define two environment variables. The first is
2682 IPHONE_TARGET. Set IPHONE_TARGET to SIMULATOR if you want to deploy
2683 on SIMULATOR. Set IPHONE_TARGET to HARDWARE if you want to deploy on
2684 the hardware device.</p>
2685 <p>4. When creating $ACE_ROOT/include/makeinclude/platform_macros.GNU,
2686 include 'include $(ACE_ROOT)/include/makeinclude/platform_macosx_iphone.GNU'
2687 in the file.</p>
2691 </li></ul>
2694 <hr>
2695 <h2><a name="g++">Compiling ACE with GNU g++</a></h2>
2697 If you use the GNU GCC g++ compiler please note the following:
2699 <ul>
2700 </p></li><li>ACE/TAO needs g++ 2.95.x or better. Older versions are not usable anymore<p>
2702 </p></li><li>Make sure to update your gcc <code>config.status</code>
2703 file. This file is produced when installing gcc; it specifies
2704 where to install the binary files that gcc uses. For example,
2705 it specifies whether to use Solaris's <code>/usr/ccs/bin</code>
2706 binary utils or GNU binary utils. The
2707 <code>config.status</code> file is an output of the gcc
2708 <code>configure</code> script; it is preferable to use the
2709 <code>--prefix</code> option to <code>configure</code> instead
2710 of hacking its output.<p>
2712 </p></li><li>If you are getting weird link errors when building libACE
2713 on Solaris you are probably using the GNU linker. Try using the
2714 Sun linker (/usr/ccs/bin/ld) instead. Note that gcc first looks
2715 for the GNU linker if it is installed along with gcc. The only
2716 way to not use the GNU linker is to delete it from the
2717 installation or to build your own compiler with no linker. Be
2718 aware that you still need the libraries and includes of gcc.<p>
2720 NOTE: if you do use the GNU linker, you might need to change
2721 the <code>-G</code> flag to <code>-shared</code> in
2722 the <code>SOFLAGS</code> definition in your
2723 <code>include/makeinclude/platform_macros.GNU</code>.</p><p>
2725 </p></li><li>Don't get too confused about contradictory statements in
2726 the gcc documentation. It was written by different
2727 people...<p>
2729 </p></li><li>Make sure that the linker invoked by gcc produces code
2730 that initializes static objects. Please see gcc's
2731 documentation for using <code>collect2</code>.<p>
2733 </p></li></ul>
2736 <hr><p>
2737 </p><h2><a name="minimum_build">What Do I Need to Build for TAO?</a></h2>
2738 Toshio Hori &lt;toshi@etl.go.jp&gt; provided these suggestions on building
2739 just what's needed for (a subset of) TAO:<p>
2741 I usually make:
2742 </p><pre> $ACE_ROOT/ace,
2743 $ACE_ROOT/apps/gperf,
2744 $TAO_ROOT/tao,
2745 $TAO_ROOT/TAO_IDL, and
2746 $TAO_ROOT/orbsvcs/orbsvcs
2747 </pre>
2748 and the whole make takes less than an hour on my Solaris 7 for intel,
2749 Pentium-III/550MHz, 256MB memory, 512MB swap machine. (Top secret: I
2750 renice the 'make' process to the highest priority, -20... ;-)
2752 To save time and space, I set
2753 <pre> TAO_ORBSVCS = Naming Time Trader ImplRepo
2754 </pre>
2755 in <code>$ACE_ROOT/include/makeinclude/platform_macros.GNU</code> also. See
2756 <a href="TAO/docs/configurations.html#orbsvcs">TAO's orbsvcs
2757 library customization instructions</a> for more information.<p>
2760 </p><hr><p> </p><h2><a name="resource_requirements">System Resource
2761 Requirements</a></h2> The amount of system resources required to build
2762 ACE and TAO varies greatly. The required system resources are
2763 influenced by OS and compiler platform, build options, and component
2764 configurations. As a rough guide, the typical peak memory requirement
2765 can be well over 512 MB (notably, for TAO's orbsvcs). Depending on
2766 your OS and compiler configuration, an <strong>entire</strong> build
2767 of ACE and TAO can use well over 4 GB of disk space. It's usually not
2768 necessary to build <strong>all</strong> of ACE and TAO, though.<p>
2770 Much less disk space is required for just the libraries. For example,
2771 see the <a href="docs/ACE-subsets.html#ACE%20Library%20Size%20Breakdown">ACE
2772 library subset sizes</a>.</p><p>
2774 If you run out of memory when building, you might consider trying
2775 some or all of these suggestions:</p><p>
2776 </p><ul>
2777 <li>Enable or increase virtual memory. If you're on a <a href="#Linux">Linux</a> or <a href="#LynxOS">LynxOS</a> platform,
2778 please see the appropriate sections above.<p>
2779 </p></li><li>Disable/enable optimization and/or debugging. See the
2780 <a href="#flags">Makefile Flags</a> discussion for information
2781 on how to do that via ACE's Makefiles.<p>
2782 </p></li><li>If you're using g++, try removing <code>-pipe</code> from
2783 <code>CFLAGS</code> in your
2784 <code>include/makeinclude/platform_macros.GNU</code> file.<p>
2785 </p></li><li>Restrict the components that you build. For ACE and TAO, see the
2786 discussion of <code>ACE_COMPONENTS</code> in the
2787 <a href="docs/ACE-subsets.html">ACE subsets</a> page. For TAO's
2788 orbsvcs, see the discussion of <code>TAO_ORBSVCS</code> in
2789 <a href="TAO/docs/configurations.html#orbsvcs">orbsvcs Library configuration information</a>.<p>
2791 If disk space is a problem, disabling debugging should greatly
2792 reduce object code, and therefore, library size. This is especially
2793 true with g++.</p><p>
2795 Toshio Hori &lt;toshi@etl.go.jp&gt; provided these tips for reducing
2796 disk space usage:</p><p>
2798 To save space on a Unix machine, I usually run
2799 'find . -name \*.sln -o -name \*.vcproj -o -name \*.bmak | xargs rm -f'
2800 in $ACE_ROOT at first after I untar the distribution. They are
2801 meaningless in my environment (Files named '*.sln' and '*.vcproj' are
2802 used for MSVC++ and files named '*.bmak' are for Embarcadero C++
2803 Builder.)</p><p>
2805 Finally, to save space, may want to run 'make clean' after 'make'. It
2806 removes generated object files and leaves libraries/executables
2807 intact. If you want to remove any of the libraries/executables, as
2808 well, try 'make realclean'.</p><p>
2810 </p></li></ul>
2812 <p></p><hr><p>
2813 </p><h1 name="MPC">General MPC information</a></h1>
2816 The <A HREF="
2817 http://htmlpreview.github.io/?https://github.com/DOCGroup/MPC/blob/master/docs/html/MakeProjectCreator.html">
2818 Makefile Project Creator (MPC)</A> is a tool that takes platform and
2819 building tool generic files (mpc files) as input, which describe basic
2820 information needed to generate a "project" file for various build
2821 tools, including Make, NMake, Visual C++ 6, Visual C++ 7, etc. Please
2822 see <a href="MPC/docs/USAGE">USAGE</a>, <a
2823 href="MPC/docs/README">README</a> for documentation on MPC.
2824 </p>
2827 A common usage for creating a Windows workspace containing just the
2828 core ACE and TAO libraries and executables is the following:
2829 </p>
2831 <pre><code>
2832 C:> cd %TAO_ROOT%
2833 C:> %ACE_ROOT%\bin\mwc.pl -type vc71 TAO_ACE.mwc
2834 </pre></code>
2837 Replace vc71 with whatever project type you want to use. On Linux and
2838 other UNIX platform use the gnuace type:
2839 </p>
2841 <pre><code>
2842 % cd $TAO_ROOT
2843 % $ACE_ROOT/bin/mwc.pl -type gnuace TAO_ACE.mwc
2844 </pre></code>
2847 This creates the appropriate GNUmakefiles. Additional information on
2848 how to obtain, configuration, and build ACE+TAO using MPC appear at
2849 the OCI <A
2850 HREF="http://www.theaceorb.com/faq/index.html#HowToBuildACEandTAOonWindows">FAQ</A>.
2851 </p>
2854 If you are attempting to generate project files using MPC, and you get
2855 the following error message:
2856 </p>
2858 <pre>ERROR: Unable to find the MPC modules in /builds/ACE_wrappers/MPC.
2859 You can set the MPC_ROOT environment variable to the location of MPC.
2860 </pre>
2863 You need to do one of the following:
2864 </p>
2866 <ol>
2867 <li>If you have already obtained MPC, either move it underneath the
2868 ACE_wrappers directory or set your MPC_ROOT environment variable to point
2869 to the full path of MPC.</li>
2870 <li>Check out MPC from the DOC Group git repository
2871 and set your MPC_ROOT environment variable.</li>
2872 </ol>
2875 You can check
2876 out MPC from the DOCGroup git repository using the following command.
2877 </p>
2879 <pre>git clone https://github.com/DOCGroup/MPC.git MPC
2880 </pre>
2883 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
2884 source of documentation, however it is not a complete set of
2885 documentation. The TAO Developer's Guide from OCI starting with the
2886 1.3a version contains more information about MPC.
2887 </p>
2890 The MPC chapter from the TAO Developer's Guide is available at <a
2891 href="http://downloads.ociweb.com/MPC/">
2892 http://downloads.ociweb.com/MPC/</a>. Some of MPC has changed since
2893 this version, but it is largely accurate. An updated version will be
2894 available as newer versions of the TAO Developer's Guide are released.
2895 In the meantime, please see the README and USAGE files in the MPC
2896 directory.
2897 </p>
2900 </p><h1><a name="eclipse">Working with ACE in Eclipse</a></h1>
2904 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.
2905 </p>
2908 <h2>To create an Eclipse project for ACE starting from CVS:</h2>
2909 <ol>
2910 <li>In the "CVS Repository Exploring" perspective, navigate to the module containing ACE.</li>
2911 <li>Checkout the module using "Check Out As" and select the "project configured using the New Project Wizard" option.</li>
2912 <li>Select "Standard Make C++ Project" for the project type.</li>
2913 <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.
2914 <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>
2915 <li>Select the root folder for the project and use the "Create Make Target" wizard to setup the appropriate make command and options.</li>
2916 <li>Select the root folder and run "Build Make Target." This will build ACE.</li>
2917 </ol>
2918 </p>
2923 <h2>To create an Eclipse project for ACE from a local source distribution:</h2>
2924 <ol>
2925 <li>Launch the "New Project Wizard" in Eclipse.</li>
2926 <li>Select "Standard Make C++ Project" for the project type.</li>
2927 <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>
2928 <li>Follow the steps, up to the point of running make, for building ACE on your platform.
2929 <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>
2930 <li>Select the root folder for the project and use the "Create Make Target" wizard to setup the appropriate make command and options.</li>
2931 <li>Select the root folder and run "Build Make Target." This will build ACE.</li>
2934 </ol>
2935 </p>
2937 </p>
2939 <hr><p>
2940 </p><h1><a name="advanced">Advanced Topics</a></h1>
2942 <ul>
2943 <li><a href="docs/ACE-porting.html">Porting ACE and TAO to a New OS Platform</a>
2944 </li><li><a href="#NonStaticObjectManager">Non-static ACE_Object_Manager</a>
2945 </li><li><a href="#cloning">Cloning the Source Tree</a>
2946 </li><li><a href="#mvs">Additional Build Tips for MVS</a>
2947 </li><li><a href="#flags">Makefile Flags</a>
2948 </li><li><a href="docs/ACE-SSL.html">ACE SSL effort</a>
2949 </li></ul>
2951 <p></p><hr align="left" width="50%"><p>
2952 </p><h2><a name="NonStaticObjectManager">Non-static
2953 ACE_Object_Manager</a></h2> The ACE_Object_Manager can be instantiated
2954 as a static object, can be instantiated on the stack of the main
2955 program thread, or can be explicitly instantiated and destroyed by the
2956 application with <code>ACE::init ()</code> and <code>ACE::fini
2957 ()</code>. The comments in the header file,
2958 <a href="ace/Object_Manager.h"><code>ace/Object_Manager.h</code></a>, as well as Section 1.6.3 in
2959 <a href="http://www.riverace.com/docs">The ACE Programmer's Guide</a>
2960 provide more detail.<p>
2962 <strong><blink><font color="#ff0000">NOTE:</font></blink></strong>
2963 Special requirements are imposed on applications if the
2964 ACE_Object_Manager is instantiated, by ACE, on the stack of the main
2965 thread. This behavior is selected by defining
2966 <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> in
2967 <code>ace/config.h</code>. Again, see the ACE Object_Manager header file,
2968 <a href="ace/Object_Manager.h"><code>ace/Object_Manager.h</code></a> for more information. One of
2969 these requirements is discussed here, because it is so important.
2970 Please note that <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> is
2971 defined in the distributed ACE <code>config.h</code> headers for
2972 VxWorks and Win32.</p><p>
2974 The important requirement is that the program <strong>must</strong>
2975 declare its <code>main</code> function with two arguments, even if
2976 they're not used, and with <code>int</code> return type:
2978 </p><pre><code>
2980 main (int, char *[])
2981 </code></pre>
2983 If you don't declare <code>main</code> <strong>exactly</strong> that
2984 way, then you'll see a link error about <code>ace_main_i</code> being
2985 undefined.<p>
2987 Alternatively, this feature can be disabled by commenting out the
2988 #define ACE_HAS_NONSTATIC_OBJECT_MANAGER in the
2989 <code>ace/config.h</code>. But, that will make repeated testing more
2990 difficult on VxWorks. And, you'd either have to call static
2991 constructors and destructors manually or unload/load the program
2992 between runs. On Win32, disabling the feature can possibly lead to
2993 shutdown difficulties.</p><p>
2995 <strong><blink><font color="#ff0000">WARNING:</font></blink></strong>
2996 <code>ACE_HAS_NONSTATIC_OBJECT_MANAGER</code> assumes that your
2997 <code>main</code> function is named <code>main</code>. Any violation
2998 of this assumption is at your peril. If you really need to call your
2999 entry point something other than <code>main</code>, you'll need to
3000 construct and destroy the ACE_Object_Manager. The best way to do that
3001 is to call <code>ACE::init ()</code> and <code>ACE::fini ()</code>.
3002 Or, see the <code>#define</code> of <code>main (int, char *[])</code>
3003 in <a href="ace/OS_main.h"><code>ace/OS_main.h</code></a> to see how ACE does
3004 that for entry points named <code>main</code>.
3006 </p><p></p><hr align="left" width="50%"><p>
3007 </p><h2><a name="cloning">Cloning the Source Tree</a></h2>
3009 On UNIX platforms, we typically like to support multiple platform
3010 builds using the same ACE source tree. This idiom is supported by ACE
3011 using the $ACE_ROOT/bin/create_ace_build.pl script.
3013 To clone the source tree, create ./build and ./build/{your build name}
3014 subdirectories under the ACE_wrappers directory.
3015 Then invoke the create_ace_build.pl script to clone the source tree using
3016 soft links from your build directory back to the actual sources.
3017 Here is an example:</p><p>
3019 </p><pre>% cd ACE_wrappers
3020 % mkdir build build/build-SunOS5
3021 % perl bin/create_ace_build.pl -a -v build-SunOS5
3022 % cd build/build-SunOS5
3023 % setenv ACE_ROOT $cwd
3024 % make
3025 </pre><p>
3027 This will establish a complete tree of links. In addition, make sure
3028 you set your <code>LD_LIBRARY_PATH</code> to
3029 <code>$ACE_ROOT/lib:$LD_LIBRARY_PATH</code> on SVR4 UNIX
3030 platforms.</p><p>
3032 When you do a make in the $ACE_ROOT directory you will be producing
3033 object code that is not stored in the same place as the original
3034 source tree. This way, you can easily build another platform in a
3035 parallel tree structure.</p><p>
3037 See the comments at the top of the create_ace_build.pl script for
3038 further usage information.
3040 </p><p></p><hr align="left" width="50%"><p>
3041 </p><h2><a name="mvs">Additional Build Tips for MVS</a></h2>
3043 For all intents and purpose, MVS OpenEdition (OE) is another flavor of
3044 UNIX, therefore, the instructions under <a href="#aceinstall">Building
3045 and Installing ACE on Unix</a> can be used along with the following
3046 additional tips:<p>
3048 You can get a copy of GNU make that has been ported to MVS OpenEdition from
3049 the <a href="http://www.s390.ibm.com/products/oe/index.html">IBM OpenEdition web site</a>.
3050 ACE's make scheme generates compile commands that have options and
3051 operands interspersed. By default, the c89/cc/c++ compiler expects all options to
3052 precede all operands. To get around this, you must set a special
3053 compiler environment variable (_CXX_CCMODE) to 1 which tells the compiler
3054 to allow options and operands to be interspersed.</p><p>
3056 Note that the environment variable <code>LD_LIBRARY_PATH</code> is
3057 called <code>LIBPATH</code> on MVS.</p><p>
3059 Shared objects are built a little different on MVS than on
3060 other UNIX implementations. This has been accounted for in the makefiles
3061 that come with ACE When the linker (via the cxx command) builds the
3062 libACE.so file it will also create a file called libACE.x. This is a
3063 side-deck file and it must be included in subsequent link edits with
3064 application code. For more information on this see the C/C++ MVS
3065 Programming Guide. If you want to build your application statically,
3066 i.e., using libACE.a instead of libACE.so, you can set ACELIB to
3067 ACELIB_STATIC in platform_mvs.GNU.</p><p>
3069 When the libACE.so file is built (via the MVS pre-linker and binder), you
3070 will get a rc=4 from the pre-linker. This is ok. This is due to some
3071 warnings about unresolved references which should get resolved during the
3072 link step. Note, however, there shouldn't be any unresolved references
3073 from the binder (linkage editor). You can get pre-link and link maps by
3074 uncommenting the PMAP and LMAP lines in the platform_mvs.GNU file.
3076 </p><p></p><hr align="left" width="50%"><p>
3077 </p><h2><a name="flags">Makefile Flags</a></h2>
3079 GNU make provides many options to customize its operation. See its
3080 documentation for more information. One example is that for multi-cpu
3081 UNIX machines you will be able to build faster if you use:<p>
3083 </p><pre><code>
3084 % make -j <em>n</em>
3085 </code></pre><p>
3087 which allows parallel compilation. The number <i>n</i> should
3088 typically be the number of CPUs. It is likely that builds will be
3089 faster even on single-CPU UNIX machines with <code>make -j
3090 2</code>.</p><p>
3092 ACE further supports the following flags. They can be enabled either
3093 on the command line, e.g., "make purify=1", or added to your
3094 <code>platform_macros.GNU</code>. To disable the option,
3095 set the flag to null,
3096 e.g., "make debug=". Some flags support setting to 0 disable, e.g.,
3097 "make debug=0". debug=1 is enabled in the platform files that are
3098 released with ACE.</p><p>
3100 Please note that the effects of a flag may be platform specific.
3101 Also, combinations of certain flags may or may not be allowed on
3102 specific platforms, e.g., debug=1 opt=1 is supported by g++ but
3103 not all other C++ compilers.</p><p>
3105 If you use Purify or Quantify: purify or quantify <strong>must</strong>
3106 be on your <code>PATH</code>. By default, ACE puts the Purify/Quantify
3107 caches below <code>/tmp</code>. To override that, set the
3108 <code>PURE_CACHE_BASE_DIR</code> variable, either in your environment
3109 or on the <code>make</code> make command line, to the destination
3110 directory for your instrumented libraries.</p><p>
3112 </p><pre>Flag Description
3113 ---- -----------
3114 debug Enable debugging; see DCFLAGS and DCCFLAGS.
3115 exceptions Enable exception handling (not supported by all platforms).
3116 include_env Support old-style ACE_TRY_ENV declarations in methods.
3117 This switch is necessary for compiling TAO applications
3118 in the native exception configuration that were written
3119 for TAO versions before 1.2.2.
3120 In TAO 1.2.2, new macros were introduced that supercede
3121 the direct ACE_TRY_ENV declarations. These are the
3122 ACE_ENV_ARG macros that are defined in ace/CORBA_macros.h
3123 and are documented in docs/exceptions.html.
3124 This switch only affects the exceptions=1 configuration.
3125 It is for backward compatibility only.
3126 There will be warnings about unused _ACE_environment_variable
3127 parameters when using include_env=1.
3128 If possible, do not use it, but instead change your TAO
3129 applications to use the ACE_ENV_ARG macros.
3130 fast Enable -fast option, e.g., with Sun C++.
3131 inline Enable ACE inlining. Some platforms enable inlining by
3132 default, others do not.
3133 optimize Enable optimization; see OCFLAGS and OCCFLAGS.
3134 pace Enable PACE as the underpinnings of ACE_OS.
3135 probe Enable ACE_Timeprobes.
3136 profile Enable profiling; see PCFLAGS and PCCFLAGS.
3137 purify Purify all executables.
3138 quantify Quantify all executables.
3139 repo Use GNU template repository (g++ with repo patches only).
3140 rtti Enable run-time type identification. On some platforms,
3141 it is enabled by default, so this is ignored.
3142 shared_libs If migrating from prior version use <code>shared_libs_only</code>
3143 static_libs If migrating from prior version use <code>static_libs_only</code>
3144 shared_libs_only Only build shared libraries. Ignored if no SHLIBs are
3145 specified by the Makefile, as in performance-tests/Misc.
3146 static_libs_only Only build static libraries.
3147 threads Build with thread support.
3148 xt Build with Xt (X11 Toolkit) support.
3149 fl Build with FlTk (Fast Light Toolkit) support.
3150 tk Build with Tk (Tcl/Tk) support.
3151 qt Build with Qt (Trolltech Qt) support.
3152 ssl Build with OpenSSL support.
3153 rapi Build with RAPI
3154 split Build the library by first splitting up the ACE source
3155 to several files, with one object code entity for each
3156 source file. This allows an application that is linked
3157 with ACE to extract _exactly_ what it needs from the
3158 library, resulting in a smaller executable. Setting this
3159 to 1 overrides debug to 0.
3161 Usually, users do not need to be concerned with make targets.
3162 Just enter "make" on the command line to build. A few notable
3163 targets are listed below.
3165 Target Description
3166 ------ -----------
3167 show_statics Lists all static objects in object files built for
3168 current directory. Only supported for g++.
3169 show_uninit Lists all uninitialized in object files built for
3170 current directory. Only supported for g++.
3172 </pre>
3174 </p><hr>
3176 <h2><a name="power">Building from git</a></h2>
3178 If users are building from our <a href="https://github.com/DOCGroup/ACE_TAO">Git repository</a> the
3179 GNUmakefiles, and project files for building on various platforms will
3180 not be available. Git users are expected to <a href="#generate_using_mpc">generate them</a>
3181 using <a href="https://raw.githubusercontent.com/DOCGroup/MPC/master/docs/README">MPC</a> before building ACE, TAO or
3182 CIAO. We point out some suggestions below to get bootstrapped
3183 quickly.
3185 <ul>
3186 <li>You can clone all code easily from our git repository.
3187 <ul>
3188 <code>git clone https://github.com/DOCGroup/ACE_TAO.git</code>
3189 </ul>
3190 </p></li><li>Please make sure that you have <a href="http://www.perl.org/">
3191 perl</a> installed, preferably perl
3192 5.8 or higher. Users on Win32 based platforms are recommended to use
3193 <a href="https://www.activestate.com/products/perl"> Active
3194 State Perl</a> or <a href="http://strawberryperl.com">Strawberry Perl</a>.
3195 We use both perl versions without problems. We have
3196 ran into problems trying to use the cygwin version of perl on Win32
3197 based platforms. <p>
3198 </p></li>
3199 <a name="generate_using_mpc"></a>
3200 <li>To build ACE and associated tests, examples,
3201 and associated utility libraries with GNUmakefiles, you must
3202 generate GNUmakefiles with MPC:<p>
3203 <code> $ACE_ROOT/bin/mwc.pl -type gnuace ACE.mwc</code> </p>
3204 <p>On Windows, with Visual Studio 2015, you must generate solution and project files with MPC:<p>
3206 <code> $ACE_ROOT/bin/mwc.pl -type vc14 ACE.mwc </code> </p><p>
3208 On Windows, with Visual Studio 2017, you must generate solution and project files with MPC:<p>
3209 <code> $ACE_ROOT/bin/mwc.pl -type vs2017 ACE.mwc </code> </p>
3211 On Windows, with Visual Studio 2019, you must generate solution and project files with MPC:<p>
3212 <code> $ACE_ROOT/bin/mwc.pl -type vs2019 ACE.mwc </code> </p>
3213 </li><li>If you want to build TAO and its associated libraries
3214 please see <a href="TAO/TAO-INSTALL.html">TAO-INSTALL</a> for details.
3215 </li></ul>
3217 <hr><p>
3218 Back to the <a href="https://www.dre.vanderbilt.edu/~schmidt/ACE.html">ACE</a>
3219 home page.
3220 </p><p>
3221 <!--<EM>
3222 Visitor #
3223 from
3224 <EM><br> -->
3226 <!-- hhmts start -->
3228 <!-- hhmts end -->
3231 </p></body></html>