installation.html 10.8 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Installation</title>

<link href="ctatools.css" media="screen,print" type="text/css" rel="stylesheet">
</head>
<body>
<p class="Header">Installation</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
<a href="#Step_1:_Install_GammaLib">Step 1: Install
GammaLib</a>
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
<a href="#Step_2:_Setup_GammaLib_environment">Step 2:
Setup
GammaLib environment</a>
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
<a href="#Step_3:_Install_ctatools">Step 3: Install
ctatools</a>
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
<a href="#Step_4:_Setup_ctatools_environment">Step 4:
Setup
ctatools environment</a>
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Known_Problems">Known Problems</a></p>
<p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Getting_Help">Getting Help</a></p>
<br>
<p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-weight: bold;">
Note:</span> These installation instructions apply to
<span style="font-family: Courier New,Courier,monospace;">ctatools-00-02-04</span>
or later.
</p>
<br>
<p class="Title"><a name="Step_1:_Install_GammaLib"></a>Step
1: Install GammaLib</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">ctatools
depends on GammaLib and thus GammaLib needs to be installed on your
system prior to installing ctatools. If you do not have GammaLib
installed, or if you need to upgrade GammaLib, fetch the latest copy
from <a href="https://sourceforge.net/projects/gammalib/" target="_blank">https://sourceforge.net/projects/gammalib/</a>
and
follow the GammaLib installation instructions on
<a href="http://gammalib.sourceforge.net/" target="_blank">http://gammalib.sourceforge.net/</a>.
<br>
<br>
</p>
<p class="Title"><a name="Step_2:_Setup_GammaLib_environment"></a>Step
2: Setup GammaLib environment</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">Before
building and installing ctatools, you have to configure GammaLib by
setting up some
environment variables.
This will be done automatically by an initialisation script that is
found in the <span style="font-family: Courier New,Courier,monospace;">bin</span>
directory of the GammaLib directory (we call here "GammaLib
directory"&nbsp;the directory into which GammaLib has been
installed). Assuming that you have installed GammaLib in the default
directory
<span style="font-family: Courier New,Courier,monospace;">/usr/local/gamma</span>
you need to add the following to your <span style="font-family: Courier New,Courier,monospace;">$HOME/.bashrc</span>
or <span style="font-family: Courier New,Courier,monospace;">$HOME/.profile</span>
script on a Linux
machine:
</p>
<p class="Code">export GAMMALIB=/usr/local/gamma<br>
source $GAMMALIB/bin/gammalib-init.sh
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">If
you use C shell or a variant then add the following to your
<span style="font-family: Courier New,Courier,monospace;">$HOME/.cshrc</span>
or <span style="font-family: Courier New,Courier,monospace;">$HOME/.tcshrc</span>
script:
</p>
<p class="Code">setenv GAMMALIB /usr/local/gamma<br>
source $GAMMALIB/bin/gammalib-init.csh </p>
<br>
<br>
<p class="Title"><a name="Step_3:_Install_ctatools"></a>Step
3: Install ctatools</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">After
downloading the ctatools tarball, save it in an appropriate location
(for example <span style="font-family: Courier New,Courier,monospace;">/usr/local/gamma/src</span>),
and type</p>
<p class="Code">
&gt; tar xvfz ctatools-00-02-04.tar.gz
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">Step
in the created directory using
</p>
<p class="Code">
&gt; cd ctatools-00-02-04
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
and build and install ctatools by typing</p>
<p class="Code">
&gt; ./configure<br>
&gt; make<br>
&gt; make check<br>
&gt; make install
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
at the operating system prompt.
The <span style="font-family: Courier New,Courier,monospace;">./configure</span>
command customizes the Makefiles for the particular
system,
the <span style="font-family: Courier New,Courier,monospace;">make</span>
command compiles the source files and builds the executables, the the <span style="font-family: Courier New,Courier,monospace;">make
check</span> command performs a system test, and
the <span style="font-family: Courier New,Courier,monospace;">make
install</span> command installs the executables in the <span style="font-family: Courier New,Courier,monospace;">bin</span>
directory.
Type <span style="font-family: Courier New,Courier,monospace;">./configure</span>
and not simply <span style="font-family: Courier New,Courier,monospace;">configure</span>
to ensure that the
configuration
script in the current directory is run and not some other system-wide
configuration
script.&nbsp;</p>
<br>
<p style="padding-top: 0pt; text-align: left;" class="Body">By
default, the install directory is set to
<span style="font-family: Courier New,Courier,monospace;">/usr/local/gamma</span>.
To change the install directory, an optional <span style="font-family: Courier New,Courier,monospace;">--prefix</span>
argument should be
given,
for example:
</p>
<p class="Code">
&gt; ./configure --prefix=/usr/local
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">A
full list of configuration options can be found using</p>
<p class="Code">
&gt; ./configure --help
</p>
<br>
<br>
<p class="Title"><a name="Step_4:_Setup_ctatools_environment"></a>Step
4: Setup ctatools environment</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">If
ctatools have been installed in the same directory as GammaLib (which is
the default configuration for ctatools) you are done.</p>
<br>
<p style="padding-top: 0pt; text-align: left;" class="Body">If
you decided to install ctatools in a different directory, you have to
configure ctatools by
setting up some
environment variables.
This will be done automatically by an initialisation script that is
found in the <span style="font-family: Courier New,Courier,monospace;">bin</span>
directory of the directory into which ctatools has been installed.
Assuming that you have installed ctatools into
<span style="font-family: Courier New,Courier,monospace;">/usr/local/ctatools</span>
you need to add the following to your <span style="font-family: Courier New,Courier,monospace;">$HOME/.bashrc</span>
or <span style="font-family: Courier New,Courier,monospace;">$HOME/.profile</span>
script on a Linux
machine:
</p>
<p class="Code">export CTATOOLS=/usr/local/ctatools<br>
source $CTATOOLS/bin/ctatools-init.sh
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">If
you use C shell or a variant then add the following to your
<span style="font-family: Courier New,Courier,monospace;">$HOME/.cshrc</span>
or <span style="font-family: Courier New,Courier,monospace;">$HOME/.tcshrc</span>
script:
</p>
<p class="Code">setenv CTATOOLS /usr/local/ctatools<br>
source $CTATOOLS/bin/ctatools-init.csh </p>
<br>
<br>
<p class="Title"><a name="Known_Problems"></a>Known
Problems</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
<span style="font-weight: bold; font-size: 14px;">Python
support</span>
<br>
ctatools comes with Python wrappers so that all classes can be
directly used from Python. To compile-in Python support, ctatools
needs the <span style="font-family: Courier New,Courier,monospace;">Python.h</span>
header file, which on many distributions is not
installed by default.
To make <span style="font-family: Courier New,Courier,monospace;">Python.h</span>
available, install the Python developer package
in your distribution. Otherwise you will not be able to use ctatools
from Python.
</p>
<br>
<p style="padding-top: 0pt; text-align: left;" class="Body">
<span style="font-weight: bold; font-size: 14px;">Mac OS X</span>
<br>
The Python development package is not installed as default on Mac
OS X, and consequently, the <span style="font-family: Courier New,Courier,monospace;">Python.h</span>
header file is missing that is
needed to compile in the Python bindings. The <span style="font-family: Courier New,Courier,monospace;">configure</span>
script recognises this fact and adjust the build procedure accordingly,
but you
will not be able to use ctatools from Python. So better install the
Python development package before installing ctatools.</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">It
was also reported that adding of&nbsp;<span style="font-family: Courier New,Courier,monospace;">export
MACOSX_DEPLOYMENT_TARGET=10.6</span> to the <span style="font-family: Courier New,Courier,monospace;">.bashrc</span>
file was necessary one
some Mac OS X 10.6 installations to make ctatools compile.<br>
</p>
<br>
<p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-weight: bold; font-size: 14px;">Solaris</span>
<br>
Although ctatools builds on Solaris using the Sun compiler, there are
problems with global symbols in shared libraries and exception
catching, which prevents the FITS interface to work
correctly. ctatools has however been built and tested successfully
using the GNU
compiler, and this is the only build method that is currently
supported.
Problems have also been encountered when compiling cfitsio versions
more recent than 3.250. The problems have been reported to the cfitsio
developer team, and are likely to be solved in the future. For the
time being, it is recommended to use cfitsio version 3.250 on Solaris.
</p>
<br>
<p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-weight: bold; font-size: 14px;">OpenSolaris</span>
<br>
On OpenSolaris, the same problems concerning the SunStudio compiler
occur as for Solaris, and also here, the GNU compiler is the
recommended
tool to build ctatools. Also here, cfitsio version 3.250 is the
recommended library as more recent version feature relocation
problems. ctatools has been tested using gcc 4.3.2 on OpenSolaris
2009.06. Make sure to create the symbolic links
</p>
<p class="Code">ln -s /usr/bin/gcc4.3.2 /usr/bin/gcc<br>
ln -s /usr/bin/g++4.3.2 /usr/bin/g++</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
which are not there by default to avoid excess warnings during
compilation.
</p>
<br>
<br>
<p class="Title"><a name="Getting_Help"></a>Getting
Help</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
Any questions, bug reports, or suggested enhancements related to
ctatools should be submitted to
<a href="mailto:knodlseder@cesr.fr">knodlseder@cesr.fr</a>.
</p>
<br>
<hr size="1">
<p class="Body">Last updated by: J&uuml;rgen
Kn&ouml;dlseder 16 July
2011
</p>
</body></html>