summaryrefslogtreecommitdiff
path: root/CIAO/CCF/Documentation/Build.html
blob: 94415303afe3ca35263f665ca57beccf67cc7d0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--

file      : Documentation/Build.html
author    : Boris Kolpackov <boris@dre.vanderbilt.edu>
cvs-id    : $Id$
-->

<html>

<head>

  <title>Building CORBA Compiler Framework (CCF) Libraries</title>

  <meta name="author" content="Boris Kolpackov"/>
  <meta name="keywords" content="build,compile,make,CCF,CORBA,compiler,framework,library"/>
  <meta name="description" content="Building CCF Libraries"/>
  <meta http-equiv="Content-Language" content="en"/>

  <style type="text/css">
  body {
    font-family      : sans-serif;
    color            : black;
    background       : white;

    max-width        : 40em;
    padding          : 2em 2em 2em 3em;
    margin           : 0 0 0 0;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family      : sans-serif;
    font-weight      : 500;
  }

  h1 { font-size         : 170%; }
  h2 { font-size         : 125%;
       text-decoration : underline
  }
  ul.toc li {
    padding          : .4em 0em 0em 0em;
  }

  ol.multiline li {
    padding-top      : 0.6em;
    padding-bottom   : 0.6em;
  }

  </style>

</head>

<body>
<h1>Building CORBA Compiler Framework (CCF) Libraries</h1>
<h2>Table of Contents</h2>
<ol>
<li><a href="#prereqs">Prerequisite Libraries</a></li>
<ul class="toc">
<li><a href="#debian">Debian GNU/Linux [i386.deb]</a></li>

<li><a href="#redhat">RedHat OS family [i386.rpm]</a></li>

<li><a href="#other_platforms">Other GNU/Linux or UNIX Distributions &amp; Windows</a>
<ul>
<li><a href="#cxx">C++</a></li>
<li><a href="#boost">Boost Libraries</a></li>
<li><a href="#utility">Utility Library</a></li>
</ul></li>

<!--li><a href="#windows">Windows</a>
<ul>
<li><a href="#windows_cxx">C++</a></li>
<li><a href="#windows_boost">Boost Libraries</a></li>
<li><a href="#windows_utility">Utility Library</a></li>
</ul></li -->
</ul>

<li><a href="#initial_setup">Configuring the Build Environment</a></li>
<li><a href="#building_ccf">Building CORBA Compiler Framework (CCF)</a></li>
</ol>

<hr />
<h1><a name="prereqs">Prerequisite Libraries</a></h1>

<!-- Debian -->

<h2><a name="debian">Debian GNU/Linux [i386.deb]</a></h2>

<p>You will need to install the following packages from the Debian package repository:

<ol>
<li><code>libboost-dev-1.30.2-2</code> or better</li>
<li><code>libboost-regex-dev-1.30.2-2</code> or better</li>
</ol>

<p>Additionally, you will need to download and and install

<ol>
<li><a href="ftp://kolpackov.net/pub/Utility/Utility-1.2/deb/libutility_1.2.2-1_i386.deb">
<code>libutility_1.2.2-1_i386.deb</code></a></li>
<li><a href="ftp://kolpackov.net/pub/Utility/Utility-1.2/deb/libutility-dev_1.2.2-1_i386.deb">
<code>libutility-dev_1.2.2-1_i386.deb</code></a></li>
</ol>

For example, if you downloaded them into <code>/tmp</code> then to
install you can issue these commands:</p>

<pre>$ cd /tmp
$ dpkg -i libutility*.deb
</pre>
</p>

<!-- RedHat -->

<h2><a name="redhat">RedHat OS family [i386.rpm]</a></h2>

<p>You will need to install the following RedHat packages:</p>

<ol>

<li><a href="http://www.dre.vanderbilt.edu/cidlc/prerequisites/rpm/boost-devel-1.30.2-2.i386.rpm">
<code>boost-devel-1.30.2-2.i386.rpm</code></a></li>

