summaryrefslogtreecommitdiff
path: root/doc/html/build/doing_build.html
blob: 26c6d09e5991ec77321100a5d76f0bb4d8114db6 (plain) (blame)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Doing the build &mdash; MIT Kerberos Documentation</title>
    
    <link rel="stylesheet" href="../_static/agogo.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/kerb.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.16',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="MIT Kerberos Documentation" href="../index.html" />
    <link rel="up" title="Building Kerberos V5" href="index.html" />
    <link rel="next" title="Options to configure" href="options2configure.html" />
    <link rel="prev" title="Organization of the source directory" href="directory_org.html" /> 
  </head>
  <body>
    <div class="header-wrapper">
        <div class="header">
            
            
            <h1><a href="../index.html">MIT Kerberos Documentation</a></h1>
            
            <div class="rel">
                
        <a href="../index.html" title="Full Table of Contents"
            accesskey="C">Contents</a> |
        <a href="directory_org.html" title="Organization of the source directory"
            accesskey="P">previous</a> |
        <a href="options2configure.html" title="Options to configure"
            accesskey="N">next</a> |
        <a href="../genindex.html" title="General Index"
            accesskey="I">index</a> |
        <a href="../search.html" title="Enter search criteria"
            accesskey="S">Search</a> |
    <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__Doing the build">feedback</a>
            </div>
        </div>
    </div>

    <div class="content-wrapper">
      <div class="content">
        <div class="document">
            
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="doing-the-build">
<h1>Doing the build<a class="headerlink" href="#doing-the-build" title="Permalink to this headline"></a></h1>
<div class="section" id="building-within-a-single-tree">
<span id="do-build"></span><h2>Building within a single tree<a class="headerlink" href="#building-within-a-single-tree" title="Permalink to this headline"></a></h2>
<p>If you only need to build Kerberos for one platform, using a single
directory tree which contains both the source files and the object
files is the simplest.  However, if you need to maintain Kerberos for
a large number of platforms, you will probably want to use separate
build trees for each platform.  We recommend that you look at OS
Incompatibilities, for notes that we have on particular operating
systems.</p>
<p>If you don&#8217;t want separate build trees for each architecture, then use
the following abbreviated procedure:</p>
<div class="highlight-python"><div class="highlight"><pre>cd /u1/krb5-VERSION/src
./configure
make
</pre></div>
</div>
<p>That&#8217;s it!</p>
</div>
<div class="section" id="building-with-separate-build-directories">
<h2>Building with separate build directories<a class="headerlink" href="#building-with-separate-build-directories" title="Permalink to this headline"></a></h2>
<p>If you wish to keep separate build directories for each platform, you
can do so using the following procedure.  (Note, this requires that
your make program support VPATH.  GNU&#8217;s make will provide this
functionality, for example.)  If your make program does not support
this, see the next section.</p>
<p>For example, if you wish to store the binaries in <tt class="docutils literal"><span class="pre">tmpbuild</span></tt> build
directory you might use the following procedure:</p>
<div class="highlight-python"><div class="highlight"><pre>mkdir /u1/tmpbuild
cd /u1/tmpbuild
/u1/krb5-VERSION/src/configure
make
</pre></div>
</div>
</div>
<div class="section" id="building-using-lndir">
<h2>Building using lndir<a class="headerlink" href="#building-using-lndir" title="Permalink to this headline"></a></h2>
<p>If you wish to keep separate build directories for each platform, and
you do not have access to a make program which supports VPATH, all is
not lost.  You can use the lndir program to create symbolic link trees
in your build directory.</p>
<p>For example, if you wish to create a build directory for solaris
binaries you might use the following procedure:</p>
<div class="highlight-python"><div class="highlight"><pre>mkdir /u1/krb5-VERSION/solaris
cd /u1/krb5-VERSION/solaris
/u1/krb5-VERSION/src/util/lndir `pwd`/../src
./configure
make
</pre></div>
</div>
<p>You must give an absolute pathname to lndir because it has a bug that
makes it fail for relative pathnames.  Note that this version differs
from the latest version as distributed and installed by the
XConsortium with X11R6.  Either version should be acceptable.</p>
</div>
<div class="section" id="installing-the-binaries">
<h2>Installing the binaries<a class="headerlink" href="#installing-the-binaries" title="Permalink to this headline"></a></h2>
<p>Once you have built Kerberos, you should install the binaries. You can
do this by running:</p>
<div class="highlight-python"><div class="highlight"><pre>make install
</pre></div>
</div>
<p>If you want to install the binaries into a destination directory that
is not their final destination, which may be convenient if you want to
build a binary distribution to be deployed on multiple hosts, you may
use:</p>
<div class="highlight-python"><div class="highlight"><pre>make install DESTDIR=/path/to/destdir
</pre></div>
</div>
<p>This will install the binaries under <em>DESTDIR/PREFIX</em>, e.g., the user
programs will install into <em>DESTDIR/PREFIX/bin</em>, the libraries into
<em>DESTDIR/PREFIX/lib</em>, etc.</p>
<p>Some implementations of make allow multiple commands to be run in
parallel, for faster builds.  We test our Makefiles in parallel builds
with GNU make only; they may not be compatible with other parallel
build implementations.</p>
</div>
<div class="section" id="testing-the-build">
<h2>Testing the build<a class="headerlink" href="#testing-the-build" title="Permalink to this headline"></a></h2>
<p>The Kerberos V5 distribution comes with built-in regression tests.  To
run them, simply type the following command while in the top-level
build directory (i.e., the directory where you sent typed make to
start building Kerberos; see <a class="reference internal" href="#do-build"><em>Building within a single tree</em></a>):</p>
<div class="highlight-python"><div class="highlight"><pre>make check
</pre></div>
</div>
<p>However, there are several prerequisites that must be satisfied first:</p>
<ul class="simple">
<li>Configure and build Kerberos with Tcl support. Tcl is used to drive
the test suite.  This often means passing <strong>-</strong><strong>-with-tcl</strong> to
configure to tell it the location of the Tcl configuration
script. (See <a class="reference internal" href="options2configure.html#options2configure"><em>Options to configure</em></a>.)</li>
<li>In addition to Tcl, DejaGnu must be available on the system for some
of the tests to run.  The test suite will still run the other tests
if DejaGnu is not present, but the test coverage will be reduced
accordingly.</li>
<li>On some operating systems, you have to run <tt class="docutils literal"><span class="pre">make</span> <span class="pre">install</span></tt> before
running <tt class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></tt>, or the test suite will pick up installed
versions of Kerberos libraries rather than the newly built ones.
You can install into a prefix that isn&#8217;t in the system library
search path, though. Alternatively, you can configure with
<strong>-</strong><strong>-disable-rpath</strong>, which renders the build tree less suitable for
installation, but allows testing without interference from
previously installed libraries.</li>
</ul>
<p>There are additional regression tests available, which are not run
by <tt class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></tt>.  These tests require manual setup and teardown of
support infrastructure which is not easily automated, or require
excessive resources for ordinary use.  The procedure for running
the manual tests is documented at
<a class="reference external" href="http://k5wiki.kerberos.org/wiki/Manual_Testing">http://k5wiki.kerberos.org/wiki/Manual_Testing</a>.</p>
</div>
<div class="section" id="cleaning-up-the-build">
<h2>Cleaning up the build<a class="headerlink" href="#cleaning-up-the-build" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Use <tt class="docutils literal"><span class="pre">make</span> <span class="pre">clean</span></tt> to remove all files generated by running make
command.</li>
<li>Use <tt class="docutils literal"><span class="pre">make</span> <span class="pre">distclean</span></tt> to remove all files generated by running
./configure script.  After running <tt class="docutils literal"><span class="pre">make</span> <span class="pre">distclean</span></tt> your source
tree (ideally) should look like the raw (just un-tarred) source
tree.</li>
</ul>
</div>
<div class="section" id="using-autoconf">
<h2>Using autoconf<a class="headerlink" href="#using-autoconf" title="Permalink to this headline"></a></h2>
<p>(If you are not a developer, you can ignore this section.)</p>
<p>In the Kerberos V5 source directory, there is a configure script which
automatically determines the compilation environment and creates the
proper Makefiles for a particular platform.  This configure script is
generated using autoconf, which you should already have installed if
you will be making changes to <tt class="docutils literal"><span class="pre">src/configure.in</span></tt>.</p>
<p>Normal users will not need to worry about running autoconf; the
distribution comes with the configure script already prebuilt.</p>
<p>The autoconf package comes with a script called <tt class="docutils literal"><span class="pre">autoreconf</span></tt> that
will automatically run <tt class="docutils literal"><span class="pre">autoconf</span></tt> and <tt class="docutils literal"><span class="pre">autoheader</span></tt> as needed.  You
should run <tt class="docutils literal"><span class="pre">autoreconf</span></tt> from the top source directory, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">u1</span><span class="o">/</span><span class="n">krb5</span><span class="o">-</span><span class="n">VERSION</span><span class="o">/</span><span class="n">src</span>
<span class="n">autoreconf</span> <span class="o">--</span><span class="n">verbose</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
        </div>
        <div class="sidebar">
    <h2>On this page</h2>
    <ul>
