file: SUN.TXT G. Moody 30 July 1989 Last revised: 15 April 1997 Notes on compiling the DB Software Package under Solaris or SunOS 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-solaris Makefile (or `cp Makefile-sunos 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. Since Solaris does not include a bundled C compiler, `Makefile-solaris' assumes that you have installed the free GNU C compiler (available by anonymous FTP from prep.ai.mit.edu and many other sources). If you have installed an unbundled C compiler from Sun or another vendor, be sure to change `CC' in `Makefile'. In any case, be sure that your C compiler is installed before attempting to compile the DB Software Package! The DB Software Package has been tested on Sun-3, Sun 386i, and Sun-4 (SPARC) workstations running SunOS 4.0 and later versions, and on SPARCstations running Solaris 2.0 and later versions. If you are installing the DB software package on a Sun 386i, read the section below on Sun 386i installations before continuing. A bug in several versions of SunOS will cause a system crash if you attempt to use `mv' to copy files between file systems. The `Makefile' files in this distribution have been constructed to avoid this bug; do not attempt to `improve' them by combining `cp' and `rm' commands. As supplied, the `Makefile' generates two versions of the DB library: a standard, statically-bound (.a) library, compiled without optimization but with symbols for debugging, and a shared, dynamically-bound (.so) library, compiled with optimization and without symbols for debugging. You can debug applications that are loaded with either the standard or the shared library using `dbxtool', but you can debug the DB library itself only if you have loaded the standard library. Using the shared library will result in more compact executable files, and will save time and memory if you execute two or more programs that use the library at the same time. If you build both the standard (.a) library and the shared (.so) library, the latter is used by default unless you use `-Bstatic' before `-ldb' when compiling applications. Note that you will need to change the version number in `Makefile' and in `lib/makefile' if you recompile the shared library after making incompatible changes in the sources. If you wish to develop your own applications (or modify those in this package) using ANSI C or C++, see the comments in `Makefile' about using the freely available GNU C/C++ (`gcc') compiler. Most of the recent development of the DB library and applications has been done on SPARC workstations; at irregular intervals, the package has also been tested on Sun-3 and Sun 386i workstations and on SPARC-based workstations made by Solbourne and other manufacturers. I would greatly appreciate a report of any problems you encounter in installing or using this software on a Sun workstation or compatible, if possible by e-mail to george@hstbme.mit.edu, or to: George B. Moody MIT Room 20A-113 Cambridge, MA 02139 USA Special notes on Sun 386i installations --------------------------------------- If you are installing the DB software package on a Sun 386i, you may find that the standard C include directory (/usr/include) and the standard directory for `lint' libraries (/usr/lib/lint) reside on a read-only file system. Check to see if this is the case by running the command /etc/mount The output should include a line of the form /dev/... on /usr type xxx (rw) If `mount' shows that the /usr file system is read-only (`(ro)' rather than `(rw)'), halt any background jobs you may be running, get any other users to log off of the machine, and (as `root') type: /etc/mount -o remount,rw /usr to remount the /usr file system so it is writeable. Make the following symbolic links: ln -s /usr/local/include/ecg /usr/include ln -s /usr/local/lib/lint/llib-ldb.ln /usr/lib/lint (Note that the first file argument of each `ln' command specifies a file that will only be created later on.) If you had to remount the /usr file system, reboot your system to restore /usr to read-only status. (Rebooting seems to be the only way to do this; if you figure out a less drastic method, please let me know.) You may do the remainder of the installation following the procedure for other Sun workstations outlined above. If you upgrade your operating system, you may have to remake these symbolic links if the upgrade has the effect of rebuilding the /usr file system from scratch; if the upgrade also destroys the previous contents of /usr/local, it may be simplest to repeat the entire installation procedure.