<li><a href="ftp://kolpackov.net/pub/Utility/Utility-1.2/rpm/Utility-1.2.2-3.i386.rpm">
<code>Utility-1.2.2-3.i386.rpm</code></a></li>
</ol>

<p>For example, if you downloaded them into <code>/usr/src/redhat/RPMS/i386
</code> then to install you can issue these commands:</p>

<pre>$ cd /usr/src/redhat/RPMS/i386
$ rpm -Uhv boost-devel-1.30.2-2.i386.rpm
$ rpm -Uhv Utility-1.2.2-3.i386.rpm
</pre>
</p>

<!-- Linux -->

<h2><a name="other_platforms">Other GNU/Linux or UNIX Distributions &amp; Windows</a></h2>

<!--

<h2><a name="linux_make">Make</a></h2>
<p>Currently in order to build CCF Libraries you will need
<a href="http://savannah.gnu.org/projects/make/">GNU make</a> 3.80 with the
following bug fixes:

<ol>
<li>
<a href="http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=1516">
eval inside condition</a></li>

<li>
<a href="http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=1517">
eval memory exhaustion</a></li>
</ol>

Your system distributor should have the recent version of make with those
fixes applied.
</p>

<p>If you are unsure whether you have those bugfixes or not then you can
just try building CCF and if you see some strange make-related errors then
you will need to upgrade.</p>

-->

<h3><a name="cxx">C++</a></h3>
<p>On the Lunix/UNIX platforms, you can use any standard-conformant C++ compiler.
We recommend you use the lastest stable release of the <a href="http://gcc.gnu.org">GNU C++</a>

compiler.</p>

<p>On the Windows platform, VC++ 7.1 or better is required to build CCF. We do not
support VC++ 6 or VC++ 7.0.</p>

<h3><a name="boost">Boost Libraries</a></h3>
<p>In order to build CCF you will need the following libraries from the
<a href="http://www.boost.org">Boost distribution</a>:</p>

<ol>
<li>regex</li>
<li>filesystem</li>
<li>spirit parser framework</li>
</ol>

<p>There are two commonly used ways to obtain those libraries: you can get
precompiled binaries from your system distributor or download source code and
compile it yourself. The first approach is recommended where available
and if you got precompiled binaries then you can skip the rest of this
section.</p>

</p>If you choose to compile Boost Libraries yourself please refer to the
<a href="http://www.boost.org/more/getting_started.html">Boost Building
Instructions</a>. Please remember the install locations of the boost libraries
because they will be needed to properly configure your environment for building
CCF.<p>

<!--p>After you have successfully compiled necessary libraries in the boost
distribution you need to do one more thing. Inside the boost distribution
directory (e.g. <code>boost-1.30.2</code>) create a directory with the name
<code>lib</code> and copy (or soft link) <code>libboost_filesystem.a</code>
and <code>libboost_regex.a</code> into it.</p-->

<h3><a name="utility">Utility Library</a></h3>

<p>Another prerequisite for CCF is the Utility Library. You don't need
to build anything in this library. The Utility library is available in
the following two different forms for convinience:</p>

<ol>
<li>A <a href="http://www.dre.vanderbilt.edu/cidlc/prerequisites/Utility-1.2.2.tar.bz2">bz2 package</a> for unix based platforms including Unix.</li>
<li>A <a href="http://www.dre.vanderbilt.edu/cidlc/prerequisites/Utility-1.2.2.tar.zip">zip package</a> for Win32 based platforms. </li>
</ol>

<p>Just unpack it to some convenient place and remember its location because it will be need
to properly configure the build environment for CCF.</p>

<!-- Windows -->

<!--h2><a name="windows">Windows</a></h2>

<h3><a name="windows_cxx">C++</a></h3>

