installation.html 7.51 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_environment">Step 2: Setup
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="#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-03</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_environment"></a>Step
2: Setup environment</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">Before
using GammaLib (and ctatools use GammaLib) you have to setup some
environment variables.
This will be done automatically by an initialisation script that will
be installed in the <span style="font-family: Courier New,Courier,monospace;">bin</span>
directory. 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;">.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;">.cshrc</span>
or <span style="font-family: Courier New,Courier,monospace;">.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-03.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
</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>
<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;">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 should
recognise 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"></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>
<br>
</p>
<p style="padding-top: 0pt; text-align: left;" class="Body">
<span style="font-weight: bold; font-size: 14px;">Solaris</span>
<br>
ctatools has been compiled successfully on Solaris 2.10 using the Sun
Studio compiler. However, GammaLib symbols are
not globally exported due to a strage behaviour of the Sun Studio
compiler. This prevents for example GammaLib library from catching
its own exceptions and from registering models. Consequently, many
functionnalities will not work.</p>
<br>
<p style="padding-top: 0pt; text-align: left;" class="Body">Using
gcc (version 3.4.3), ctatools and GammaLib works correctly on Solaris
2.10, yet loading ctatools or GammaLib as a Python module fails.
<br>
<br>
</p>
<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 9 July
2011
</p>
</body></html>