<li><a class="reference internal" href="#">Doing the build</a><ul>
<li><a class="reference internal" href="#building-within-a-single-tree">Building within a single tree</a></li>
<li><a class="reference internal" href="#building-with-separate-build-directories">Building with separate build directories</a></li>
<li><a class="reference internal" href="#building-using-lndir">Building using lndir</a></li>
<li><a class="reference internal" href="#installing-the-binaries">Installing the binaries</a></li>
<li><a class="reference internal" href="#testing-the-build">Testing the build</a></li>
<li><a class="reference internal" href="#cleaning-up-the-build">Cleaning up the build</a></li>
<li><a class="reference internal" href="#using-autoconf">Using autoconf</a></li>
</ul>
</li>
</ul>

    <br/>
    <h2>Table of contents</h2>
    <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">For users</a></li>
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">For administrators</a></li>
<li class="toctree-l1"><a class="reference internal" href="../appdev/index.html">For application developers</a></li>
<li class="toctree-l1"><a class="reference internal" href="../plugindev/index.html">For plugin module developers</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Building Kerberos V5</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="directory_org.html">Organization of the source directory</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="">Doing the build</a><ul class="simple">
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="options2configure.html">Options to <em>configure</em></a></li>
<li class="toctree-l2"><a class="reference internal" href="osconf.html">osconf.hin</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../basic/index.html">Kerberos V5 concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../formats/index.html">Protocols and file formats</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mitK5features.html">MIT Kerberos features</a></li>
<li class="toctree-l1"><a class="reference internal" href="../build_this.html">How to build this documentation from the source</a></li>
<li class="toctree-l1"><a class="reference internal" href="../about.html">Contributing to the MIT Kerberos Documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../resources.html">Resources</a></li>
</ul>

    <br/>
    <h4><a href="../index.html">Full Table of Contents</a></h4>
    <h4>Search</h4>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
        </div>
        <div class="clearer"></div>
      </div>
    </div>

    <div class="footer-wrapper">
        <div class="footer" >
            <div class="right" ><i>Release: 1.16</i><br />
                &copy; <a href="../copyright.html">Copyright</a> 1985-2017, MIT.
            </div>
            <div class="left">
                
        <a href="../index.html" title="Full Table of Contents"
            >Contents</a> |
        <a href="directory_org.html" title="Organization of the source directory"
            >previous</a> |
        <a href="options2configure.html" title="Options to configure"
            >next</a> |
        <a href="../genindex.html" title="General Index"
            >index</a> |
        <a href="../search.html" title="Enter search criteria"
            >Search</a> |
    <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__Doing the build">feedback</a>
            </div>
        </div>
    </div>

  </body>
</html>