Building Berkeley DB XML Libraries for UNIX/POSIX
The buildall.sh script is a wrapper around separate build procedures for each third-party library. If there are problems using the script, or if it is necessary to build libraries individually, it is possible to build manually. Building manually gives you finer control over configuration, build and installation. If you are able to build successfully using buildall.sh, the information on this page is not necessary.Building Individual Libraries
These instructions assume that the third-party libraries are in the directory, dbxml-2.5.16. They apply regardless of actual location.
When you build Berkeley DB, you must specify the --enable-cxx configuration option, so the minimal build commands for Berkeley DB are:
cd dbxml-2.5.16/db-4.8.x/build_unix ../dist/configure --enable-cxx make make install
This will install Berkeley DB in /usr/local/BerkeleyDB.4.8. If you want to install in a different directory, add --prefix=/path/to/install to the configure line.
If you want to use the Berkeley DB XML Java API, you must also build Berkeley DB with Java support by adding --enable-java to the configure line.
Example Bourne shell build commands for Xerces are:
cd dbxml-2.5.16/xerces-c-src export XERCESCROOT=`pwd` cd src/xercesc ./configure --disable-pretty-make make make install
The option --disable-pretty-make is added because that eliminates the requirement for GNU make. It results in more verbose output. If it is not used GNU make will be required.
This will install Xerces under /usr/local. If you want to install in a different directory, add -P/path/to/install to the configure line.
An example Bourne shell build command for XQilla is:
cd dbxml-2.5.16/xqilla mkdir build cd build ../configure --with-xerces=../../xerces-c-src make make install
This will install XQilla under /usr/local. If you want to install in a different directory, add --prefix=/path/to/install to the configure line. The --with-xerces directive is required, and must point to a valid installed Xerces tree.
To build multiple UNIX versions of XQilla in the same source tree, create a new directory at the same level as the build directory, and then configure and build in that directory as described previously.
The --with-berkeleydb, --with-xerces, and --with-xqilla configuration options can be used to specify the location of the install trees. Alternatively, the CFLAGS, LDFLAGS and other standard environment variables can be used to specify the location of the already installed include and library files.
To do a standard UNIX build of Berkeley DB XML using default paths and installations of the third-party libraries, change to the build_unix directory and then enter the following two commands, adjusting the paths as necessary:
cd dbxml-2.5.16/dbxml/build_unix ../dist/configure make
If you have changed the locations where Berkeley DB, Xerces, or XQilla are installed from the defaults, add the arguments --with-berkeleydb=/path/to/db, --with-xqilla=/path/to/xqilla and/or --with-xerces=/path/to/xerces to configure.
By default, Berkeley DB XML is installed in /usr/local/BerkeleyDBXML.2.5. To change that, add --prefix=/path/to/install to configure. To install the Berkeley DB XML library, enter the following command:
To rebuild Berkeley DB XML, enter:
make clean make
If you change your mind about how Berkeley DB XML is to be configured, you must start from scratch by entering the following command:
make distclean ../dist/configure make
To build multiple UNIX versions of Berkeley DB XML in the same source tree, create a new directory at the same level as the build_unix directory, and then configure and build in that directory as described previously.Building the Java API
To build the DB XML Java API, make sure there is a working javac in your PATH, and specify --enable-java when running both the Berkeley DB and Berkeley DB XML configure scripts. When you run make, the Java support library for Berkeley DB XML will be built, creating the file dbxml.jar in your build directory. By default -source 1.5 and -target 1.5 are passed to javac to build dbxml.jar and dbxmlexamples.jar. If another target is desired it is possible to modify the file dist/Makefile.defs.in where these flags are set.
To make use of the DB XML Java API set your environment variable CLASSPATH to include the full pathname of the dbxml.jar file, as well as the db.jar file from Berkeley DB, and your environment variable LD_LIBRARY_PATH (or equivalent) to include the .libs subdirectory of your build directory.
Copyright (c) 1996-2009 Oracle. All rights reserved.