Do not use the version of db that was distributed on the Net2 tape. It is riddled with bugs.
Do get the latest distribution of db via anonymous FTP from ftp.CS.Berkeley.EDU . The file ucb/4bsd/db.tar.Z is a symbolic link that always points to the latest distribution. That file is a compressed, tar (1) archive and can be extracted like this:
% zcat db.tar.Z | tar xvf -
The result will be creation of a new directory with the name db . something , where the something is the latest version number.
To compile the database library, you need to change into that directory. A listing of its contents might look like this:
Makefile.inc changelog include test PORT db man README docs mpool btree hash recno
Inside the
db
distribution directory is a subdirectory called
PORT
. In order to compile, change first into that subdirectory and list the files there:
%cd PORT
%ls
Makefile dgux.5.4 osf.1.0.2 sunos.4.1.1 README hpux.8.07 osf.1.3 sunos.4.1.2 aix.3.2 hpux.9.01 osf.2.0 sunos.4.1.3 bsd.4.4 include ptx.2.0 sunos.5.2 bsdi.1.0 irix.4.05F sinix.5.41 ultrix.4.2 clib linux solaris.2.2 ultrix.4.3
Always read the
README
file first. Then select the directory that is most suitable for your machine, say,
sunos.4.1.3
. [1] Change into it. It will look kind of bare, but that is okay.
[1] Note that the README file describes how to port db to systems that are not currently supported.
%cd sunos.4.1.3
%ls
Makefile clib include sys
If you elected to include support for both NDBM and NEWDB in Section 33.1, "Enable at Compile Time" , you will need to make Makefile writable and edit it. (If you selected only NEWDB, you should skip this step.) This is necessary because your system's ndbm (3) will confict with the internal ndbm of db and cause sendmail to fail in spectacular ways.
Make
Makefile
writable, edit it, and remove all references to
ndbm.o
. Then remove the file from the
include
directory:
%rm include/ndbm.h