file: LINUX.TXT G. Moody 1 February 1995 Last revised: 24 April 1997 Notes on compiling the DB Software Package under Linux Copyright (C) Massachusetts Institute of Technology 1997. All rights reserved. First copy this entire directory tree to a writable file system, and make a copy of the appropriate `make' file. This can be done, for example, by the commands: mkdir -p /usr/local/src/db tar cfv - . | ( cd /usr/local/src/db; tar xfv - ) cd /usr/local/src/db cp Makefile-linux Makefile You may use any writable directory instead of /usr/local/src/db. Follow the instructions in `Makefile' to compile and install the DB Software Package. In most cases, you will need root permissions. If you wish to install the DB Software Package on a system for which you do not have root permissions, edit `Makefile' to specify alternate installation directories. The standard installation procedure, using `Makefile', performs nested makes in each of the major subdirectories of this one. If you wish to perform only a partial installation, you may prefer to work with the `Makefile' files in each subdirectory. Be aware that values specified in the master `Makefile' override those specified in the individual Makefiles whenever you run nested makes from this directory; if you change values in the individual Makefiles be sure to change them in the master `Makefile' as well to avoid confusion. Under Linux, it is also possible to produce MS-DOS binaries of most of the DB Software Package, if you have installed the `gcc-dos' cross-compiler. See `MSDOS.TXT' for further information. About ELF and a.out binary formats ---------------------------------- Two formats have been used for binary executables under Linux. The older format (a.out or COFF) is now considered obsolete; it has been replaced by ELF. Many current Linux distributions support both formats. If your version of Linux supports ELF binaries, simply follow the instructions in `Makefile' to compile and install the DB Software Package (but see the note about libdb.so.2 below). If you have an older version of Linux with support for a.out binary format only, you will need to have installed the `tools-2.16' package (or a later version) in order to compile a shared DB library. The `tools-2.16' package provided with CD-ROM distributions of this package in the `software/linuxmsc' directory; it may also be obtained by anonymous FTP from ecg.mit.edu or tsx-11.mit.edu. To make an a.out shared DB library, make "LIBTARGETS = dblib slib-linux link-incdir link-libso" If you encounter problems while building slib-linux, see the comments in lib/mkshlib.lnx. It is recommended that you consider upgrading to a version of Linux with ELF support instead. About libdb.so.2 ---------------- You may already have a file named /usr/lib/libdb.so.2.0.0, now appearing in many Linux distributions, which is totally unrelated to the DB Software Package. This library includes code from BSD 4.4 that implements functions in the dbm library on other versions of UNIX. The use of the name libdb.* is unfortunate, but ours was the first to use the name (in 1980, on V6 UNIX for the PDP-11), so there! :-b The next major release of our library will feature a new name to avoid this problem. For now, it is possible to work around this impostor by running `make db2-prep' before installing the DB Software Package (this is done by default if you follow the instructions in the `Makefile'). This should not cause problems with existing software that uses libdb.so.2.0.0. If you need to (re)compile any such software, however, you should link it explicitly to libdb.so.2 (provide the full name of the library to the compiler, rather than simply the abbreviated form -ldb, which links to the MIT DB library).