More details on installation pre-requisites
[u/mrichter/AliRoot.git] / html / installation.html
CommitLineData
14c31136 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
2 "http://www.w3.org/TR/REC-html40/loose.dtd">
3<HTML>
4<HEAD>
5<TITLE>Installation</TITLE>
5023a744 6
14c31136 7<link rev="made" href="mailto:Federico.Carminati@cern.ch">
5023a744 8<link rel="stylesheet" href="http://www.w3.org/StyleSheets/Core/Swiss" type="text/css">
9<STYLE type="text/css">
10
14c31136 11BODY {
12 background: #FFFFFF;
13 }
14
15COL, COLGROUP, TABLE, TBODY, TD, TR {
16 color: black;
17 text-decoration: none;
18 border-color: black;
19 border-style: none;
20 background: #FFFFFF;
21 }
22
5023a744 23TABLE.wide {
24 cellspacing: 100%;
25 background: #FF0000
26 }
27
14c31136 28</STYLE>
14c31136 29</HEAD>
30
5023a744 31<BODY>
14c31136 32<TABLE>
33<TR>
34<TD><img src="picts/MadHatter.gif" alt="ALICE Off-line Project Logo">
87ad6e14 35<TD><img src="picts/installation_name.gif" alt="Installation">
14c31136 36<TD><img src="picts/AliceLogo.gif" alt="ALICE Logo">
37</TR>
38</TABLE>
39
4c505702 40<H2><A NAME="#Content">Content</A></H2>
41<UL>
b813c727 42<LI><A HREF="#Prequisites">Prerequisites</A>
4c505702 43<LI><A HREF="#Installation">Installation</A>
44<LI><A HREF="#Code">Code development and user environment</A>
45</UL>
46
47<HR>
48
b813c727 49<h2><A HREF="#Content" NAME="Prerequisites">Prerequisites</A></h2>
50
51<h3>Environment</h3>
52
53<p> The code is actively maintained on Linux and HP (both CC and aCC
54compilers). It also runs on Compaq OSF1 and SunOS. We welcome feedback from
55the installation on other systems and we will be happy to consider
56modifications and corrections necessary to make the installation possible.
57
58<p> The disk space required for a full installation of AliRoot is 200MB for
59the system itself and 60MB for the ROOT system.
60
61<h3>gmake</h3>
62
63<p> The installation is performed via the <kbd>
64<a href="http://www.gnu.ai.mit.edu/manual/make-3.77/make.html">
65gmake</a></kbd> program. <kbd>gmake</kbd> is the
66<a href="http://www.gnu.ai.mit.edu">GNU</a> version of make, it is free and,
67if missing on your machine, it can be loaded from the GNU Internet site
68<a href="ftp://ftp.gnu.ai.mit.edu/pub/gnu/make">
69ftp://ftp.gnu.ai.mit.edu/pub/gnu/make</a>. <kbd>gmake</kbd> is compatible
70with the standard UNIX <kbd>make</kbd> and on the CERN ion WGS
71<kbd>make</kbd> is aliased to <kbd>gmake</kbd>. The only files you need for
72<kbd>gmake</kbd> are the executable <kbd>gmake</kbd>
73and the script <kbd>autoconf</kbd>, therefore you can copy such files from
74any site in a directory in your path.
75
76<h3>ROOT</h3>
77
78<p> <em>ROOT</em> is available for many platforms, therefore in most cases
79no <em>ROOT</em> installation is required. To install ROOT on your machine,
80connect to the <a href="http://root.cern.ch">web site</a> and follow the
81link <em>downloads</em>. Usually you should get the latest release, unless
82announced differently by the news of the Off-line Project.
83
84<p> All you need to do is download the compressed tar file, that usually is
85called <var>root_v...tar.gz</var>uncompress and untar it (we supposed you
86downloaded the tar file in your <var>$HOME</var>):
87
88<p><kbd>
89$ gunzip root_v...tar.gz
90$ cd <i>directory</i> # name of the directory where you want ROOT to sit
91$ tar xvf ~/root_v...tar
92</kbd>
4c505702 93
b813c727 94<p> When tar ends, you will have the full root directory tree, with already
95installed libraries for your platform.
96
97<p> The following shell variables should be defined in the login scripts:
98
99<p><table align=centre borders=no>
100<tr><th align=left>variable</th><th align=left>value</th></tr>
101<tr><td width=50%>ROOTSYS </td><td> <i>directory</i>/root
102<tr><td colspan=2><i><center>on all systems but HP-UX</center></i></td></tr>
103<tr><td>LD_LIBRARY_PATH</td>
104<td>$LD_LIBRARY_PATH\:$ROOTSYS/lib</td></tr>
105<tr><td colspan=2><i><center>on HP-UX</center></i></td></tr>
106<tr><td>SHLIB_PATH</td>
107<td>$SHLIB_PATH\:$ROOTSYS/lib</td></tr>
108<tr><td>PATH</td>
109<td> $PATH\:$ROOTSYS/bin </td></tr>
110</table>
111
112
113<h2><A HREF="#Content" NAME="Installation">Installation</A></h2>
14c31136 114
115<ol>
116<p><li> Install <a href="http://root.cern.ch">ROOT</a> and define the
117necessary variables correctly.
118
119<p><li> Decide where the code will reside (from here on <i>directory</i>).
120
121<p><li>Define the following global variables in the login script
122
123<p><table align=centre borders=no>
124<tr><th align=left>variable</th><th align=left>value</th></tr>
125<tr><td width=30%>ALICE </td><td> <i>directory</i>
126<tr><td>ALICE_LEVEL </td><td> pro </td></tr>
127<tr><td>ALICE_ROOT </td><td> $ALICE/$ALICE_LEVEL </td></tr>
128<tr><td>ALICE_TARGET </td><td> `uname`
129(i.e. result of the Unix <b>uname</b> command)</td></tr>
130<tr><td colspan=2><i><center>on all systems but HP-UX</center></i></td></tr>
131<tr><td>LD_LIBRARY_PATH</td>
132<td>$ALICE_ROOT/lib/tgt_${ALICE_TARGET}\:$LD_LIBRARY_PATH</td></tr>
133<tr><td colspan=2><i><center>on HP-UX</center></i></td></tr>
134<tr><td>SHLIB_PATH</td>
135<td>$ALICE_ROOT/lib/tgt_${ALICE_TARGET}\:$SHLIB_PATH</td></tr>
136<tr><td>PATH</td>
137<td> $PATH\:$ALICE_ROOT/bin/tgt_${ALICE_TARGET} </td></tr>
138</table>
139
140<p>At this point you should logout, login again and check that the symbols
141are set correctly.
142
143<p><li> Retrieve the AliRoot code. There are two ways to do this:
144
145<ul>
146<p><li> <em>From a tar file</em>. This is the preferred way for those who
147do not have an internet connection to the <em>cvs</em> server from the
148machine where the code has to be installed. The <a
149href="ftp://pcepaip01.cern.ch/pub">files</a> containing the latest release
150should be brought on the target machine. Three files are offered:
151
152<p><table align=center borders=no>
153<tr><th align=left>File<th align=left>Content</tr>
154<tr><td align=center colspan=2><em>Either</em></tr>
155<tr><td>AliOffline<i>MM.mm-pp</i>.tar.gz
156<td>Code and the data files of ALICE Off-line</tr>
157<tr><td align=center colspan=2><em>Or</em></tr>
158<tr><td>AliLibs<i>MM.mm-pp</i>.tar.gz
159<td>Code and the data files of the auxiliary libraries</tr>
160<tr><td>AliRoot<i>MM.mm-pp</i>.tar.gz
161<td>All the code and the data files of the AliRoot system</tr>
162</table>
163
164<p> <i>MM.mm-pp</i> is the number of the latest <i>M</i>ajor and
20b19209 165<i>m</i>inor version and the <i>p</i>atch number. The file(s) have to be
166unpacked into the $ALICE directory via the command:
14c31136 167
168<p><pre>$ gtar xvfz Ali[...].tar.gz</pre>
169
170
171<p><li> <em>From cvs remote cvs server</em>. This method has the advantage
172that new patches can be incrementally retrieved and installed via internet.
173At the moment the problem is that the version of cvs currently installed at
174CERN (1.09) does not support well binary files. Therefore some data files
175will be missing with this download mechanism, and these will have to be
176fetched <em>by hand</em>. The setup of the access to the remote cvs server
1f3e54b9 177is described in the Code Development section. The
14c31136 178code is dowloaded via the command:
179
180<p><pre>
181$ cd $ALICE
f5a8ce83 182$ cvsa co -r Release-3-02 -d pro AliRoot
14c31136 183</pre>
184
185</ul>
186
187<p><li>install the CERN library part
188
189<p><pre>
190$ cd $ALICE_ROOT
191$ gmake cernlibs
192</pre>
193
194<p><li>Install the ALICE specific software
195
196<p><pre>
197$ cd $ALICE_ROOT
198$ gmake
199</pre>
200
201<p><li>Copy the file $ALICE_ROOT/.rootrc to your home directory
202
29cbfde8 203<p><li>For users with c-like shells, update your search path:
204
205<p>
206<pre>
207$ rehash
208</pre>
209
210<p>This usually has to be done only once, after having defined the new PATH.
211
14c31136 212<p><li>Change to your home directory and run the code
213
214<p>
215<pre>
216$ cd
217$ aliroot
218
219<output from aliroot>
220
221root [1] .x menu.C
222</pre>
223</ol>
224
4c505702 225<h2><A HREF="#Content" NAME="Code">Code development and user environment</A></h2>
87ad6e14 226
227<p>If the ALICE environment is set up correctly, the
228<var>$ALICE_ROOT/lib/tgt_$ALICE_TARGET</var> directory is in the shared
229libraries load path, and the <var>$ALICE_ROOT/bin/tgt_$ALICE_TARGET</var>
481bb6ef 230directory is in the PATH variable. This means that the command
231<kbd>aliroot</kbd> will in fact correspond to the file
87ad6e14 232<var>$ALICE_ROOT/bin/tgt_$ALICE_TARGET/aliroot</var>.
233
234<p>This is convenient for the normal user, but as soon as the user wants to
235modify one or more directories, this arrangement becomes inefficient
236because if a local copy of one of the shared libraries is remade, the
237linker will always find the official unmodified one that sits in the above
238directory before the local one in the load library path. Moreover, and
239unless the full path is specified, the local version of the <b>aliroot</b>
240executable will be ignored and the official version executed.
241
242<p>Therefore in order to develop one or more packages locally
243(let's say the TPC) and make modifications, the following steps should be
244performed. We suppose here that the remote cvs server has been setup correctly
4c505702 245as explained in the <a href="../development.html">code development</a> section.
87ad6e14 246
5023a744 247<p><table id="wide" cellspacing=10%>
248 <tr align=center>
249 <th colspan=2>
250 <hr><br>
251 <font size=+1>Preparation of the environment</font>
252 <br><hr>
87ad6e14 253 <tr align=left>
254 <th width=30%>$ mkdir AliRoot
255 <td width=50%>create the working directory
256 <tr align=left>
257 <th>$ cd AliRoot
258 <td>set default to it
259 <tr align=left>
260 <th>$ mkdir pro
261 <td>create pro subdirectory
262 <tr align=left>
263 <th>$ cd pro
264 <td>set default to it
265 <tr align=left>
266 <th>$ ln -s $ALICE_ROOT/* ./
267 <td>link all files here
268 <tr align=left>
481bb6ef 269 <th>$ rm lib
87ad6e14 270 <td>remove link for library, we need a local file here to containing the new
271 TPC library
272 <tr align=left>
273 <th>$ rm bin
481bb6ef 274 <td>remove bin, we need a local copy of the <var>aliroot</var>
275 executable
276 <tr align=left>
277 <th>$ rm CVS
278 <td>remove the link to the CVS directory, we need a local one
279 to check-out files
87ad6e14 280 <tr align=left>
281 <th>$ rm TPC
282 <td>remove link for TPC subdirectory, we need the real files here
283 <tr align=left>
284 <th>$ rm ALIROOT
285 <td>remove link to ALIROOT subdirectory, may be this is not really necessary
286 on all systems, but we do it just to be on the safe side
287 <tr align=left>
481bb6ef 288 <th>$ cvsa co -r Release-3-02 TPC
289 <td>get from the cvs server the release version of the TPC files to be
290 modified
87ad6e14 291 <tr align=left>
481bb6ef 292 <th>$ cvsa co -r Release-3-02 ALIROOT
293 <td>get from the server the release version of the ALIROOT files to recreate
294 the executable
87ad6e14 295 <tr align=left>
296 <th>$ mkdir -p lib/tgt_$ALICE_TARGET
297 <td>create library directory
298 <tr align=left>
299 <th>$ cd lib/tgt_$ALICE_TARGET
300 <td>set default to the lib directory
301 <tr align=left>
302 <th>$ ln -s $ALICE_ROOT/lib/* ./
303 <td>link all libraries here
304 <tr align=left>
5023a744 305 <th>$ rm libTPC.sl (on HP)
306 <br>$ rm libTPC.so (on the other systems)
87ad6e14 307 <td>remove link to TPC library, we need a real one
308 <tr align=left>
309 <th>$ changeRoot $HOME/AliRoot
5023a744 310 <td>change the AliRoot root to $HOME/AliRoot via the <em>changeRoot</em> command
87ad6e14 311 <tr align=left>
312 <th>$ rehash
313 <td>make sure that the new PATH is taken into account by the shell
5023a744 314 <tr align=center>
315 <th colspan=2>
316 <hr><br>
317 <font size=+1>Normal development cycle</font>
318 <br><hr>
87ad6e14 319 <tr align=left>
320 <th>$ cd $ALICE_ROOT/TPC
321 <td>(1) set default to TPC directory
322 <tr align=left>
323 <th>$ make macroclean
324 <td>clean up all objects
325 <tr align=left>
326 <th>$ emacs AliTPCv1.cxx
327 <td>(2) edit all the files...
328 <tr align=left>
329 <th>$ make
330 <td>(3) recreate ../lib/libTPC.sl
331 <tr align=left>
332 <th>$ cd ../ALIROOT
333 <td>set default to ALIROOT directory
334 <tr align=left>
335 <th>$ make macroclean
336 <td>clean up object files
337 <tr align=left>
338 <th>$ make
339 <td>make new executable
340 <tr align=left>
341 <th>$ cd <em>directory</em>
342 <td>(4) set default elsewhere
343 <tr align=left>
344 <th>$ aliroot
345 <td>(5) run aliroot
5023a744 346 <tr align=center>
347 <th colspan=2>
348 <hr>
87ad6e14 349</table>
350
351<p>Steps 1-5 are the normal development cycle after the first pass through the
352procedure.
353
14c31136 354<hr>
355<address>
356 <script language="JavaScript">
357 document.write("Last modified "+ document.lastModified)
358 // end of script -->
359 </script>
360by <a href="mailto:Federico.Carminati@cern.ch">Federico Carminati</a>
361</address>
362</BODY>
363</HTML>