• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/docs/ref/build_unix/
1<!--$Id: hpux.so,v 11.17 2004/08/13 03:38:59 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB Reference Guide: HP-UX</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<a name="2"><!--meow--></a>
12<table width="100%"><tr valign=top>
13<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for UNIX/POSIX systems</dl></b></td>
14<td align=right><a href="../build_unix/freebsd.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_unix/irix.html"><img src="../../images/next.gif" alt="Next"></a>
15</td></tr></table>
16<p align=center><b>HP-UX</b></p>
17<ol>
18<p><li><b>I can't specify the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag to <a href="../../api_c/env_open.html">DB_ENV-&gt;open</a>.</b>
19<p>The <b>shmget</b>(2) interfaces are not always used on HP-UX, even
20though they exist, because anonymous memory allocated using <b>shmget</b>(2)
21cannot be used to store the standard HP-UX msemaphore semaphores.  For
22this reason, it may not be possible to specify the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a>
23flag on some versions of HP-UX.  (We have seen this problem only on HP-UX
2410.XX, so the simplest workaround may be to upgrade your HP-UX release.)</p>
25<hr size=1 noshade>
26<p><li><b>I can't specify both the <a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a> and <a href="../../api_c/env_open.html#DB_THREAD">DB_THREAD</a>
27flags to <a href="../../api_c/env_open.html">DB_ENV-&gt;open</a>.</b>
28<p>It is not possible to store the standard HP-UX msemaphore semaphores in
29memory returned by <b>malloc</b>(3) in some versions of HP-UX.  For
30this reason, it may not be possible to specify both the
31<a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a> and <a href="../../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flags on some versions of
32HP-UX.  (We have seen this problem only on HP-UX 10.XX, so the simplest
33workaround may be to upgrade your HP-UX release.)</p>
34<hr size=1 noshade>
35<p><li><b>I can't compile and run multithreaded applications.</b>
36<p>Special compile-time flags are required when compiling threaded
37applications on HP-UX.  If you are compiling a threaded application, you
38must compile with the _REENTRANT flag:</p>
39<blockquote><pre>cc -D_REENTRANT ...</pre></blockquote>
40<p>The Berkeley DB library will automatically build with the correct options.</p>
41<hr size=1 noshade>
42<p><li><b>An ENOMEM error is returned from <a href="../../api_c/env_open.html">DB_ENV-&gt;open</a> or
43<a href="../../api_c/env_remove.html">DB_ENV-&gt;remove</a>.</b>
44<p>Due to the constraints of the PA-RISC memory architecture, HP-UX does not
45allow a process to map a file into its address space multiple times.
46For this reason, each Berkeley DB environment may be opened only once by a
47process on HP-UX; that is, calls to <a href="../../api_c/env_open.html">DB_ENV-&gt;open</a> will fail if the
48specified Berkeley DB environment has been opened and not subsequently closed.</p>
49<hr size=1 noshade>
50<p><li><b>When compiling with gcc, I see the following error:
51<blockquote><pre>#error "Large Files (ILP32) not supported in strict ANSI mode."</pre></blockquote></b>
52<p>We believe this is an error in the HP-UX include files, but we don't
53really understand it.  The only workaround we have found is to add
54-D__STDC_EXT__ to the C preprocessor defines as part of compilation.</p>
55<hr size=1 noshade>
56<p><li><b>When using the Tcl or Perl APIs (including running the test
57suite), I see the error "Can't shl_load() a library containing Thread
58Local Storage".</b>
59<p>This problem happens when HP-UX has been configured to use pthread mutex
60locking, and an attempt is made to call Berkeley DB using the Tcl or Perl APIs.
61We have never found any way to fix this problem as part of the Berkeley DB
62build process.  To work around the problem, rebuild tclsh or Perl, and
63modify its build process to explicitly link it against the HP-UX pthread
64library (currently /usr/lib/libpthread.a).</p>
65<hr size=1 noshade>
66<p><li><b>When running an executable that has been dynamically linked
67against the Berkeley DB library, I see the error "Can't find path for shared
68library" even though I correctly set the SHLIB_PATH environment variable.</b>
69<p>By default, some versions of HP-UX ignore the dynamic library search
70path specified by the SHLIB_PATH environment variable.  To work around
71this, specify the "+s" flag to ld when linking, or run the following
72command on the executable that is not working:</p>
73<blockquote><pre>chatr +s enable -l /full/path/to/libdb-3.2.sl ...</pre></blockquote>
74<hr size=1 noshade>
75<p><li><b>I see errors about "open64" when building Berkeley DB applications.</b>
76<p>System include files (most commonly fcntl.h) in some releases of AIX,
77HP-UX and Solaris redefine "open" when large-file support is enabled for
78applications.  This causes problems when compiling applications because
79"open" is a method in the Berkeley DB APIs.  To work around this problem:
80<ol>
81<p><li>Avoid including the problematical system include files in source code
82files which also include Berkeley DB include files and call into the Berkeley DB
83API.
84<li>Before building Berkeley DB, modify the generated include file db.h to itself
85include the problematical system include files.
86<li>Turn off Berkeley DB large-file support by specifying the
87<a href="../../ref/build_unix/conf.html#--disable-largefile">--disable-largefile</a> configuration option and rebuilding.
88</ol></p>
89</ol>
90<table width="100%"><tr><td><br></td><td align=right><a href="../build_unix/freebsd.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_unix/irix.html"><img src="../../images/next.gif" alt="Next"></a>
91</td></tr></table>
92<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
93</body>
94</html>
95