This page contains general notes and instructions regarding the installation of the DIG libraries. (For download and installation instructions specific to the all-in-one package or to any particular individual library package, visit the package's own page: all-in-one, DIGFile, DIGFileSnark, DIGRand, PRJFile)


Contents:
  1. Order of Installation
  2. GNU tar & gzip/gunzip
  3. Unpacking Source Code
  4. Setting Environmental Variables


  1. Order of Installation:


    When installing from the individual library packages, order of installation *is* important. Both DIGFileSnark and PRJFile depend on the DIGFile library. Therefore, DIGFile must be installed prior to these two libraries.



  2. GNU tar & gzip/gunzip:


    GNU tar
    Installation of the DIG libraries relies on the GNU version of the 'tar' archiving utility. To determine whether or not your computer's default 'tar' is the GNU version (as opposed to some native version), type the following at the command prompt:
    $ tar --version

    The output will indicate which version of 'tar' you are using. If it is indeed GNU 'tar', then it will give you output like the following:
    "tar (GNU tar) 1.13.25 Copyright © 2001 Free Software Foundation, Inc. ..."

    If it is not the GNU version, it is still possible that your machine has the GNU version installed. For example, on some machines, GNU 'tar' can be found at '/usr/local/bin/tar', while native 'tar' is located at '/usr/bin/tar'. You may want to use your computer's search command ('locate', 'find', etc.) to find all installed 'tar' executables, and then invoke each one with the '--version' option (as illustrated above) to determine whether or not it is GNU.

    If GNU 'tar' does not exist on your machine, then you can obtain it from http://www.gnu.org/software/tar/tar.html. Instructions for downloading and installing the utility can be found on that site.


    GNU gzip/gunzip
    It is possible that, during the installation process, you will need the GNU 'gzip'/'gunzip' utility. If this is the case, and if neither 'gzip' nor 'gunzip' seem to exist on your machine, then you can obtain them from http://www.gnu.org/software/gzip/gzip.html. Instructions for downloading and installing the utility can be found on that site.



  3. Unpacking Source Code:


    1. Move to the directory where you downloaded the library file.  For example, if you had intended not to permanently keep the installation package on your hard drive after completing installation, and thus saved the package in the directory '/tmp/', then you would type the following at the command prompt:
    $ cd /tmp

    (If the package is saved in a different location, replace '/tmp' with the path of the directory containing the downloaded package.)


    2. Once in the same directory as the downloaded package, you must both untar and unzip the package. You have two options for extracting the source code.

    The first option (only valid for newer versions of GNU 'tar' that provide the option of filtering the archive file through the GNU 'gzip' utility) is to uncompress the archive file and extract in one step. To do this, type the following at the command prompt (replacing 'INSTALL_PACKAGE.YY.MM.DD' with the actual package name):
    $ tar xvzf INSTALL_PACKAGE.YY.MM.DD.tar.gz

    The second option (and only option for older versions of GNU 'tar') is to uncompress and then extract, in two separate steps, by typing the following at the command prompt:
    $ gunzip INSTALL_PACKAGE.YY.MM.DD.tar.gz
    $ tar xvf INSTALL_PACKAGE.YY.MM.DD.tar

    (Note that 'gunzip' may be replaced by 'gzip -d'.)

    For information on GNU 'tar' and 'gzip/gunzip', see the GNU tar & gzip/gunzip section, above.


    3. Move into the root directory of the library by typing the following at the command prompt:
    $ cd DIG_LIBRARY




  4. Setting Appropriate Environmental Variables


    There will be shared object files placed in the library installation directory (which by default is '/usr/local/lib').

    In order for executables to link properly to the newly installed shared object files, each user must set the LD_LIBRARY_PATH environmental variable to include the library installation directory specified during installation. If the user did not explicitly specify any such directory, then this directory will be the default:

       /usr/local/lib

    (Note: It is possible that the user chose installation directories that are already specified in the LD_LIBRARY_PATH variable. To determine if this is the case, type the following at the command prompt, and check if the list of directories includes those selected during installation:

       echo $LD_LIBRARY_PATH

    If the variable contains the appropriate directory, it need not be reset.)

    (It is also possible that the 'lib' dir is not in LD_LIBRARY_PATH but is one of the system library directories that does not need to be added to LD_LIBRARY_PATH, such as the default /usr/local/lib. If this is the case, no action is needed by the user.)

    The following describes how to set the LD_LIBRARY_PATH variable (to be carried out as non-superuser), for users of bash as well as csh. The default installation directories will be used in this discussion, and should be replaced by the actual installation directories if different.

    bash
    For bash users, the LD_LIBRARY_PATH variable is a colon-separated list of directories. Modify the .bashrc file by adding the following line:
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

    csh
    For csh users, the LD_LIBRARY_PATH variable is a space-separated list of directories. Modify the .cshrc file by adding the following line:
    set LD_LIBRARY_PATH = ($LD_LIBRARY_PATH /usr/local/lib)