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