Berkeley DB XML Reference Guide:
Building Berkeley DB XML for UNIX/POSIX systems

Building Berkeley DB XML for UNIX/POSIX

About Building and Building Berkeley DB XML Using the Script
Building Individual Libraries
Configuring Berkeley DB XML
Changing compilation and link options
Installing Berkeley DB XML
Dynamic Shared Libraries
Using Berkeley DB XML on UNIX/POSIX Systems
Architecture Independent Build FAQ
AIX Notes
Solaris Notes
FreeBSD Notes
HP-UX Notes
OS X Notes

About Building Berkeley DB XML and Using the Script

The Berkeley DB XML distribution comprises several libraries: a base C++ library, three third-party libraries, and optional libraries for additional language interfaces such as Java, Perl, Python, PHP, and Tcl. Instructions for building the base libraries as well as Java and Tcl interfaces are included here. Instructions for the other language bindings appear in their respective directories: dbxml-2.5.16/dbxml/src/{perl,php,python}. All bindings require the C++ library and third-party libraries. Building for Linux, Mac OS X, and Cygwin (Windows) is the same as building for a conventional UNIX platform.

The Berkeley DB XML distribution uses the Free Software Foundation's autoconf and libtool tools to build on UNIX platforms. In general, the standard configuration and installation options for these tools apply to the Berkeley DB XML distribution. For ease of use Berkeley DB XML uses a shell script called to drive the build process. It wraps the configure and make steps associated with autoconf

Preparing to build

Berkeley DB XML makes use of several third-party libraries. Berkeley DB XML provides a shell program that makes it possible to build all of the libraries in one command. The Berkeley DB XML distribution includes the complete source for compatible versions of the third-party libraries. No additional downloads are required. Use of other versions may not work, and may not be supported.

Each of these packages is freely available and distributed under an Open Source license, although Berkeley DB XML depends on specific versions of each. To build Berkeley DB XML, you will need the following third-party libraries:

Berkeley DB Xerces XQilla

It is necessary to use GNU make (gmake) to build Berkeley DB XML and its third-party libraries. If you do not already have GNU make on your system, you will need to install it. When using gcc/g++, Berkeley DB XML requires at least a 3.x release of gcc.

Building Berkeley DB XML and third-party libraries

These instructions assume that you are building in the Berkeley DB XML distribution. The simplest possible build command is the following:

cd dbxml-2.5.16
This will configure, build, and install all of the libraries using default settings, which installs them into the directory dbxml-2.5.16/install. The default build supports the C++ interface only. The default build also compiles Berkeley DB XML examples, and places them in the directory dbxml-2.5.16/dbxml/build_unix.

The script has a number of configuration options. You can see them with this command:

sh --help
Some common options include:

There is no option for per-library clean or rebuild in See building individual libraries for information on how to work with each library build.

Configuring Berkeley DB XML and third-party libraries

The script has a number of configuration flags to handle platform-specific issues, change target and destination directories, as well as product configuration options. The flags that start with "--with-" apply to each of the libraries, depending on the name used. In these examples, "libname" is used to represent one of "dbxml," "xerces," "xqilla," or "berkeleydb." For example, a valid flag may be "--with-berkeleydb-prefix=path" or "--with-xerces-prefix=path." The following is a partial list of options:

--help --enable-debug --enable-java --enable-perl --with-tcl=path --disable-compression --enable-static-zlib --with-zlib=path --enable-test --with-junit -p platform -c C compiler name -x C++ compiler name -m make_command --no-configure --clean --distclean --build-one=library --prefix=path --with-libname=path --with-libname-prefix=path --with-libname-conf=configure flags
Advanced Building and Troubleshooting

If does not provide enough control for your environment, or if you have trouble with any of these commands, please see building individual libraries, which goes into more detail on build options for each product. At the end of that page, there is information on what to do if build problems persist.


Copyright (c) 1996-2009 Oracle. All rights reserved.