Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

Installing the Package

Platforms

CCfits was originally developed and tested primarily on Solaris using the SunPro CC compiler 5.1 [Sun Workshop/Forte 6.0] prior versions of SunPro CC will not compile CCfits as they do not support templated member functions.

CCfits has also been built and tested on Linux on the RedHat 8.0, 7.x, 6.2 distributions using g++ 2.95.3 and 3.0, and on OSF1 v. 4.0D with g++ /2.95.3. Windows 2000/VC++.net, and Mac OSX (g++ 3.1) CCfits will also build with gcc 2.95.2.

In summary, this release has been tested on the following platforms:

Platform Compiler Optimization
Solaris 7 SunPro CC 5.1, 5.3 -g and -fast
Linux/RedHat 8.0,7.x,6.2 g++ /2.95.3, 3.0.x, 3.1, 3.2.x -g -O2
Windows 2000 VC++.net see below
Mac OS X / Darwin 6.4 g++ 3.1 not gcc 3.2.2 (see below)

Previous versions have also been tested on the following platforms. This release has not been exercised on these, but should still work (please let us know if not!).

Platform Compiler Optimization
OSF1/4.0D g++ /2.95.3 -g -O2
HP-UX 10.20 g++ /2.95.x -g -O2
AIX kcc (use Makefile.kcc)

N.B. For exception support, the g++ compiler needs to be built with threads enabled (--enable-threads or similar option). While this is supposed to be the default on some platforms, it is wise to ensure that it is turned on by explicitly specifying it when the compiler is (re)-built. If this is not done, CCfits may dump core whenever the first exception is thrown in your code.

Not yet supported are: Solaris with gcc compilers (builds, standard library related run time error in test program).

To build and install CCfits from source code on a UNIX-like (e.g. UNIX, Linux, or Cygwin) platform, take the following steps.

Autogen

If you obtained the source from the CVS repository, you need to do this first step. If you obtained the source from a gzipped tar file, skip to the step 2.

If you want to do a build with a compiler other than GCC, then you need to turn off automatic dependency generation which only works with GCC. Edit the Makefile.am file by adding `no-dependencies' to the line

AUTOMAKE_OPTIONS = foreign

If you do not do this, some options will be passed to compiler that it might not understand. At least with the Sun C++ compiler, these options are ignored but lead to a warning message for each file that is compiled. Other compilers may treat it as an error.

Type in the following in the toplevel source directory:

> ./autogen

autogen is a UNIX shell script that runs a series of commands in a particular order. It requires automake, autoconf and libtool to be installed on your system.

Note that you will obtain the following message after running 'autogen':

configure.in: 36: required file `config/ltconfig' not found

Disregard this message. It is not an error.

Configure

By default, the g++ compiler and linker will be used. If you want to compile and link with a different compiler and linker, you can set some environment variable before running the configure script. For example, to use Sun's C++ compiler, do the following if you are a csh user:

> setenv CXX CC

and the equivalent if you are not. You can set the absolute path to the compiler you want to use if necessary.

By default, the configuration sets the compiler optimization flags environment variable to -g -O2 for g++ and -g for other compilers. If you wish to override this (for example, to use -O4 or -fast for SunPro CC or to switch off the optimization on g++), set this variable before running configure.

CCfits requires that the `cfitsio' package, version 2.4 or later, is available on your system. The configure script that you will run takes an option to specify the location of the cfitsio package. The current version has been tested with cfitsio v2.410.

If the `cfitsio' package is installed in a directory consisting of a `lib' subdirectory with the libcfitsio.a file and a `include' subdirectory with the fitsio.h file, then you can run the configure script with as single option. For example, if the cfitsio package is installed in this fashion in ``/usr/local/ftools' then the configure script option will be...

--with-cfitsio=/usr/local/ftools

If the `cfitsio' package is not installed in the above manner, then you need to run the configure script with two options, one to specify the include directory and the other to specify the library directory. For example, if the cfitsio package was built in `/home/user/cfitsio' then the two options will be...

--with-cfitsio-include=/home/user/cfitsio --with-cfitsio-libdir=/home/user/cfitsio

You have the option of carrying out the build in a separate directory from the source directory or in hhe same directory as the source. In either case, you need to run the `configure' script in the directory where the build will occour. So for example, if building in the source directory with the `cfitsio' directory in `/usr/local/ftools' then the configure coammand should be issued like this...

> ./configure --with-cfitsio=/usr/local/fttools

If you do the build in separate directory from the source, you may need to issue the configure command something like this...

> ../CCfits/configure --with-cfitsio=/usr/local/fttools

The configure script will create the Makefile with the path to the compiler you choose (or GCC by default), and the path to cfitsio package. The configure script has other options, just as the install location. To see this options type

> ./configure --help

Build

Building the C++ shared library will be done automatically by running make without arguments like thus... On platforms (e.g. OSF) that have a native make program, use of gnu make (gmake) only is supported. On linux, make and gmake are usually synonymous.

> gmake

This will also build the cookbook executable.

To build on Solaris using the compiler's optimizer, we recommend

> gmake CXXFLAGS=-fast

or

> gmake CXXFLAGS=-O4

[the -fast option will select the best optimization for the particular machine you are compiling on, which may not be the best option if your network is heterogeneous, with SparcStations and Ultra-based workstations of various vintages].

Finally, type in the following to generate the html documentation...

> gmake docs

This will create a directory in your current directory called /html, and all of the html documentation will be created in this directory. The tool `Doxygen' (http://www.doxygen.org) is required to create the documentation. Executing this won't -quite- give you a manual identical to the one you are reading. However, this option will allow the reader familiar with doxygen to gain additional information about the implementation by playing with the Doxyfile. This may be of utility to users interest in contributing to the library.

Install

To install, type...

> make install

The default install location will be /usr/local/lib for the library and /usr/local/include for the header files. You can change this with the --prefix option when you configure, or with something like...

> make DESTDIR=/usr/local/ftools install

Mac OS X / Darwin

CCfits 1.2 will compile on Mac OS X / Darwin on kernel 6.4 with gcc 3.1. We have not tested the release with any other kernel version as yet. The procedure is the same as for Linux (above). However since at time of release there appears to be a problem linking using with the current g++ 3.2.2 version, regrettably it cannot be supported.

Windows/Visual C++

Compiling CCfits with MS VC++ requires VC++ 7.0 or later. This is the compiler that comes with Visual Studio.NET. Earlier versions of the compiler has too many defects in the area of instantiating templates.

Take the following steps.

1. Compile the C++ code. Open the vs.net/CCfits/CCfits.sln file with Visual Studio.NET. The includes paths have been set to find the cfitsio build directory at the same level as the CCfits directory. If this is not the case, use Visual Studio.NET to edit the include paths and extra library paths to where you have cfitsio installed.

Next, just use the build icon or the build menu item.

To build the test program, cookbook, use the vs.net/cookbook.cookbook.sln file


Generated at Fri Apr 11 16:05:13 2003 for CCfits by doxygen1.2.7 written by Dimitri van Heesch, © 1997-2001