8.39. GDBM-1.24

The GDBM package contains the GNU Database Manager. It is a library of database functions that uses extensible hashing and works like the standard UNIX dbm. The library provides primitives for storing key/data pairs, searching and retrieving the data by its key and deleting a key along with its data.

Approximate build time: less than 0.1 SBU
Required disk space: 13 MB

8.39.1. Installation of GDBM

Prepare GDBM for compilation:

./configure --prefix=/usr    \
            --disable-static \
            --enable-libgdbm-compat

The meaning of the configure option:

--enable-libgdbm-compat

This switch enables building the libgdbm compatibility library. Some packages outside of LFS may require the older DBM routines it provides.

Compile the package:

make

To test the results, issue:

make check

Install the package:

make install

8.39.2. Installation of GDBM - x32bit

Clean previous build:

make distclean

Prepare GDBM for compilation:

CC="gcc -mx32" CXX="g++ -mx32" ./configure \
    --host=x86_64-pc-linux-gnux32 \
    --prefix=/usr                 \
    --libdir=/usr/libx32          \
    --disable-static              \
    --enable-libgdbm-compat

Compile the package:

make

Install the package:

make DESTDIR=$PWD/DESTDIR install
cp -Rv DESTDIR/usr/libx32/* /usr/libx32/
rm -rf DESTDIR

8.39.3. Contents of GDBM

Installed programs: gdbm_dump, gdbm_load, and gdbmtool
Installed libraries: libgdbm.so and libgdbm_compat.so

Short Descriptions

gdbm_dump

Dumps a GDBM database to a file

gdbm_load

Recreates a GDBM database from a dump file

gdbmtool

Tests and modifies a GDBM database

libgdbm

Contains functions to manipulate a hashed database

libgdbm_compat

Compatibility library containing older DBM functions