This chapter includes databases that range from single-user read/write to industrial database servers with transaction support. Generally, you will be sent here to satisfy dependencies to other applications although building a SQL server on a base LFS system is entirely possible.
The Berkeley DB package contains programs and utilities used by many other applications for database related functions.
Download (FTP): ftp://sleepycat1.inetu.net/releases/db-4.3.28.tar.gz
Download MD5 sum: e27759537db6054b31d8cb3e99ba6fbb
Download size: 5.8 MB
Estimated disk space required: 74 MB (additional 140 MB to run parallel standard testsuite)
Estimated build time: 1.0 SBU (additional 80 SBU to run parallel standard testsuite)
Tcl-8.4.11 and JDK-1.5.0
It is recommended you skip ahead to Installation. The test-suite takes more than 80 SBU and has a few bugs causing reports of 'Regression Tests Failed'. You must have Tcl to test Berkeley DB.
Build for the Berkeley DB test by running the following commands:
cd build_unix && ../dist/configure --prefix=/usr \ --enable-test --enable-tcl --with-tcl=/usr/lib && make LIBSO_LIBS="-lpthread" LIBXSO_LIBS="-lpthread" && chmod 644 ../test/sijointest.tcl && sed -i 's:puts "[s,S].*::' \ ../test/sijointest.tcl
To test the results, start tclsh:
tclsh
From the tclsh prompt (%), run:
source ../test/test.tcl run_parallel 4 run_std exit
Clean up with the following command:
make realclean && cd ..
Install Berkeley DB by running the following commands:
cd build_unix && ../dist/configure --prefix=/usr \ --enable-compat185 \ --enable-cxx && make LIBSO_LIBS="-lpthread" LIBXSO_LIBS="-lpthread"
Now, as the root user:
make docdir=/usr/share/doc/db-4.3.28 install && chown root:root /usr/bin/db_* \ /usr/lib/libdb* /usr/include/db* && chown -R root:root /usr/share/doc/db-4.3.28
cd build_unix && ../dist/configure --prefix=/usr...: This replaces the normal ./configure command, as Berkeley DB comes with various build directories for different platforms.
--enable-compat185: This switch enables building DB 1.85 compatibility API.
--enable-cxx: This switch enables building C++ API libraries.
--enable-test: Enables building the test suite (requires the two Tcl switches below).
--enable-tcl --with-tcl=/usr/lib: Enables Tcl support in DB and creates the libdb_tcl libraries.
--enable-java: Enables Java support in DB and creates the libdb_java libraries.
--enable-rpc: Enables building the Berkeley DB RPC server.
make LIBSO_LIBS="-lpthread" LIBXSO_LIBS="-lpthread": configure does not correctly handle NPTL. These variables force it to properly link against NPTL.
make docdir=/usr/share/doc/db-4.3.28 install: This installs the documentation in the correct place.
sed -i 's:puts "[s,S].*::' ../test/sijointest.tcl: This prevents logging two notes that are not recognized by run_std.
Last updated on 2005-08-01 13:29:19 -0600