<!--$Id: macosx.so,v 11.14 2005/10/21 20:16:41 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Mac OS X</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for UNIX/POSIX systems</dl></b></td>
<td align=right><a href="../build_unix/linux.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/osf1.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p align=center><b>Mac OS X</b></p>
<ol>
<p><li><b>When trying to link multiple Berkeley DB language interfaces (for
example, Tcl, C++, Java, Python) into a single process, I get "multiple
definitions" errors from dyld.</b>
<p>To fix this problem, set the environment variable MACOSX_DEPLOYMENT_TARGET
to 10.3 (or your current version of OS X), and reconfigure and rebuild
Berkeley DB from scratch. See the OS X ld(1) and dyld(1) man pages for information
about how OS X handles symbol namespaces, as well as undefined and
multiply-defined symbols.</p>
<p><li><b>When trying to use system-backed shared memory on OS X I see
failures about "too many open files".</b>
<p>The default number of shared memory segments on OS X is too low. To fix
this problem, edit the file /etc/rc, changing the kern.sysv.shmmax and
kern.sysv.shmseg values as follows:</p>
<blockquote><pre>*** /etc/rc.orig Fri Dec 19 09:34:09 2003
--- /etc/rc Fri Dec 19 09:33:53 2003
***************
*** 84,93 ****
# System tuning
sysctl -w kern.maxvnodes=$(echo $(sysctl -n hw.physmem) '33554432 /
512 * 1024 +p'|dc)
! sysctl -w kern.sysv.shmmax=4194304
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=32
! sysctl -w kern.sysv.shmseg=8
sysctl -w kern.sysv.shmall=1024
if [ -f /etc/sysctl-macosxserver.conf ]; then
awk '{ if (!-1 && -1) print $1 }' <
/etc/sysctl-macosxserver.conf | while read
--- 84,93 ----
# System tuning
sysctl -w kern.maxvnodes=$(echo $(sysctl -n hw.physmem) '33554432 /
512 * 1024 +p'|dc)
! sysctl -w kern.sysv.shmmax=134217728
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=32
! sysctl -w kern.sysv.shmseg=32
sysctl -w kern.sysv.shmall=1024
if [ -f /etc/sysctl-macosxserver.conf ]; then
awk '{ if (!-1 && -1) print $1 }' <
/etc/sysctl-macosxserver.conf | while read</pre></blockquote>
<p>and then reboot the system.</p>
</ol>
<table width="100%"><tr><td><br></td><td align=right><a href="../build_unix/linux.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/osf1.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez