installation.html
10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!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" 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">
> 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">
> 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">
> ./configure<br>
> make<br>
> make check<br>
> 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. </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">
> ./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">
> ./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 <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ürgen
Knödlseder 16 July
2011
</p>
</body></html>