• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/programmer_reference/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>HP-UX</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
10    <link rel="up" href="build_unix.html" title="Chapter��27.�� Building Berkeley DB for UNIX/POSIX" />
11    <link rel="prev" href="build_unix_freebsd.html" title="FreeBSD" />
12    <link rel="next" href="build_unix_irix.html" title="IRIX" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">HP-UX</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="build_unix_freebsd.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��27.��
23		Building Berkeley DB for UNIX/POSIX
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="build_unix_irix.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="build_unix_hpux"></a>HP-UX</h2>
35          </div>
36        </div>
37      </div>
38      <div class="orderedlist">
39        <ol type="1">
40          <li>
41            <span class="bold">
42              <strong>I can't specify the <a href="../api_reference/C/envopen.html#envopen_DB_SYSTEM_MEM" class="olink">DB_SYSTEM_MEM</a> flag to <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a>.</strong>
43            </span>
44            <p>The <code class="literal">shmget</code>(2) interfaces are not always used on HP-UX, even
45though they exist, because anonymous memory allocated using <code class="literal">shmget</code>(2)
46cannot be used to store the standard HP-UX msemaphore semaphores.  For
47this reason, it may not be possible to specify the <a href="../api_reference/C/envopen.html#envopen_DB_SYSTEM_MEM" class="olink">DB_SYSTEM_MEM</a>
48flag on some versions of HP-UX.  (We have seen this problem only on HP-UX
4910.XX, so the simplest workaround may be to upgrade your HP-UX release.)</p>
50          </li>
51          <li>
52            <span class="bold">
53              <strong>I can't specify both the <a href="../api_reference/C/envopen.html#open_DB_PRIVATE" class="olink">DB_PRIVATE</a> and <a href="../api_reference/C/dbopen.html#open_DB_THREAD" class="olink">DB_THREAD</a> 
54flags to <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a>.</strong>
55            </span>
56            <p>It is not possible to store the standard HP-UX msemaphore semaphores in
57memory returned by <code class="literal">malloc</code>(3) in some versions of HP-UX.  For
58this reason, it may not be possible to specify both the
59<a href="../api_reference/C/envopen.html#open_DB_PRIVATE" class="olink">DB_PRIVATE</a> and <a href="../api_reference/C/dbopen.html#open_DB_THREAD" class="olink">DB_THREAD</a> flags on some versions of
60HP-UX.  (We have seen this problem only on some older HP-UX platforms, so the simplest
61workaround may be to upgrade your HP-UX release.)</p>
62          </li>
63          <li>
64            <span class="bold">
65              <strong>I can't compile and run multithreaded applications.</strong>
66            </span>
67            <p>Special compile-time flags are required when compiling threaded
68applications on HP-UX.  If you are compiling a threaded application, you
69must compile with the _REENTRANT flag:</p>
70            <pre class="programlisting">cc -D_REENTRANT ...</pre>
71            <p>The Berkeley DB library will automatically build with the correct options.</p>
72          </li>
73          <li>
74            <span class="bold">
75              <strong>An ENOMEM error is returned from <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a> or <a href="../api_reference/C/envremove.html" class="olink">DB_ENV-&gt;remove()</a>.</strong>
76            </span>
77            <p>Due to the constraints of the PA-RISC memory architecture, HP-UX does not
78allow a process to map a file into its address space multiple times.
79For this reason, each Berkeley DB environment may be opened only once by a
80process on HP-UX; that is, calls to <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a> will fail if the
81specified Berkeley DB environment has been opened and not subsequently closed.</p>
82          </li>
83          <li>
84            <span class="bold">
85              <strong>When compiling with gcc, I see the following error:
86<pre class="programlisting">#error "Large Files (ILP32) not supported in strict ANSI mode."</pre></strong>
87            </span>
88            <p>We believe this is an error in the HP-UX include files, but we don't
89really understand it.  The only workaround we have found is to add
90-D__STDC_EXT__ to the C preprocessor defines as part of compilation.</p>
91          </li>
92          <li>
93            <span class="bold">
94              <strong>When using the Tcl or Perl APIs (including running the test
95suite), I see the error "Can't shl_load() a library containing Thread
96Local Storage".</strong>
97            </span>
98            <p>This problem happens when HP-UX has been configured to use pthread mutex
99locking, and an attempt is made to call Berkeley DB using the Tcl or Perl APIs.
100We have never found any way to fix this problem as part of the Berkeley DB
101build process.  To work around the problem, rebuild tclsh or Perl, and
102modify its build process to explicitly link it against the HP-UX pthread
103library (currently /usr/lib/libpthread.a).</p>
104          </li>
105          <li>
106            <span class="bold">
107              <strong>When running an executable that has been dynamically linked
108against the Berkeley DB library, I see the error "Can't find path for shared
109library" even though I correctly set the SHLIB_PATH environment variable.</strong>
110            </span>
111            <p>By default, some versions of HP-UX ignore the dynamic library search
112path specified by the SHLIB_PATH environment variable.  To work around
113this, specify the "+s" flag to ld when linking, or run the following
114command on the executable that is not working:</p>
115            <pre class="programlisting">chatr +s enable -l /full/path/to/libdb-3.2.sl ...</pre>
116          </li>
117          <li>
118            <span class="bold">
119              <strong>When building for an IA64 processor, I see
120either bus errors or compiler warnings about converting between unaligned
121types (#4232). How can I resolve them?</strong>
122            </span>
123            <p>Berkeley DB requires that data types containing members with different 
124sizes be aligned in a consistent way. The HP-UX compiler does not provide 
125this alignment property by default.</p>
126            <p>The compiler can be made to generate adequately aligned data by passing
127the +u1 option to the compiler. See the HP documentation about the 
128<a class="ulink" href="http://docs.hp.com/en/10946/options.htm#opt+u" target="_top">+u1 flag</a>
129for more information.</p>
130          </li>
131          <li>
132            <span class="bold">
133              <strong>I see errors about "open64" when building Berkeley DB applications.</strong>
134            </span>
135            <p>System include files (most commonly fcntl.h) in some releases of AIX,
136HP-UX and Solaris redefine "open" when large-file support is enabled for
137applications.  This causes problems when compiling applications because
138"open" is a method in the Berkeley DB APIs.  To work around this problem:
139</p>
140            <div class="orderedlist">
141              <ol type="a">
142                <li>Avoid including the problematical system include files in source code
143files which also include Berkeley DB include files and call into the Berkeley DB
144API.</li>
145                <li>Before building Berkeley DB, modify the generated include file db.h to itself
146include the problematical system include files.</li>
147                <li>Turn off Berkeley DB large-file support by specifying the
148<a class="link" href="build_unix_conf.html#build_unix_conf.--disable-largefile">--disable-largefile</a> configuration option and rebuilding.</li>
149              </ol>
150            </div>
151          </li>
152        </ol>
153      </div>
154    </div>
155    <div class="navfooter">
156      <hr />
157      <table width="100%" summary="Navigation footer">
158        <tr>
159          <td width="40%" align="left"><a accesskey="p" href="build_unix_freebsd.html">Prev</a>��</td>
160          <td width="20%" align="center">
161            <a accesskey="u" href="build_unix.html">Up</a>
162          </td>
163          <td width="40%" align="right">��<a accesskey="n" href="build_unix_irix.html">Next</a></td>
164        </tr>
165        <tr>
166          <td width="40%" align="left" valign="top">FreeBSD��</td>
167          <td width="20%" align="center">
168            <a accesskey="h" href="index.html">Home</a>
169          </td>
170          <td width="40%" align="right" valign="top">��IRIX</td>
171        </tr>
172      </table>
173    </div>
174  </body>
175</html>
176