summaryrefslogtreecommitdiff
path: root/docs/installation/build_unix_notes.html
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /docs/installation/build_unix_notes.html
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'docs/installation/build_unix_notes.html')
-rw-r--r--docs/installation/build_unix_notes.html294
1 files changed, 191 insertions, 103 deletions
diff --git a/docs/installation/build_unix_notes.html b/docs/installation/build_unix_notes.html
index cedab171..8ee7bebc 100644
--- a/docs/installation/build_unix_notes.html
+++ b/docs/installation/build_unix_notes.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -22,9 +22,8 @@
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="build_unix_test.html">Prev</a> </td>
- <th width="60%" align="center">Chapter 7. 
- Building Berkeley DB for UNIX/POSIX
- </th>
+ <th width="60%" align="center">Chapter 7.  Building Berkeley DB for UNIX/POSIX
+ </th>
<td width="20%" align="right"> <a accesskey="n" href="build_unix_aix.html">Next</a></td>
</tr>
</table>
@@ -42,133 +41,212 @@
<ol type="1">
<li>
<span class="bold">
- <strong>I have gcc installed, but configure fails to find it.</strong>
+ <strong>I have gcc installed, but configure
+ fails to find it.</strong>
</span>
- <p>Berkeley DB defaults to using the native C compiler if none is specified.
-That is usually "cc", but some platforms require a different compiler
-to build multithreaded code. To configure Berkeley DB to build with gcc, run
-configure as follows:</p>
+ <p>
+ Berkeley DB defaults to using the native C compiler
+ if none is specified. That is usually "cc", but some
+ platforms require a different compiler to build
+ multithreaded code. To configure Berkeley DB to build
+ with gcc, run configure as follows:
+ </p>
<pre class="programlisting">env CC=gcc ../dist/configure ...</pre>
</li>
<li>
<span class="bold">
- <strong>When compiling with gcc, I get unreferenced symbols; for example
-the following:
-<pre class="programlisting">symbol __muldi3: referenced symbol not found
+ <strong>When compiling with gcc, I get
+ unreferenced symbols; for example the following:
+ <pre class="programlisting">symbol __muldi3: referenced symbol not found
symbol __cmpdi2: referenced symbol not found</pre></strong>
</span>
- <p>Berkeley DB often uses 64-bit integral types on systems supporting large
-files, and gcc performs operations on those types by calling library
-functions. These unreferenced symbol errors are usually caused by
-linking an application by calling "ld" rather than by calling "gcc":
-gcc will link in libgcc.a and will resolve the symbols. If that does
-not help, another possible workaround is to reconfigure Berkeley DB using the
-<a class="link" href="build_unix_conf.html#build_unix_conf.--disable-largefile">--disable-largefile</a> configuration option and then rebuild.</p>
+ <p>
+ Berkeley DB often uses 64-bit integral types on
+ systems supporting large files, and gcc performs
+ operations on those types by calling library
+ functions. These unreferenced symbol errors are
+ usually caused by linking an application by calling
+ "ld" rather than by calling "gcc": gcc will link in
+ libgcc.a and will resolve the symbols. If that does
+ not help, another possible workaround is to
+ reconfigure Berkeley DB using the <a class="link" href="build_unix_conf.html#build_unix_conf.--disable-largefile">--disable-largefile</a>
+ configuration option and then rebuild.
+ </p>
</li>
<li>
<span class="bold">
- <strong>My C++ program traps during a failure in a DB call on my
-gcc-based system.</strong>
+ <strong>My C++ program traps during a
+ failure in a DB call on my gcc-based
+ system.</strong>
</span>
- <p>We believe there are some severe bugs in the implementation of
-exceptions for some gcc compilers. Exceptions require some interaction
-between compiler, assembler, and runtime libraries. We're not sure
-exactly what is at fault, but one failing combination is gcc 2.7.2.3
-running on SuSE Linux 6.0. The problem on this system can be seen with
-a rather simple test case of an exception thrown from a shared library
-and caught in the main program.</p>
- <p>A variation of this problem seems to occur on AIX, although we believe it
-does not necessarily involve shared libraries on that platform.</p>
- <p>If you see a trap that occurs when an exception might be thrown by the
-Berkeley DB runtime, we suggest that you use static libraries instead of
-shared libraries. See the documentation for configuration. If this
-doesn't work and you have a choice of compilers, try using a more recent
-gcc- or a non-gcc based compiler to build Berkeley DB.</p>
- <p>Finally, you can disable the use of exceptions in the C++ runtime for
-Berkeley DB by using the <a href="../api_reference/CXX/envcreate.html#env_DB_CXX_NO_EXCEPTIONS" class="olink">DB_CXX_NO_EXCEPTIONS</a> flag with the <a href="../api_reference/CXX/env.html" class="olink">DbEnv</a> or <a href="../api_reference/CXX/db.html" class="olink">Db</a> constructors. When this flag is on, all C++ methods fail by returning an error code rather than throwing an exception.</p>
+ <p>
+ We believe there are some severe bugs in the
+ implementation of exceptions for some gcc compilers.
+ Exceptions require some interaction between compiler,
+ assembler, and runtime libraries. We're not sure
+ exactly what is at fault, but one failing combination
+ is gcc 2.7.2.3 running on SuSE Linux 6.0. The problem
+ on this system can be seen with a rather simple test
+ case of an exception thrown from a shared library and
+ caught in the main program.
+ </p>
+ <p>
+ A variation of this problem seems to occur on AIX,
+ although we believe it does not necessarily involve
+ shared libraries on that platform.
+ </p>
+ <p>
+ If you see a trap that occurs when an exception
+ might be thrown by the Berkeley DB runtime, we suggest
+ that you use static libraries instead of shared
+ libraries. See the documentation for configuration. If
+ this doesn't work and you have a choice of compilers,
+ try using a more recent gcc- or a non-gcc based
+ compiler to build Berkeley DB.
+ </p>
+ <p>
+ Finally, you can disable the use of exceptions in
+ the C++ runtime for Berkeley DB by using the
+ <a href="../api_reference/CXX/envcreate.html#env_DB_CXX_NO_EXCEPTIONS" class="olink">DB_CXX_NO_EXCEPTIONS</a> flag with the <a href="../api_reference/CXX/env.html" class="olink">DbEnv</a>
+ or <a href="../api_reference/CXX/db.html" class="olink">Db</a> constructors. When this flag is on,
+ all C++ methods fail by returning an error code rather
+ than throwing an exception.
+ </p>
</li>
<li>
<span class="bold">
- <strong>I get unexpected results and database corruption when running threaded programs.</strong>
+ <strong>I get unexpected results and
+ database corruption when running threaded
+ programs.</strong>
</span>
<p>
- <span class="bold">
- <strong>I get error messages that mutex (for example, pthread_mutex_XXX or mutex_XXX) functions are undefined when linking applications with Berkeley DB.</strong>
- </span>
+ <span class="bold"><strong>I get error messages that mutex
+ (for example, pthread_mutex_XXX or mutex_XXX)
+ functions are undefined when linking applications
+ with Berkeley DB.</strong></span>
+ </p>
+ <p>
+ On some architectures, the Berkeley DB library uses
+ the ISO POSIX standard pthreads and UNIX International
+ (UI) threads interfaces for underlying mutex support;
+ Solaris is an example. You can specify compilers or
+ compiler flags, or link with the appropriate thread
+ library when loading your application to resolve the
+ undefined references:
</p>
- <p>On some architectures, the Berkeley DB library uses the ISO POSIX standard pthreads and UNIX International (UI) threads interfaces for underlying mutex support; Solaris is an example. You can specify compilers or compiler flags, or link with the appropriate thread library when loading your application to resolve the undefined references:</p>
<pre class="programlisting">cc ... -lpthread ...
cc ... -lthread ...
xlc_r ...
cc ... -mt ...</pre>
- <p>See the appropriate architecture-specific Reference Guide pages for more
-information.</p>
- <p>On systems where more than one type of mutex is available, it may be
-necessary for applications to use the same threads package from which
-Berkeley DB draws its mutexes. For example, if Berkeley DB was built to use the
-POSIX pthreads mutex calls for mutex support, the application may need
-to be written to use the POSIX pthreads interfaces for its threading
-model. This is only conjecture at this time, and although we know of
-no systems that actually have this requirement, it's not unlikely that
-some exist.</p>
- <p>In a few cases, Berkeley DB can be configured to use specific underlying mutex
-interfaces. You can use the <a class="link" href="build_unix_conf.html#build_unix_conf.--enable-posixmutexes">--enable-posixmutexes</a> and
-<a class="link" href="build_unix_conf.html#build_unix_conf.--enable-uimutexes">--enable-uimutexes</a> configuration options to specify the POSIX and Unix
-International (UI) threads packages. This should not, however, be
-necessary in most cases.</p>
- <p>In some cases, it is vitally important to make sure that you load the
-correct library. For example, on Solaris systems, there are POSIX
-pthread interfaces in the C library, so applications can link Berkeley DB
-using only C library and not see any undefined symbols. However, the
-C library POSIX pthread mutex support is insufficient for Berkeley DB, and
-Berkeley DB cannot detect that fact. Similar errors can arise when
-applications (for example, tclsh) use dlopen to dynamically load Berkeley DB
-as a library.</p>
- <p>If you are seeing problems in this area after you confirm that you're
-linking with the correct libraries, there are two other things you can
-try. First, if your platform supports interlibrary dependencies, we
-recommend that you change the Berkeley DB Makefile to specify the appropriate
-threads library when creating the Berkeley DB shared library, as an
-interlibrary dependency. Second, if your application is using dlopen
-to dynamically load Berkeley DB, specify the appropriate thread library on
-the link line when you load the application itself.</p>
+ <p>
+ See the appropriate architecture-specific Reference
+ Guide pages for more information.
+ </p>
+ <p>
+ On systems where more than one type of mutex is
+ available, it may be necessary for applications to use
+ the same threads package from which Berkeley DB draws
+ its mutexes. For example, if Berkeley DB was built to
+ use the POSIX pthreads mutex calls for mutex support,
+ the application may need to be written to use the
+ POSIX pthreads interfaces for its threading model.
+ This is only conjecture at this time, and although we
+ know of no systems that actually have this
+ requirement, it's not unlikely that some exist.
+ </p>
+ <p>
+ In a few cases, Berkeley DB can be configured to
+ use specific underlying mutex interfaces. You can use
+ the <a class="link" href="build_unix_conf.html#build_unix_conf.--enable-posixmutexes">
+ --enable-posixmutexes</a> and <a class="link" href="build_unix_conf.html#build_unix_conf.--enable-uimutexes">--enable-uimutexes</a>
+ configuration options to specify the POSIX and Unix International (UI)
+ threads packages. This should not, however, be
+ necessary in most cases.
+ </p>
+ <p>
+ In some cases, it is vitally important to make sure
+ that you load the correct library. For example, on
+ Solaris systems, there are POSIX pthread interfaces in
+ the C library, so applications can link Berkeley DB
+ using only C library and not see any undefined
+ symbols. However, the C library POSIX pthread mutex
+ support is insufficient for Berkeley DB, and Berkeley
+ DB cannot detect that fact. Similar errors can arise
+ when applications (for example, tclsh) use dlopen to
+ dynamically load Berkeley DB as a library.
+ </p>
+ <p>
+ If you are seeing problems in this area after you
+ confirm that you're linking with the correct
+ libraries, there are two other things you can try.
+ First, if your platform supports interlibrary
+ dependencies, we recommend that you change the
+ Berkeley DB Makefile to specify the appropriate
+ threads library when creating the Berkeley DB shared
+ library, as an interlibrary dependency. Second, if
+ your application is using dlopen to dynamically load
+ Berkeley DB, specify the appropriate thread library on
+ the link line when you load the application itself.
+ </p>
</li>
<li>
<span class="bold">
- <strong>I get core dumps when running programs that fork children.</strong>
+ <strong>I get core dumps when running
+ programs that fork children.</strong>
</span>
- <p>Berkeley DB handles should not be shared across process forks, each forked
-child should acquire its own Berkeley DB handles.</p>
+ <p>
+ Berkeley DB handles should not be shared across
+ process forks, each forked child should acquire its
+ own Berkeley DB handles.
+ </p>
</li>
<li>
<span class="bold">
- <strong>I get reports of uninitialized memory reads and writes when
-running software analysis tools (for example, Rational Software Corp.'s
-Purify tool).</strong>
+ <strong>I get reports of uninitialized
+ memory reads and writes when running software analysis
+ tools (for example, Rational Software Corp.'s Purify
+ tool).</strong>
</span>
- <p>For performance reasons, Berkeley DB does not write the unused portions of
-database pages or fill in unused structure fields. To turn off these
-errors when running software analysis tools, build with the
-<a class="link" href="build_unix_conf.html#build_unix_conf.--enable-umrw">--enable-umrw</a>
-configuration option.</p>
+ <p>
+ For performance reasons, Berkeley DB does not write
+ the unused portions of database pages or fill in
+ unused structure fields. To turn off these errors when
+ running software analysis tools, build with the <a class="link" href="build_unix_conf.html#build_unix_conf.--enable-umrw">--enable-umrw</a>
+ configuration option.
+ </p>
</li>
<li>
<span class="bold">
- <strong>Berkeley DB programs or the test suite fail unexpectedly.</strong>
+ <strong>Berkeley DB programs or the test
+ suite fail unexpectedly.</strong>
</span>
- <p>The Berkeley DB architecture does not support placing the shared memory
-regions on remote filesystems -- for example, the Network File System
-(NFS) or the Andrew File System (AFS). For this reason, the shared
-memory regions (normally located in the database home directory) must
-reside on a local filesystem. See <a href="../programmer_reference/env_region.html" class="olink">Shared memory region</a> for more information.</p>
- <p>With respect to running the test suite, always check to make sure that
-TESTDIR is not on a remote mounted filesystem.</p>
+ <p>
+ The Berkeley DB architecture does not support
+ placing the shared memory regions on remote
+ filesystems -- for example, the Network File System
+ (NFS) or the Andrew File System (AFS). For this
+ reason, the shared memory regions (normally located in
+ the database home directory) must reside on a local
+ filesystem. See <a href="../programmer_reference/env_region.html" class="olink">Shared memory region</a> for more information.
+ </p>
+ <p>
+ With respect to running the test suite, always
+ check to make sure that TESTDIR is not on a remote
+ mounted filesystem.
+ </p>
</li>
<li>
<span class="bold">
<strong>The <a href="../api_reference/C/db_dump.html" class="olink">db_dump</a> utility fails to build.</strong>
</span>
- <p>The <a href="../api_reference/C/db_dump.html" class="olink">db_dump185</a> utility is the utility that supports the conversion of Berkeley DB 1.85 and earlier databases to current database formats. If the build errors look something like the following, it means the db.h include file being loaded is not a Berkeley DB 1.85 version include file:</p>
+ <p>
+ The <a href="../api_reference/C/db_dump.html" class="olink">db_dump185</a> utility is the utility that supports the
+ conversion of Berkeley DB 1.85 and earlier databases
+ to current database formats. If the build errors look
+ something like the following, it means the db.h
+ include file being loaded is not a Berkeley DB 1.85
+ version include file:
+ </p>
<pre class="programlisting">db_dump185.c: In function `main':
db_dump185.c:210: warning: assignment makes pointer from integer
without a cast
@@ -176,21 +254,30 @@ db_dump185.c:212: warning: assignment makes pointer from integer
without a cast
db_dump185.c:227: structure has no member named `seq'
db_dump185.c:227: `R_NEXT' undeclared (first use in this function)</pre>
- <p>If the build errors look something like the following, it means that
-the Berkeley DB 1.85 code was not found in the standard libraries:</p>
+ <p>
+ If the build errors look something like the
+ following, it means that the Berkeley DB 1.85 code was
+ not found in the standard libraries:
+ </p>
<pre class="programlisting">cc -o db_dump185 db_dump185.o
ld:
Unresolved:
dbopen</pre>
- <p>To build the <a href="../api_reference/C/db_dump.html" class="olink">db_dump185</a> utility, the Berkeley DB version 1.85 code must already
-been built and available on the system. If the Berkeley DB 1.85 header file
-is not found in a standard place, or if the library is not part of the
-standard libraries used for loading, you will need to edit your
-Makefile, and change the following lines:</p>
+ <p>
+ To build the <a href="../api_reference/C/db_dump.html" class="olink">db_dump185</a> utility, the Berkeley DB version
+ 1.85 code must already been built and available on the
+ system. If the Berkeley DB 1.85 header file is not
+ found in a standard place, or if the library is not
+ part of the standard libraries used for loading, you
+ will need to edit your Makefile, and change the
+ following lines:
+ </p>
<pre class="programlisting">DB185INC=
DB185LIB=</pre>
- <p>So that the system Berkeley DB 1.85 header file and library are found; for
-example:</p>
+ <p>
+ So that the system Berkeley DB 1.85 header file and
+ library are found; for example:
+ </p>
<pre class="programlisting">DB185INC=/usr/local/include
DB185LIB=-ldb185</pre>
</li>
@@ -208,7 +295,8 @@ DB185LIB=-ldb185</pre>
<td width="40%" align="right"> <a accesskey="n" href="build_unix_aix.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Running the test suite under UNIX </td>
+ <td width="40%" align="left" valign="top">Running the test suite under
+ UNIX </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>