Compiling Oracle BerkeleyDB-XML on Ubuntu

Aus Markus' Wiki
Wechseln zu: Navigation, Suche

This HowTo refers to release 2.4.16 of Oracle's BerkeleyDB/XML. As documented by Zeth, there are still some errors in the distribution package which prevent it from compiling fine on Ubuntu. The best way is to patch the installation package with a patch file which I have produced. Proceed as below:

First you need to make sure that the external dependencies are available. One major change is from xerces 2.8 to xerces 3.0. .....

The result should look like this:

patching file dbxml/dist/configure
patching file dbxml/dist/swig/dbxml_python.i
patching file dbxml/examples/python/examples.py
patching file dbxml/src/python/dbxml.py
patching file dbxml/src/python/setup.py

Then you can proceed as described by Zeth. Enter the following commands:

  • cd dbxml/build_unix
  • CFLAGS="-DSWIG_PYTHON_NO_USE_GIL" ../dist/configure --with-berkeleydb=/usr/lib/ --with-xqilla=/usr/lib/ --with-xerces=/usr/
  • make
  • sudo make install

Now you should have a working DBXML installation in /usr/local/BerkeleyDBXML.2.4. Now go back to the source directory.

  • cd dbxml-2.4.16/
  • cd dbxml/src/python/
  • CFLAGS="-DSWIG_PYTHON_NO_USE_GIL" python setup.py build
  • sudo python setup.py install

Now you should have a working python API. As of now you will be able to try out the examples given in dbxml/examples/python/