1<!--$Id: aix.so,v 11.27 2005/04/06 01:45:22 mjc 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: AIX</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/notes.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/freebsd.html"><img src="/images/next.gif" alt="Next"></a>
15</td></tr></table>
16<p align=center><b>AIX</b></p>
17<ol>
18<p><li><b>I can't compile and run multithreaded applications.</b>
19<p>Special compile-time flags are required when compiling threaded
20applications on AIX.  If you are compiling a threaded application, you
21must compile with the _THREAD_SAFE flag and load with specific
22libraries; for example, "-lc_r".  Specifying the compiler name with a
23trailing "_r" usually performs the right actions for the system.</p>
24<blockquote><pre>xlc_r ...
25cc -D_THREAD_SAFE -lc_r ...</pre></blockquote>
26<p>The Berkeley DB library will automatically build with the correct options.</p>
27<hr size=1 noshade>
28<p><li><b>I can't run using the <a href="/api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> option to
29<a href="/api_c/env_open.html">DB_ENV-&gt;open</a>.</b>
30<p>AIX 4.1 allows applications to map only 10 system shared memory
31segments.  In AIX 4.3, this has been raised to 256K segments, but only
32if you set the environment variable "export EXTSHM=ON".</p>
33<hr size=1 noshade>
34<p><li><b>On AIX 4.3.2 (or before) I see duplicate symbol warnings when
35building the C++ shared library and when linking applications.</b>
36<p>We are aware of some duplicate symbol warnings with this platform,
37but they do not appear to affect the correct operation of applications.</p>
38<hr size=1 noshade>
39<p><li><b>On AIX 4.3.3 I see undefined symbols for DbEnv::set_error_stream,
40Db::set_error_stream or DbEnv::verify when linking C++ applications.
41(These undefined symbols also appear when building the Berkeley DB C++ example
42applications).</b>
43<p>By default, Berkeley DB is built with _LARGE_FILES set to 1 to support the
44creation of "large" database files.  However, this also affects how
45standard classes, like iostream, are named internally.  When building
46your application, use a "-D_LARGE_FILES=1" compilation option, or insert
47"#define _LARGE_FILES 1" before any #include statements.</p>
48<hr size=1 noshade>
49<p><li><b>I can't create database files larger than 1GB on AIX.</b>
50<p>If you're running on AIX 4.1 or earlier, try changing the source code
51for <b>os/os_open.c</b> to always specify the <b>O_LARGEFILE</b>
52flag to the <b>open</b>(2) system call, and recompile Berkeley DB from
53scratch.</p>
54<p>Also, the documentation for the IBM Visual Age compiler states that it
55does not not support the 64-bit filesystem APIs necessary for creating
56large files; the ibmcxx product must be used instead.  We have not heard
57whether the GNU gcc compiler supports the 64-bit APIs or not.</p>
58<p>Finally, to create large files under AIX, the filesystem has to be
59configured to support large files and the system wide user hard-limit
60for file sizes has to be greater than 1GB.</p>
61<hr size=1 noshade>
62<p><li><b>I see errors about "open64" when building Berkeley DB applications.</b>
63<p>System include files (most commonly fcntl.h) in some releases of AIX,
64HP-UX and Solaris redefine "open" when large-file support is enabled for
65applications.  This causes problems when compiling applications because
66"open" is a method in the Berkeley DB APIs.  To work around this problem:
67<ol>
68<p><li>Avoid including the problematical system include files in source code
69files which also include Berkeley DB include files and call into the Berkeley DB
70API.
71<li>Before building Berkeley DB, modify the generated include file db.h to itself
72include the problematical system include files.
73<li>Turn off Berkeley DB large-file support by specifying the
74<a href="/ref/build_unix/conf.html#--disable-largefile">--disable-largefile</a> configuration option and rebuilding.
75</ol></p>
76</ol>
77<table width="100%"><tr><td><br></td><td align=right><a href="/build_unix/notes.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/freebsd.html"><img src="/images/next.gif" alt="Next"></a>
78</td></tr></table>
79<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
80</body>
81</html>
82