<h3><a name="windows_boost">Boost Libraries</a></h3>
<p>In order to build CCF you will need the following libraries from
the <a href="http://www.boost.org">Boost distribution</a>:

<ol>
<li>regex</li>
<li>filesystem</li>
<li>spirit parser framework</li>
</ol>

<p>Below is the list of step-by-step instructions for building boost. As
an example, I assume that the installation directory is <code>D:\lib</code>.
</p>

<ol class="multiline">

<li>Download boost source distribution version <code>1.30.2</code> (<code>boost-1.30.2.zip</code>)
from the <a href="http://sourceforge.net/project/showfiles.php?group_id=7586">Boost web site</a>.
After downloading unzip the file in <code>D:\lib</code> so that you get
<code>D:\lib\boost-1.30.2</code>. Note that boost version <code>1.31.0</code>

will not work.</li>

<li>Download the latest pre-built
<a href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941">
<code>boost-jam</code></a>. At the time of writing, the latest version was
<code>3.1.7</code> thus the file you download would be
<code>bjam-3.1.7-ntx86.zip</code>. Unzip this file in <code>D:\lib</code> so
that you get <code>D:\lib\bin.ntx86\bjam.exe</code>.</li>

<li>Open a command prompt and <code>cd D:\lib\boost-1.30.2</code>. Then
issue the following command.

<pre>D:\lib\bin.ntx86\bjam.exe "-sTOOLS=vc7.1"
</pre>
</li>

<li>Create a directory called <code>lib</code> in
<code>D:\lib\boost-1.30.2</code>.</li>

