Installation Instructions

Installation Instructions

Bernie Simon

11 October 96


Installation of the newcdbs package starts with retrieving the tar file and unpacking it. To do this, first create a top level for cdbs. Then, copy the tar file from the anonymous ftp area into this directory and unpack the tar file with the command:

tar -xvf newcdbs.tar

This package links with the STSDAS and IRAF libraries, so you must first determine if these libraries are present. The standard places to look for these libraries on Unix and VMS systems are:

LibraryFile
C interface/usr/stsci/stsdasx/lib/libcvos.a
Tables/usr/stsci/tablesx/lib/libtbtables.a
Images/usr/stsci/irafx/lib/libex.a
IRAF system/usr/stsci/irafx/lib/libsys.a
Vector/usr/stsci/irafx/lib/libvops.a
OS interface/usr/stsci/irafx/unix/hlib/libos.a

LibraryFile
C interfacestsdasdisk:[stsdasx.lib]libcvos.a
Tablesstsdasdisk:[tablesx.lib]libtbtables.a
Imagesirafdisk:[irafx.lib]libex.a
IRAF systemirafdisk:[irafx.lib]libsys.a
Vectorirafdisk:[irafx.lib]libvops.a
OS interfaceirafdisk:[irafx.vms.hlib]libos.a

If these libraries are not present on your system, you will have to ask the STSDAS system administrator (Ray Williamson) to install them. If they are present, but in a nonstandard place, you will have to edit the makefiles.

There are two macros, defined in the file system.h, which may need to be modified on your system after installation. This file is locate in the include subdirectory under the top level directory. The data files used by the CDBS tasks are located in the directory specified by the macro DATADIR. Three other The standard location for this directory is in the data subdirectory under the top level directory. The other macro which may need to be modified in system.h is CDBSDIR. This macro specifies the top level directory for the cdbs reference files and should have the same value as crrefer$ does within the iraf environment.

There are different make files for each combination of hardware and operating system the package must compile under. The extension of the make file indicates which system it is meant for. The supported systems are Sun Solaris (.ssun), Sun SunOS (.sparc), VAX VMS (.vax), and Alpha VMS (.alpha). Since the name of the make file is nonstandard, the make command must be run with the appropriate flag. For example, the command

make -f makefile.ssun
runs the Solaris version of the make file and the command
mms /descrip=makefile.vax
runs the Vax version. The top level make file for the package can be found in the src subdirectory. It will compile and link all the libraries and tasks by calling their individual make files recursively. Alternatively, you can run the make file in the library or task directly if you do not want to update the whole system.

The individual library and task make files contain a user configurable set of macros at the top. These macros control the compiler used and the compilation flags, the location and name of the executable, and the library locations. Here is an example from one of the make files:

# Name of compiler and compilation flags
CC = /usr/lang/acc
INC = -I../../include -I/usr/stsci/stsdasx/lib
CFLAGS = -g $(INC)

# Location and name of executable and libraries

BIN = ../../bin
LIBDIR = ../../lib

EXEC = $(BIN)/certify
LIB = $(LIBDIR)/certify.a
You should update the appropriate macro to change the defaults.

The executables are stored in the bin subdirectory. Under Unix, these executables can be made available by adding this directory to your path. This can be done by adding lines like the following to your .login or .cshrc file.

setenv CDBSDIR /data/lilac1/bsimon/iraf/newcdbs
set path=($CDBSDIR/bin $path)

The environment variable CDBSDIR is installation dependent and must be changed according to where you have installed CDBS.

On VMS systems, the executables must be defined as symbols. A DCL command file which define these symbols can be found in the util subdirectory as defines.com. The symbols use the logical CDBSDIR, which defines the top level CDBS directory. This logical is installation also dependent, as in the Unix case.

The tasks which access the CDBS database use two environment variables, CDBS_SERVER and CDBS_DB. These define the name of the database server and database, respectively, and should be set to the database you are using. The files defines.* in the util subdirectory contain these definitions for the different operating systems and should be modified according to where the CDBS code and database are installed. Sourcing one of these files will make the proper definitions. Here is an example of the csh define file.

# The definition of cdbs_top is installation dependent

setenv CDBS_TOP /data/lilac1/bsimon/iraf/newcdbs/
setenv CDBS_SERVER ROBBIE
setenv CDBS_DB cdbs_dev

The directory test/script contains Unix shell test scripts for the CDBS tasks. These scripts expect the logical CDBS_TOP to be defined, so the scripts can find the test data directory. This environment variable defines the top level CDBS directory and is defined by the define files mentioned above.


Back to top page.