New version of IRST code checking tool
[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>
42<LI><A HREF="#Installation">Installation</A>
43<LI><A HREF="#Code">Code development and user environment</A>
44</UL>
45
46<HR>
47
48<h2><A HREF="#Content" NAME="Installation">Installation</A></h2>
49
14c31136 50
51<ol>
52<p><li> Install <a href="http://root.cern.ch">ROOT</a> and define the
53necessary variables correctly.
54
55<p><li> Decide where the code will reside (from here on <i>directory</i>).
56
57<p><li>Define the following global variables in the login script
58
59<p><table align=centre borders=no>
60<tr><th align=left>variable</th><th align=left>value</th></tr>
61<tr><td width=30%>ALICE </td><td> <i>directory</i>
62<tr><td>ALICE_LEVEL </td><td> pro </td></tr>
63<tr><td>ALICE_ROOT </td><td> $ALICE/$ALICE_LEVEL </td></tr>
64<tr><td>ALICE_TARGET </td><td> `uname`
65(i.e. result of the Unix <b>uname</b> command)</td></tr>
66<tr><td colspan=2><i><center>on all systems but HP-UX</center></i></td></tr>
67<tr><td>LD_LIBRARY_PATH</td>
68<td>$ALICE_ROOT/lib/tgt_${ALICE_TARGET}\:$LD_LIBRARY_PATH</td></tr>
69<tr><td colspan=2><i><center>on HP-UX</center></i></td></tr>
70<tr><td>SHLIB_PATH</td>
71<td>$ALICE_ROOT/lib/tgt_${ALICE_TARGET}\:$SHLIB_PATH</td></tr>
72<tr><td>PATH</td>
73<td> $PATH\:$ALICE_ROOT/bin/tgt_${ALICE_TARGET} </td></tr>
74</table>
75
76<p>At this point you should logout, login again and check that the symbols
77are set correctly.
78
79<p><li> Retrieve the AliRoot code. There are two ways to do this:
80
81<ul>
82<p><li> <em>From a tar file</em>. This is the preferred way for those who
83do not have an internet connection to the <em>cvs</em> server from the
84machine where the code has to be installed. The <a
85href="ftp://pcepaip01.cern.ch/pub">files</a> containing the latest release
86should be brought on the target machine. Three files are offered:
87
88<p><table align=center borders=no>
89<tr><th align=left>File<th align=left>Content</tr>
90<tr><td align=center colspan=2><em>Either</em></tr>
91<tr><td>AliOffline<i>MM.mm-pp</i>.tar.gz
92<td>Code and the data files of ALICE Off-line</tr>
93<tr><td align=center colspan=2><em>Or</em></tr>
94<tr><td>AliLibs<i>MM.mm-pp</i>.tar.gz
95<td>Code and the data files of the auxiliary libraries</tr>
96<tr><td>AliRoot<i>MM.mm-pp</i>.tar.gz
97<td>All the code and the data files of the AliRoot system</tr>
98</table>
99
100<p> <i>MM.mm-pp</i> is the number of the latest <i>M</i>ajor and
20b19209 101<i>m</i>inor version and the <i>p</i>atch number. The file(s) have to be
102unpacked into the $ALICE directory via the command:
14c31136 103
104<p><pre>$ gtar xvfz Ali[...].tar.gz</pre>
105
106
107<p><li> <em>From cvs remote cvs server</em>. This method has the advantage
108that new patches can be incrementally retrieved and installed via internet.
109At the moment the problem is that the version of cvs currently installed at
110CERN (1.09) does not support well binary files. Therefore some data files
111will be missing with this download mechanism, and these will have to be
112fetched <em>by hand</em>. The setup of the access to the remote cvs server
1f3e54b9 113is described in the Code Development section. The
14c31136 114code is dowloaded via the command:
115
116<p><pre>
117$ cd $ALICE
f5a8ce83 118$ cvsa co -r Release-3-02 -d pro AliRoot
14c31136 119</pre>
120
121</ul>
122
123<p><li>install the CERN library part
124
125<p><pre>
126$ cd $ALICE_ROOT
127$ gmake cernlibs
128</pre>
129
130<p><li>Install the ALICE specific software
131
132<p><pre>
133$ cd $ALICE_ROOT
134$ gmake
135</pre>
136
137<p><li>Copy the file $ALICE_ROOT/.rootrc to your home directory
138
29cbfde8 139<p><li>For users with c-like shells, update your search path:
140
141<p>
142<pre>
143$ rehash
144</pre>
145
146<p>This usually has to be done only once, after having defined the new PATH.
147
14c31136 148<p><li>Change to your home directory and run the code
149
150<p>
151<pre>
152$ cd
153$ aliroot
154
155<output from aliroot>
156
157root [1] .x menu.C
158</pre>
159</ol>
160
4c505702 161<h2><A HREF="#Content" NAME="Code">Code development and user environment</A></h2>
87ad6e14 162
163<p>If the ALICE environment is set up correctly, the
164<var>$ALICE_ROOT/lib/tgt_$ALICE_TARGET</var> directory is in the shared
165libraries load path, and the <var>$ALICE_ROOT/bin/tgt_$ALICE_TARGET</var>
481bb6ef 166directory is in the PATH variable. This means that the command
167<kbd>aliroot</kbd> will in fact correspond to the file
87ad6e14 168<var>$ALICE_ROOT/bin/tgt_$ALICE_TARGET/aliroot</var>.
169
170<p>This is convenient for the normal user, but as soon as the user wants to
171modify one or more directories, this arrangement becomes inefficient
172because if a local copy of one of the shared libraries is remade, the
173linker will always find the official unmodified one that sits in the above
174directory before the local one in the load library path. Moreover, and
175unless the full path is specified, the local version of the <b>aliroot</b>
176executable will be ignored and the official version executed.
177
178<p>Therefore in order to develop one or more packages locally
179(let's say the TPC) and make modifications, the following steps should be
180performed. We suppose here that the remote cvs server has been setup correctly
4c505702 181as explained in the <a href="../development.html">code development</a> section.
87ad6e14 182
5023a744 183<p><table id="wide" cellspacing=10%>
184 <tr align=center>
185 <th colspan=2>
186 <hr><br>
187 <font size=+1>Preparation of the environment</font>
188 <br><hr>
87ad6e14 189 <tr align=left>
190 <th width=30%>$ mkdir AliRoot
191 <td width=50%>create the working directory
192 <tr align=left>
193 <th>$ cd AliRoot
194 <td>set default to it
195 <tr align=left>
196 <th>$ mkdir pro
197 <td>create pro subdirectory
198 <tr align=left>
199 <th>$ cd pro
200 <td>set default to it
201 <tr align=left>
202 <th>$ ln -s $ALICE_ROOT/* ./
203 <td>link all files here
204 <tr align=left>
481bb6ef 205 <th>$ rm lib
87ad6e14 206 <td>remove link for library, we need a local file here to containing the new
207 TPC library
208 <tr align=left>
209 <th>$ rm bin
481bb6ef 210 <td>remove bin, we need a local copy of the <var>aliroot</var>
211 executable
212 <tr align=left>
213 <th>$ rm CVS
214 <td>remove the link to the CVS directory, we need a local one
215 to check-out files
87ad6e14 216 <tr align=left>
217 <th>$ rm TPC
218 <td>remove link for TPC subdirectory, we need the real files here
219 <tr align=left>
220 <th>$ rm ALIROOT
221 <td>remove link to ALIROOT subdirectory, may be this is not really necessary
222 on all systems, but we do it just to be on the safe side
223 <tr align=left>
481bb6ef 224 <th>$ cvsa co -r Release-3-02 TPC
225 <td>get from the cvs server the release version of the TPC files to be
226 modified
87ad6e14 227 <tr align=left>
481bb6ef 228 <th>$ cvsa co -r Release-3-02 ALIROOT
229 <td>get from the server the release version of the ALIROOT files to recreate
230 the executable
87ad6e14 231 <tr align=left>
232 <th>$ mkdir -p lib/tgt_$ALICE_TARGET
233 <td>create library directory
234 <tr align=left>
235 <th>$ cd lib/tgt_$ALICE_TARGET
236 <td>set default to the lib directory
237 <tr align=left>
238 <th>$ ln -s $ALICE_ROOT/lib/* ./
239 <td>link all libraries here
240 <tr align=left>
5023a744 241 <th>$ rm libTPC.sl (on HP)
242 <br>$ rm libTPC.so (on the other systems)
87ad6e14 243 <td>remove link to TPC library, we need a real one
244 <tr align=left>
245 <th>$ changeRoot $HOME/AliRoot
5023a744 246 <td>change the AliRoot root to $HOME/AliRoot via the <em>changeRoot</em> command
87ad6e14 247 <tr align=left>
248 <th>$ rehash
249 <td>make sure that the new PATH is taken into account by the shell
5023a744 250 <tr align=center>
251 <th colspan=2>
252 <hr><br>
253 <font size=+1>Normal development cycle</font>
254 <br><hr>
87ad6e14 255 <tr align=left>
256 <th>$ cd $ALICE_ROOT/TPC
257 <td>(1) set default to TPC directory
258 <tr align=left>
259 <th>$ make macroclean
260 <td>clean up all objects
261 <tr align=left>
262 <th>$ emacs AliTPCv1.cxx
263 <td>(2) edit all the files...
264 <tr align=left>
265 <th>$ make
266 <td>(3) recreate ../lib/libTPC.sl
267 <tr align=left>
268 <th>$ cd ../ALIROOT
269 <td>set default to ALIROOT directory
270 <tr align=left>
271 <th>$ make macroclean
272 <td>clean up object files
273 <tr align=left>
274 <th>$ make
275 <td>make new executable
276 <tr align=left>
277 <th>$ cd <em>directory</em>
278 <td>(4) set default elsewhere
279 <tr align=left>
280 <th>$ aliroot
281 <td>(5) run aliroot
5023a744 282 <tr align=center>
283 <th colspan=2>
284 <hr>
87ad6e14 285</table>
286
287<p>Steps 1-5 are the normal development cycle after the first pass through the
288procedure.
289
14c31136 290<hr>
291<address>
292 <script language="JavaScript">
293 document.write("Last modified "+ document.lastModified)
294 // end of script -->
295 </script>
296by <a href="mailto:Federico.Carminati@cern.ch">Federico Carminati</a>
297</address>
298</BODY>
299</HTML>