<li>Copy <code>D:\lib\boost-1.30.2\libs\filesystem\build\bin\libboost_filesystem.lib\vc7.1\debug\runtime-link-dynamic\libboost_filesystem.lib</code>
to <code>D:\lib\boost-1.30.2\lib\libboost_filesystem_debug.lib</code>.<br>
(Don't ask me who came up with this directory structure ;-)
</li>

<li>Copy <code>D:\lib\boost-1.30.2\libs\regex\build\bin\libboost_regex.lib\vc7.1\debug\runtime-link-dynamic\libboost_regex.lib</code>
to <code>D:\lib\boost-1.30.2\lib\libboost_regex_debug.lib</code>.
</li>

<li>Add <code>D:\lib\boost-1.30.2</code> to your VC7.1 include directory
search list (Go to Tools -> Options -> Projects -> VC++ Directories -> Include Files).
Add <code>D:\lib\boost-1.30.2\lib</code> to your VC7.1 library directory
search list.</li>

</ol>

<p>Please refer to the
<a href="http://www.boost.org/more/getting_started.html">Boost Building
Instructions</a> if you have any questions.<p>

<h3><a name="windows_utility">Utility Library</a></h3>

<p>Another prerequisite for CCF is
<a href="http://www.dre.vanderbilt.edu/cidlc/prerequisites/Utility-1.2.2.tar.bz2">Utility
Library</a>. You don't need to build anything in this library. Just unpack
it to some convenient place and add it to your VC7.1 include directory search
list. For example if you unpacked <code>Utility-1.2.2.tar.bz2</code> in
<code>D:\lib</code> then add <code>D:\lib\Utility-1.2.2</code> to your
search list.</p -->

<hr />

<!-- Configuring the Build Environment -->

<h1><a name="initial_setup">Configuring the Build Environment</a></h1>

<p>Before you can start building CCF you need to specify the location
of Boost Libraries and Utility Library. There are two ways you can do
this. The first way is to specify the environment variables

<code>BOOST_ROOT, BOOST_INCLUDE, BOOST_LIB, BOOST_VERSION, BOOST_CFG</code>
and <code>UTILITY_ROOT</code>.

<p>To configure <code>BOOST_ROOT</code> and <code>UTILITY_ROOT</code>,

set both enviroment variables to the root directory for the respective
libraries as follows:</p>
<ul>
<li>On Linux/UNIX
<pre>
%> export BOOST_ROOT=&lt;path_to_boost&gt;
%> export UTILITY_ROOT=&lt;path_to_utility&gt;
</pre>
</li>
<li>On Windows
<pre>
%> set BOOST_ROOT=&lt;path_to_boost&gt;
%> set UTILITY_ROOT=&lt;path_to_utility&gt;
</pre>
</li>
</ul>

<p>If <code>BOOST_INCLUDE</code> and <code>BOOST_LIB</code> are not initialized,

then their values are derived from <code>BOOST_ROOT</code> as follows:<p>

<pre>
BOOST_LIB     := $(BOOST_ROOT)/lib
BOOST_INCLUDE := $(BOOST_ROOT)
</pre>

<p><code>BOOST_VERSION</code> and <code>BOOST_CFG</code> are two environment variables that
depend on the version and configuration of Boost that you are using. <code>BOOST_VERSION</code>
is initialized as follows:</p>
<ol>
<li>Look in <code>$BOOST_ROOT/include/boost</code> directory</li>
<li>If there is another boost directory, e.g. <code>boost-1_32</code> for building boost-1.32, then this is your version
  <ul>
    <li>On Linux/UNIX:

      <pre><code>%> export BOOST_VERSION=boost-1_32</code></pre></li>
    <li>On Windows:

      <pre><code>%> set BOOST_VERSION=boost-1_32</code></pre></li>
  </ul>
</li>
</ol>
<p>
<code>BOOST_CFG</code> depends on which configuration of the boost libraries you want use for CCF. If
you look in <code>$BOOST_ROOT/lib</code>, you will notice all the Boost libraries. Each library has
the compiler and threading support, e.g. <code>-vc71-mt</code> for VC++ 7.1 and multi-threaded, as part

of the filename. If this is not the case for your libraries, then you can

<a href="#building_ccf">skip</a> this section and continue at

<a href="#building_ccf">Building CORBA Compiler Framework (CCF)</a>. This part of

the filename is known as the <code>BOOST_CFG</code> and needs to be specified. For example, if you are

using VC++ 7.1 and want to use the multi-threaded version of the libraries for CCF, your would do the
following:
<blockquote><code>%> set BOOST_CFG=-vc71-mt</code></blockquote>
This can be done similarly on the Linux/UNIX platforms depending on your compiler version and the

Boost configuration you want to use.</p>

<p>Alternatively, you can specify all values for <code>BOOST_*</code> and
<code>UTILITY_*</code> in <code>$CIAO_ROOT/CCF/Config.rules</code></p>

<!-- Building CORBA Compiler Framework (CCF) -->

<hr />
<h1><a name="building_ccf">Building CORBA Compiler Framework (CCF)</a></h1>

Now that you have built and installed the required libraries, you are now ready
to build the CCF libraries. If there are any makefiles or project solutions
in the CCF directory we recommend that you disgard those and regenerate
all the projects files using MPC. To build all project files and CCF, please use the
following steps:
<ol>
<li><code>%> cd $CIAO_ROOT/CCF/CCF</code></li>
<li><code>%> $ACE_ROOT/bin/mwc.pl -type &lt;project-type&gt; -static -features cidl=1, exceptions=1, boost=1</code></li>
</ol>
On Linux/UNIX, if you are building with a make utility, e.g., gmake, use the following command
to build CCF:

<pre>%> gmake cidl=1 exceptions=1 boost=1</pre>
<p>If you are building on Windows, just open the generated solution file.</p>

<p><b>Note:</b> If you are building CCF on a Windows platform, use <code>%ACE_ROOT%\bin\mwc.pl</code> instead

<code>of $ACE_ROOT/bin/mwc.pl</code>. Also, for a list of project types and other command-line options
supported by MPC, type <code>$ACE_ROOT/bin/mwc.pl --help</code>.</p>
</body>
</html>