Mac OS X Build Notes

See also Berkeley DB notes on Mac OS X

  1. Normal build command for OS X and no options:

    sh buildall.sh

    To build debug using the dwarf format (quite useful):

    bash buildall.sh --with-configure-env="CXXFLAGS='-g -gdwarf-2'" \
        --with-configure-env="CFLAGS='-g -gdwarf-2'" --enable-debug
  2. When trying to link multiple Berkeley DB XML language interfaces (for example, Tcl, C++, Java, Python) into a single process, I get "multiple definitions" errors from dyld.

    This problem will most often occur with Python, PHP, or Tcl, where libraries are dynamically loaded. 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 XML 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.