File: build_unix.html

package info (click to toggle)
db5.3 5.3.28%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 158,500 kB
  • sloc: ansic: 448,411; java: 111,824; tcl: 80,544; sh: 44,264; cs: 33,697; cpp: 21,604; perl: 14,557; xml: 10,799; makefile: 4,077; javascript: 1,998; yacc: 1,003; awk: 965; sql: 801; erlang: 342; python: 216; php: 24; asm: 14
file content (337 lines) | stat: -rw-r--r-- 12,531 bytes parent folder | download | duplicates (8)
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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>Chapter 7.  Building Berkeley DB for UNIX/POSIX</title>
    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" />
    <link rel="up" href="index.html" title="Berkeley DB Installation and Build Guide" />
    <link rel="prev" href="build_wince_faq.html" title="Windows Mobile FAQ" />
    <link rel="next" href="build_unix_conf.html" title="Configuring Berkeley DB" />
  </head>
  <body>
    <div xmlns="" class="navheader">
      <div class="libver">
        <p>Library Version 11.2.5.3</p>
      </div>
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Chapter 7. 
		Building Berkeley DB for UNIX/POSIX
        </th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="build_wince_faq.html">Prev</a> </td>
          <th width="60%" align="center"> </th>
          <td width="20%" align="right"> <a accesskey="n" href="build_unix_conf.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="chapter" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title"><a id="build_unix"></a>Chapter 7. 
		Building Berkeley DB for UNIX/POSIX
        </h2>
          </div>
        </div>
      </div>
      <div class="toc">
        <p>
          <b>Table of Contents</b>
        </p>
        <dl>
          <dt>
            <span class="sect1">
              <a href="build_unix.html#build_unix_intro">Building for UNIX/POSIX</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="build_unix.html#build_unix_sqlinter">Building the Berkeley DB SQL Interface</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="build_unix_conf.html">Configuring Berkeley DB</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_sql.html">Configuring the SQL Interface</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="build_unix_sql.html#config_sql">Changing Compile Options</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="build_unix_sql.html#idp500824">Enabling Extensions</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="build_unix_sql.html#build_unix_jdbc">Building the JDBC Driver</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="build_unix_sql.html#idp571856">Using the JDBC Driver</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="build_unix_sql.html#idp593744">Building the ODBC Driver</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="build_unix_sql.html#bfile">Building the BFILE extension</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="build_unix_small.html">Building a small memory footprint library</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_flags.html">Changing compile or load options</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="cross_compile_unix.html">Cross-Compiling on Unix</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_install.html">Installing Berkeley DB</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_shlib.html">Dynamic shared libraries</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_test.html">Running the test suite under UNIX</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="build_unix_test.html#build_unix_test_sql">Building SQL Test Suite on Unix</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="build_unix_notes.html">Architecture independent FAQ</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_aix.html">AIX</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_freebsd.html">FreeBSD</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_iphone.html">Apple iOS (iPhone OS)</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_irix.html">IRIX</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_linux.html">Linux</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_macosx.html">Mac OS X</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_qnx.html">QNX</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_sco.html">SCO</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_solaris.html">Solaris</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_unix_sunos.html">SunOS</a>
            </span>
          </dt>
        </dl>
      </div>
      <div class="sect1" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title" style="clear: both"><a id="build_unix_intro"></a>Building for UNIX/POSIX</h2>
            </div>
          </div>
        </div>
        <div class="toc">
          <dl>
            <dt>
              <span class="sect2">
                <a href="build_unix.html#build_unix_sqlinter">Building the Berkeley DB SQL Interface</a>
              </span>
            </dt>
          </dl>
        </div>
        <p>
        The Berkeley DB distribution builds up to four separate libraries:
        the base C API Berkeley DB library and the optional C++, Java, and
        Tcl API libraries.  For portability reasons, each library is
        standalone and contains the full Berkeley DB support necessary to
        build applications; that is, the C++ API Berkeley DB library does
        not require any other Berkeley DB libraries to build and run C++
        applications.
    </p>
        <p>
        Building for Linux, Apple iOS (known as iPhone OS previously), Mac OS X or the QNX Neutrino release is the same
        as building for a conventional UNIX platform.
    </p>
        <p>
        The Berkeley DB distribution uses the Free Software Foundation's
        <a class="ulink" href="http://www.gnu.org/software/autoconf/autoconf.html" target="_top">autoconf</a>
        and <a class="ulink" href="http://www.gnu.org/software/libtool/libtool.html" target="_top">libtool</a> 
        tools to build on UNIX platforms.  In general, the standard
        configuration and installation options for these tools apply to the
        Berkeley DB distribution.
    </p>
        <p>
        To perform a standard UNIX build of Berkeley DB, change to the 
        <span class="bold"><strong>build_unix</strong></span>
        directory and then enter the following two commands:
    </p>
        <pre class="programlisting">../dist/configure
make</pre>
        <p>
        This will build the Berkeley DB library.
    </p>
        <p>
        To install the Berkeley DB library, enter the following command:
    </p>
        <pre class="programlisting">make install</pre>
        <p>
        To rebuild Berkeley DB, enter:
    </p>
        <pre class="programlisting">make clean
make</pre>
        <p>
        If you change your mind about how Berkeley DB is to be configured, you must
        start from scratch by entering the following command:
    </p>
        <pre class="programlisting">make realclean
../dist/configure
make</pre>
        <p>
        To uninstall Berkeley DB, enter:
    </p>
        <pre class="programlisting">make uninstall</pre>
        <p>
        To build multiple UNIX versions of Berkeley DB in the same source
        tree, create a new directory at the same level as the build_unix
        directory, and then configure and build in that directory as
        described previously.
    </p>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="build_unix_sqlinter"></a>Building the Berkeley DB SQL Interface</h3>
              </div>
            </div>
          </div>
          <p>
            To perform a standard UNIX build of the Berkeley DB SQL interface, go
            to the <span class="bold"><strong>build_unix</strong></span> directory and then
            enter the following two commands: 
        </p>
          <pre class="programlisting">../dist/configure --enable-sql
make </pre>
          <p>
            This creates a library, <code class="literal">libdb_sql</code>, and a command
            line tool, <code class="literal">dbsql</code>. You can create and manipulate SQL
            databases using the <code class="literal">dbsql</code> shell. 
        </p>
          <p>
            You can optionally provide the <code class="literal">--enable-sql_compat</code>
            argument to the <code class="literal">configure</code> script.  In addition to
            creating <code class="literal">libdb_sql</code> and <code class="literal">dbsql</code> this
            causes a thin wrapper library called <code class="literal">libsqlite3</code> and
            a command line tool called <code class="literal">sqlite3</code> to be built. This
            library can be used as a drop-in replacement for SQLite. The
            <code class="literal">sqlite3</code> command line tool is identical to the
            <code class="literal">dbsql</code> executable but is named so that existing
            scripts for SQLite can easily work with Berkeley DB.
        </p>
          <pre class="programlisting">
../dist/configure --enable-sql_compat
make </pre>
          <p>
            There are several arguments you can specify when configuring the
            Berkeley DB SQL Interface. See 
            <a class="xref" href="build_unix_sql.html" title="Configuring the SQL Interface">Configuring the SQL Interface</a> 
            for more information.
        </p>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="build_wince_faq.html">Prev</a> </td>
          <td width="20%" align="center"> </td>
          <td width="40%" align="right"> <a accesskey="n" href="build_unix_conf.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">Windows Mobile FAQ </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> Configuring Berkeley DB</td>
        </tr>
      </table>
    </div>
  </body>
</html>