There doesn't seem to be too much on the web about this, so I thought I'd share my experiences installing the Berkeley DBXML. It used to be owned by Sleepycat Software, but now belongs to Oracle.
The one webpage that keeps coming up for a Debian install is this one, and it seems a bit dated:
http://blog.parthenoncomputing.com/d...bian_buil.html
Well there doesn't seem to be another Debian install available, so this is how I installed from source.
First I got the source code from here:
http://www.oracle.com/technology/sof...xml/index.html
Berkeley DB XML 2.2.13 .tar.gz
After extracting (tar -xzf dbxml-2.2.13.tar.gz), instructions for install can be found here:
dbxml-2.2.13/dbxml/docs/ref_xml/xml_unix/intro.html
dbxml-2.2.13/dbxml/docs/ref_xml/xml_unix/install.html # gives a nice synopsis of the default options
dbxml-2.2.13/dbxml/docs/ref_xml/xml_unix/libs.html # describes how to build each dependency library manually
Intro.html says that the default install is to the /usr/local/BerkeleyDBXML.XX.XX directory. I had some trouble with this as I'll explain below.
Dbxml depends on four other libraries to work (please excuse my possibly incorrect use of terminology). There's the base Berkeley DB, then Pathan which helps with xpath, then Xerces which depends on Pathan, then XQuery which depends on Xerces and Pathan, then finally the dbxml itself, which depends on all of the above. Each library must be built (in that order) and point to the previously built libararies. You can do this individually from their own subdirectories (see libs.html, above) or by using the buildall.sh command (see intro.html above), which does exactly what it says on the tin.
Problems
When I first attempted to build using buildall.sh the install got as far as configuring the first library (Berkeley DB) and broke, giving the following error:
Quote:
multiple definition of `__i686.get_pc_thunk.bx
|
I found this post related to the error:
http://dunedin.lug.net.nz/forums/showthread.php?t=62219
which suggested upgrading gcc and binutils. I replaced binutils 2.15-6 with binutils_2.17-3_i386.deb using aptitude, because I couldn't figure out how to get around it with apt-get. This may also involve allowing etch into your /etc/apt/sources.list and maybe apt-pinning, which I had in place already (see
http://wiki.serios.net/wiki/Apt-Pinning_on_Debian)
Then I installed a new gcc (I was on gcc 3.3.5), went up to gcc-3.4. This I did with
Code:
apt-get install gcc-3.4
When installing DBXML, it is possible to give an option which points to a non-default gcc, but I found it easier to just change the symlink in my PATH to point to the new one (after installing gc-3.4 I now have 2 c compliers).
Code:
ls -l `which gcc` #will tell you which gcc is your default
cd /usr/bin
rm /usr/bin/gcc
ln -s gcc-3.4 gcc
And now your default C complier is gcc-3.4.
After several attempts to do the individual library build instead (and not being aware of 'make clean' and 'make distclean'), I removed the thing completely and unpacked again from the tar. Heavyhanded perhaps, but gives a clean slate. I found out during this trial and error that it was installing into the source directory, i.e. the directory where I had unpacked the tar. To fix this, I added a --prefix=$path to my buildall.sh just to be on the safe side. Also I want to enable Perl to interact with it, so I added that too. So to keep a long story short, here's the synopsis:
Code:
cd to where you downloaded the source
tar -xzvf dbxml-2.2.13.tar.gz
cd dbxml-2.2.13
./buildall.sh --prefix=/usr/local/BerkeleyDB --enable-perl
The buildall.sh script takes a LONG time. My server is a project to get a crappy old laptop to do cutting edge stuff, so it's having a Pentium 2, it took a full 3 hours to install.
Also. How to get PHP working with DBXML:
dbxml-2.2.13/dbxml/src/php/README
http://www.oracle.com/technology/pro...xml_faq.html#9
http://phpdbxml.4641.org/doku.php
More Debian/BDBXML info:
http://www.embeddedlinuxinterfacing....gBDBXMLThenPHP
Good luck. I hope this helps someone out. I'm expecting the next post to this thread to be a "why did you do all that when you could have just...", so post away! You will have increased web coverage of this topic by 100%.