The instructions cover unpacking the SNARK05 distribution, building SNARK05 executables and associated libraries, and installing all appropriate files. Following these installation instructions, there is a section describing the post-installation customization (specifically, the setting of environment variables) that each user must carry out prior to using the various SNARK05 executables.

Note: In the example commands listed in the instructions,

 

  1. Special Instructions for Cygwin Users
  2. Preparing to Install
  3. Building and Installing
  4. Setting Environment Variables
  5. Notes


  6. (*Note: SNARK05 installation relies on the GNU archiving utility 'tar'. For information on determining whether or not your computer has GNU 'tar' installed, and if not, where to obtain it, see the notes section at the bottom of this page. The notes section also contains information on obtaining GNU 'gzip/gunzip', another utility possibly needed for unpacking SNARK05, depending on which package format you've obtained.)

I. Special Instructions for Cygwin Users

The following instructions were tested under Windows 2000 Professional (32-bit) on an AMD64 as administrator for cygwin DLL version 1.5.19-4. For NT-based Windows (XP, 2000, ...), you must be an administrator (or power user) to install snark05, snark05Input & snark05Display.

Cygwin has to be installed in a specific manner in order for this to work. To begin that process, make sure that you have no remnants of cygwin on your system. Follow the instructions below to install the cygwin. In case you need it, additional help with installing and uninstalling cygwin is available at http://www.cygwin.com/faq/faq.setup.html.

NOTE: User names containing spaces or special characters create problems with cygwin. See http://www.cygwin.com/faq/faq.setup.html for instructions on how to fix this problem.

Download the cygwin setup package from http://www.cygwin.com. When you execute setup, you will be asked to select a mirror site to download the bulk of the cygwin environment. We have found that there are problems when downloading from some of the mirrors. At the time that this was written http://mirror.mcs.anl.gov has been found to be a reliable mirror.

 

NOTE: In case you see more then one version of the same product then download the latest stable version of that product.

After cygwin is successfully installed and started, it is recommended for you to run:

$ startx

and work only in the xterm that just pops up, including for purposes of editing ~/.bashrc file (referred in Section IV). But you MUST use startx to execute snark05Input and snark05Display.

WARNING:

If you had an older version of cygwin installed and reinstalled it following these instructions, you may receive the error message:

: command not found

when starting cygwin.  This is because your .bashrc file is in the DOS format.  The newer versions of cygwin require that the .bashrc be in the UNIX format.  To fix the problem, immediately enter the command:

$ dos2unix .bashrc

then exit cygwin and start it again.

NOTE FOR ADMINISTRATORS:

In order to install snark05, snark05Input & snark05Display for all the users of the system you need to add the installation path to the .bashrc file of each user. See Section IV for details. Further the file '/tmp/XWin.log' a.k.a. 'C:\cygwin\tmp\XWin.log ' is created when a user starts a cygwin X session which should be deleted when the X session is closed. But it is not being deleted (may be due to a bug in cygwin) automatically.  This file must be deleted manually some time after the last X session is closed in order to allow other users to start X session.
 



II. Preparing to Install:

1. Move to the directory where the SNARK05 package is located.  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.)

NOTE: In case of cygwin you can save the tarballs in the directory 'C:\cygwin\tmp'.


2. Once in the same directory as the downloaded package, you must either untar or both untar and unzip the package, depending on which file format you downloaded.

If you downloaded the uncompressed version (*.tar), then you can extract SNARK05 simply by typing the following at the command prompt:

$ tar -xvf snark05.06.05.31.tar

(The numbers '06','01' and '16' refer to the version of the installation package, and may be different in the name of the file you downloaded. In general the name of the tar file is 'snark05.YY.MM.DD.tar')

If, on the other hand, you downloaded the compressed version (*.tar.gz), then you have two options for extracting SNARK05.

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 decompress the archive file and extract SNARK05 in one step. To do this, type the following at the command prompt:
$ tar -xvzf snark05.06.05.31.tar.gz

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

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

For information on GNU 'tar' and 'gzip/gunzip', see the notes section at the bottom of this page.


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


4.Continue with Building and Installing (below).




III. Building and Installing:

(*Note: The following Instructions are adapted from the file 'INSTALL', located in the SNARK05 root directory.)

BUILDING SNARK05

SNARK05 has been tested on Linux and cygwin platforms. If you are building SNARK05 on some other platform, you will have to modify the configure.ac and run the bootstrap script to recreate the configure script. Instructions for doing this are beyond the scope of this note.

The default location of the SNARK05 installed products is /usr/local/snark05. Root permission is required in order to install in this directory. A local installation is also possible by specifying the --prefix option to configure.

Cygwin users

Run the commands:

$ ./configure  [--prefix=<directory name>]
$ make
$ make install

NOTE: The "prefix" parameter is optional and is needed only if you want to change the default installation directory ('/usr/local/snark05').


Linux/Unix users


To build SNARK05 and install it in '/usr/local/snark05', run the commands:

$ ./configure
$ make
$ su
$ make install
$ exit


If a local installation is desired, run the commands:

$ ./configure --prefix=$HOME/snark05
$ make
$ make install
NOTE: prefix directory must be different from the directory where you have unpacked the tarballs.


IV. Setting Environment Variables


Upon completion of installation, the 'snark05' and 'snark05Experimenter' executables will be located in the directory that you either specified or allowed the install script to choose for you.  (The default installation location for these executables is '/usr/local/snark05/bin'.)  This directory will also be the location of the scripts 'snark05GetUserAlg'  , 'snark05GetExperimenter', and 'snark05GetExamples', described briefly below. Furthermore, there will be four shared object files (libDIGFile.so, libDIGFileSnark.so, libDIGRand.so, and libxerces-c.so) placed in the library installation directory (which by default is '/usr/local/snark05/lib').

In order for the SNARK05 executables to be invoked and linked properly when typed at the command prompt, each user must set the PATH and LD_LIBRARY_PATH environment variables to include the executable and library installation directories specified during installation (i.e. during the execution of ' snark05install'). If the user did not explicitly specify any such directories, then these directories will be the defaults:
   /usr/local/snark05/bin    (to be added to PATH)
   /usr/local/snark05/lib    (to be added to LD_LIBRARY_PATH)
(Note: It is possible that the user chose installation directories that are already specified in the PATH and LD_LIBRARY_PATH variables. 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 $PATH
$ echo $LD_LIBRARY_PATH
 

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

The following describes how to set the variables PATH and LD_LIBRARY_PATH to be carried out as non-superuser, for users of bash as well as csh. (NOTE: Users of cygwin should be using bash and not 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 PATH and LD_LIBRARY_PATH variables are colon-separated lists of directories. Edit the ~/.bashrc file by appending the following three lines (if  .bashrc does not exist in your home directory then you will have to create it.):
export SNARK05ROOT=/usr/local/snark05
export PATH=$PATH:$SNARK05ROOT/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNARK05ROOT/lib


csh
For csh users, the PATH and LD_LIBRARY_PATH variables are space-separated lists of directories. Edit the ~/.cshrc file by appending the following lines (if .cshrc does not exist in your home directory then you will have to create it.):

setenv SNARK05ROOT /usr/local/snark05
if ($?PATH) then
    setenv PATH ${PATH}:${SNARK05ROOT}/bin
else
    setenv PATH ${SNARK05ROOT}/bin
endif
if ($?LD_LIBRARY_PATH) then
    setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${SNARK05ROOT}/lib
else
    setenv LD_LIBRARY_PATH ${SNARK05ROOT}/bin
endif

NOTES:

  • If you have installed in a different location then change the value of the SNARK05ROOT to the appropriate directory.
  • After changing the file (.bashrc or .cshrc) type the following in the current terminal:

 For bash users

$ dos2unix ~/.bashrc
$ source ~/.bashrc

 For csh users

$ source ~/.cshrc


Once the installation directories have been added to the system's PATH and LD_LIBRARY_PATH variables, 'snark05', 'snark05Experimenter', 'snark05GetUserAlg', 'snark05GetExperimenter', and 'snark05GetExamples' can each be invoked from anywhere in the system simply by typing at the command prompt:

$ snark05
$ snark05Experimenter
$ snark05GetUserAlg
$ snark05GetExperimenter
$ snark05GetExamples

For more information regarding the usage of  'snark05GetUserAlg', click here.  
For more information regarding the usage of  'snark05GetExperimenter', click here.  
For more information regarding the usage of  'snark05GetExamples', click here.



V. Notes:

GNU tar
As mentioned above, SNARK05 installation 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 SNARK05 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.


For more information about SNARK05 and its installation, please refer to the files README and INSTALL, both located in '/tmp/snark05' (in case you have expanded the tarballs in some different location then you should look at the appropriate place).