CREAD

Requirements

CREAD has been tested on Linux systems, although the source should work on most UNIX-like systems with only very slight modifications. Compiling CREAD requires GCC version 3.4 or greater. Currently command line options are parsed with the GNU popt library, which is usually installed already on Red Hat or Fedora machines. It is freely available at freshmeat.net. To see what version of GCC you have, and if libpopt is installed in a suitable place, try the following commands:

gcc --version
whereis libpopt

Your output should look something like this:

SCREEN SHOT

In the image above, the version of GCC is 3.4.2, and libpopt is visible, which is indicated by the fact that filenames are given as output to the whereis command.

Compiling CREAD

Unpack the tarball and change into the unpacked directory:

tar -zxvf cread.ver.tgz
cd cread

where ver is the number of the version of cread you are installing. To build the programs, run

make
make install

which will first compile all the programs and libraries, then will create a cread/bin directory containing all the compiled programs, and the cread/include and cread/lib directories, for the headers and static and dynamic libraries (used by developers), respectively.

Environment variables

If the popt library has been installed in a standard place, CREAD can be compiled and used without modifying any environment varialbes. It is easiest, however, to put the cread/bin directory in your path, making the programs more accessible, and giving simple access to the man pages. If you use a BASH shell derivative, just do

export CREAD=/path/to/cread
export PATH=$PATH:$CREAD/bin

If you are using a CSH derivative, do

setenv CREAD /path/to/cread
setenv PATH $PATH:$CREAD/bin

If you want to use the CREAD development libraries, you will additionally need to set your library path with the command

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CREAD/lib

for BASH shells; if you use a CSH shell, then use the command

setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:$CREAD/lib

If you want these settings each time you login, put the above commands in your ~/.bashrc file (for BASH shells) or your ~/.cshrc (for CSH shells).

Optionally compiling with GSL libraries

The GNU Scientific Library (GSL) is used for many of the statistical calculations. Some programs and libraries require GSL, other will compile without GSL but will not have certain functionality without it. GSL is freely available from gnu.org. If you want to check to see if you have GSL already installed in a place where it can be used, try the following commands:

whereis gsl
whereis libgsl

If you get output, like in the image below, that specifies filenames, you will be able to compile using the GSL.

SCREEN SHOT

If you install GSL yourself, don't forget to update your LD_LIBRARY_PATH environment variable to contain the location where you install GSL.

To enable GSL you must change a variable in the file cread/Makefile. The first four lines of cread/Makefile will initially look something like this:

# makefile for CREAD

# Change the 0 below to a 1 if you have GSL
GSL = 0

To enable using GSL, change the file at the fourth line so that it looks like this:

# makefile for CREAD

# Change the 0 below to a 1 if you have GSL
GSL = 1

Notes

I have been informed that in order to compile cread on CentOS 4 x86_64, the -fPIC flag must be set in the CFLAGS variable in src/Makefile.