1
<!--$Id: hpux.so,v 11.14 2001/03/23 21:31:01 bostic Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
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,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<a name="2"><!--meow--></a>
12
<table width="100%"><tr valign=top>
13
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for UNIX systems</dl></h3></td>
14
<td align=right><a href="../../ref/build_unix/freebsd.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/build_unix/irix.html"><img src="../../images/next.gif" alt="Next"></a>
17
<h1 align=center>HP-UX</h1>
19
<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->open</a>.</b>
20
<p>The <b>shmget</b>(2) interfaces are not always used on HP-UX, even
21
though they exist, because anonymous memory allocated using <b>shmget</b>(2)
22
cannot be used to store the standard HP-UX msemaphore semaphores. For
23
this reason, it may not be possible to specify the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a>
24
flag on some versions of HP-UX. (We have seen this problem only on HP-UX
25
10.XX, so the simplest workaround may be to upgrade your HP-UX release.)
27
<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>
28
flags to <a href="../../api_c/env_open.html">DB_ENV->open</a>.</b>
29
<p>It is not possible to store the standard HP-UX msemaphore semaphores in
30
memory returned by <b>malloc</b>(3) in some versions of HP-UX. For
31
this reason, it may not be possible to specify both the
32
<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
33
HP-UX. (We have seen this problem only on HP-UX 10.XX, so the simplest
34
workaround may be to upgrade your HP-UX release.)
36
<p><li><b>During configuration, I see a message that large file support
37
has been turned off.</b>
38
<p>Some HP-UX system include files redefine "open" when big-file support (the
39
HAVE_FILE_OFFSET_BITS and _FILE_OFFSET_BITS #defines) is enabled. This
40
causes problems when compiling for C++, where "open" is a legal
41
identifier, used in the Berkeley DB C++ API. For this reason, we automatically
42
turn off big-file support when Berkeley DB is configured with a C++ API. This
43
should not be a problem for applications unless there is a need to create
44
databases larger than 2GB.
46
<p><li><b>I can't compile and run multithreaded applications.</b>
47
<p>Special compile-time flags are required when compiling threaded
48
applications on HP-UX. If you are compiling a threaded application, you
49
must compile with the _REENTRANT flag:
50
<p><blockquote><pre>cc -D_REENTRANT ...</pre></blockquote>
51
<p>The Berkeley DB library will automatically build with the correct options.
53
<p><li><b>An ENOMEM error is returned from <a href="../../api_c/env_open.html">DB_ENV->open</a> or
54
<a href="../../api_c/env_remove.html">DB_ENV->remove</a>.</b>
55
<p>Due to the constraints of the PA-RISC memory architecture, HP-UX does not
56
allow a process to map a file into its address space multiple times.
57
For this reason, each Berkeley DB environment may be opened only once by a
58
process on HP-UX; that is, calls to <a href="../../api_c/env_open.html">DB_ENV->open</a> will fail if the
59
specified Berkeley DB environment has been opened and not subsequently closed.
61
<p><li><b>When compiling with gcc, I see the following error:
62
<p><blockquote><pre>#error "Large Files (ILP32) not supported in strict ANSI mode."</pre></blockquote></b>
63
<p>We believe this is an error in the HP-UX include files, but we don't
64
really understand it. The only workaround we have found is to add
65
-D__STDC_EXT__ to the C preprocessor defines as part of compilation.
67
<p><li><b>When using the Tcl or Perl APIs (including running the test
68
suite), I see the error "Can't shl_load() a library containing Thread
70
<p>This problem happens when HP-UX has been configured to use pthread mutex
71
locking, and an attempt is made to call Berkeley DB using the Tcl or Perl APIs.
72
We have never found any way to fix this problem as part of the Berkeley DB
73
build process. To work around the problem, rebuild tclsh or Perl, and
74
modify its build process to explicitly link it against the HP-UX pthread
75
library (currently /usr/lib/libpthread.a).
77
<p><li><b>When running an executable that has been dynamically linked
78
against the Berkeley DB library, I see the error "Can't find path for shared
79
library" even though I correctly set the SHLIB_PATH environment variable.</b>
80
<p>By default, some versions of HP-UX ignore the dynamic library search
81
path specified by the SHLIB_PATH environment variable. To work around
82
this, specify the "+s" flag to ld when linking, or run the following
83
command on the executable that is not working:
84
<p><blockquote><pre>chatr +s enable -l /full/path/to/libdb-3.2.sl ...</pre></blockquote>
86
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/build_unix/freebsd.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/build_unix/irix.html"><img src="../../images/next.gif" alt="Next"></a>
88
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>