Debian Codegraph @

docs/installation/build_unix_aix.html

raw
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>AIX</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 Installation and Build Guide" />
10 <link rel="up" href="build_unix.html" title="Chapter 7.  Building Berkeley DB for UNIX/POSIX" />
11 <link rel="prev" href="build_unix_notes.html" title="Architecture independent FAQ" />
12 <link rel="next" href="build_unix_freebsd.html" title="FreeBSD" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">AIX</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="build_unix_notes.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 7. 
26 Building Berkeley DB for UNIX/POSIX
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="build_unix_freebsd.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="build_unix_aix"></a>AIX</h2>
38 </div>
39 </div>
40 </div>
41 <div class="orderedlist">
42 <ol type="1">
43 <li>
44 <span class="bold">
45 <strong>I can't compile and run multithreaded applications.</strong>
46 </span>
47 <p>Special compile-time flags are required when compiling threaded
48 applications on AIX. If you are compiling a threaded application, you
49 must compile with the _THREAD_SAFE flag and load with specific
50 libraries; for example, "-lc_r". Specifying the compiler name with a
51 trailing "_r" usually performs the right actions for the system.</p>
52 <pre class="programlisting">xlc_r ...
53 cc -D_THREAD_SAFE -lc_r ...</pre>
54 <p>The Berkeley DB library will automatically build with the correct options.</p>
55 </li>
56 <li>
57 <span class="bold">
58 <strong>I can't run using the <a href="../api_reference/C/envopen.html#envopen_DB_SYSTEM_MEM" class="olink">DB_SYSTEM_MEM</a> option to
59 <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a>.</strong>
60 </span>
61 <p>AIX 4.1 allows applications to map only 10 system shared memory
62 segments. In AIX 4.3, this has been raised to 256K segments, but only
63 if you set the environment variable "export EXTSHM=ON".</p>
64 </li>
65 <li>
66 <span class="bold">
67 <strong>On AIX 4.3.2 (or before) I see duplicate symbol warnings when
68 building the C++ shared library and when linking applications.</strong>
69 </span>
70 <p>We are aware of some duplicate symbol warnings with this platform,
71 but they do not appear to affect the correct operation of applications.</p>
72 </li>
73 <li>
74 <span class="bold">
75 <strong>On AIX 4.3.3 I see undefined symbols for DbEnv::set_error_stream,
76 Db::set_error_stream or DbEnv::verify when linking C++ applications.
77 (These undefined symbols also appear when building the Berkeley DB C++ example
78 applications).</strong>
79 </span>
80 <p>By default, Berkeley DB is built with _LARGE_FILES set to 1 to support the
81 creation of "large" database files. However, this also affects how
82 standard classes, like iostream, are named internally. When building
83 your application, use a "-D_LARGE_FILES=1" compilation option, or insert
84 "#define _LARGE_FILES 1" before any #include statements.</p>
85 </li>
86 <li>
87 <span class="bold">
88 <strong>I can't create database files larger than 1GB on AIX.</strong>
89 </span>
90 <p>If you're running on AIX 4.1 or earlier, try changing the source code
91 for <code class="filename">os/os_open.c</code> to always specify the <span class="bold"><strong>O_LARGEFILE</strong></span>
92 flag to the <code class="literal">open</code>(2) system call, and recompile Berkeley DB from
93 scratch.</p>
94 <p>Also, the documentation for the IBM Visual Age compiler states that it
95 does not not support the 64-bit filesystem APIs necessary for creating
96 large files; the ibmcxx product must be used instead. We have not heard
97 whether the GNU gcc compiler supports the 64-bit APIs or not.</p>
98 <p>Finally, to create large files under AIX, the filesystem has to be
99 configured to support large files and the system wide user hard-limit
100 for file sizes has to be greater than 1GB.</p>
101 </li>
102 <li>
103 <span class="bold">
104 <strong>I see errors about "open64" when building Berkeley DB applications.</strong>
105 </span>
106 <p>System include files (most commonly fcntl.h) in some releases of AIX
107 and Solaris redefine "open" when large-file support is enabled for
108 applications. This causes problems when compiling applications because
109 "open" is a method in the Berkeley DB APIs. To work around this problem:
110 </p>
111 <div class="orderedlist">
112 <ol type="a">
113 <li>Avoid including the problematical system include files in source code
114 files which also include Berkeley DB include files and call into the Berkeley DB
115 API.</li>
116 <li>Before building Berkeley DB, modify the generated include file db.h to itself
117 include the problematical system include files.</li>
118 <li>Turn off Berkeley DB large-file support by specifying the
119 <a class="link" href="build_unix_conf.html#build_unix_conf.--disable-largefile">--disable-largefile</a> configuration option and rebuilding.</li>
120 </ol>
121 </div>
122 </li>
123 <li>
124 <span class="bold">
125 <strong>I see the error "Redeclaration of lseek64" when building Berkeley DB with the --enable-sql and --enable-test options.</strong>
126 </span>
127 <p>In some releases of AIX, the system include files (most commonly <code class="literal">unistd.h</code>) redefine <code class="literal">lseek</code> to <code class="literal">lseek64</code> when large-file support is enabled even though <code class="literal">lseek</code> may have already been defined when the <code class="literal">_LARGE_FILE_API</code> macro is on. To work around this problem, do either one of the following:
128 </p>
129 <div class="orderedlist">
130 <ol type="a">
131 <li>Disable large-file support in Berkeley DB by specifying the <code class="literal">--disable-largefile</code> configuration option and rebuilding. </li>
132 <li>Edit <code class="literal">db.h</code> manually after running the configure command, and remove the line that includes <code class="literal">unistd.h</code>. </li>
133 </ol>
134 </div>
135 </li>
136 </ol>
137 </div>
138 </div>
139 <div class="navfooter">
140 <hr />
141 <table width="100%" summary="Navigation footer">
142 <tr>
143 <td width="40%" align="left"><a accesskey="p" href="build_unix_notes.html">Prev</a> </td>
144 <td width="20%" align="center">
145 <a accesskey="u" href="build_unix.html">Up</a>
146 </td>
147 <td width="40%" align="right"> <a accesskey="n" href="build_unix_freebsd.html">Next</a></td>
148 </tr>
149 <tr>
150 <td width="40%" align="left" valign="top">Architecture independent FAQ </td>
151 <td width="20%" align="center">
152 <a accesskey="h" href="index.html">Home</a>
153 </td>
154 <td width="40%" align="right" valign="top"> FreeBSD</td>
155 </tr>
156 </table>
157 </div>
158 </body>
159 </html>