1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
2 "http://www.w3.org/TR/REC-html40/loose.dtd">
5 <TITLE>Installation</TITLE>
7 <link rev="made" href="mailto:Federico.Carminati@cern.ch">
8 <link rel="stylesheet" href="http://www.w3.org/StyleSheets/Core/Swiss" type="text/css">
9 <STYLE type="text/css">
15 COL, COLGROUP, TABLE, TBODY, TD, TR {
17 text-decoration: none;
34 <TD><img src="picts/MadHatter.gif" alt="ALICE Off-line Project Logo">
35 <TD><img src="picts/installation_name.gif" alt="Installation">
36 <TD><img src="picts/AliceLogo.gif" alt="ALICE Logo">
40 <H2><A NAME="#Content">Content</A></H2>
42 <LI><A HREF="#Prequisites">Prerequisites</A>
43 <LI><A HREF="#Installation">Installation</A>
44 <LI><A HREF="#Code">Code development and user environment</A>
49 <h2><A HREF="#Content" NAME="Prerequisites">Prerequisites</A></h2>
53 <p> The code is actively maintained on Linux and HP (both CC and aCC
54 compilers). It also runs on Compaq OSF1 and SunOS. We welcome feedback from
55 the installation on other systems and we will be happy to consider
56 modifications and corrections necessary to make the installation possible.
58 <p> The disk space required for a full installation of AliRoot is 200MB for
59 the system itself and 60MB for the ROOT system.
63 <p> The installation is performed via the <kbd>
64 <a href="http://www.gnu.ai.mit.edu/manual/make-3.77/make.html">
65 gmake</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,
67 if 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">
69 ftp://ftp.gnu.ai.mit.edu/pub/gnu/make</a>. <kbd>gmake</kbd> is compatible
70 with 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>
73 and the script <kbd>autoconf</kbd>, therefore you can copy such files from
74 any site in a directory in your path.
78 <p> <em>ROOT</em> is available for many platforms, therefore in most cases
79 no <em>ROOT</em> installation is required. To install ROOT on your machine,
80 connect to the <a href="http://root.cern.ch">web site</a> and follow the
81 link <em>downloads</em>. Usually you should get the latest release, unless
82 announced differently by the news of the Off-line Project.
84 <p> All you need to do is download the compressed tar file, that usually is
85 called <var>root_v...tar.gz</var>uncompress and untar it (we supposed you
86 downloaded the tar file in your <var>$HOME</var>):
89 $ gunzip root_v...tar.gz
90 <br>$ cd <i>directory</i> # name of the directory where you want ROOT to sit
91 <br>$ tar xvf ~/root_v...tar
94 <p> When tar ends, you will have the full root directory tree, with already
95 installed libraries for your platform.
97 <p> The following shell variables should be defined in the login scripts:
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>
109 <td> $PATH\:$ROOTSYS/bin </td></tr>
113 <h2><A HREF="#Content" NAME="Installation">Installation</A></h2>
116 <p><li> Install <a href="http://root.cern.ch">ROOT</a> and define the
117 necessary variables correctly.
119 <p><li> Decide where the code will reside (from here on <i>directory</i>).
121 <p><li>Define the following global variables in the login script
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>
137 <td> $PATH\:$ALICE_ROOT/bin/tgt_${ALICE_TARGET} </td></tr>
140 <p>At this point you should logout, login again and check that the symbols
143 <p><li> Retrieve the AliRoot code. There are two ways to do this: the
144 preferred way is retrieving a tar file on the ftp server and the
145 slow and network consuming way is checking out the whole cvs tree.
148 <p><li> <em>From a tar file</em>. This is the preferred way. Tar files
149 for the different releases including an up-to-date file remade
150 every night are available on the ftp server
151 <a href="ftp://alisoft.cern.ch/pub/offline">
152 ftp://alisoft.cern.ch/pub/offline</a>. The tar files include the
153 "CVS" subdirectories for the anonymous cvs user (login "cvs"). So after
154 getting the full tar file, it is possible to incrementally update
157 <p> The tar file(s) can to be unpacked into the $ALICE directory
160 <p><pre>$ gtar xvfz V3.XX.tar.gz</pre>
162 <p> A script <a href="ftp://alisoft.cern.ch/pub/misc/">changeCVSRoot</a>
163 is available to convert a CVS tree under user "cvs" to another
164 user. For example, <pre> ChangeRoot tpc </pre>
167 <p><li> <em>From cvs remote cvs server</em>. The setup of the access
168 to the remote cvs server is described in the Code Development
169 section. The code is dowloaded via the command:
173 $ cvsa co -r Release-3-02 -d pro AliRoot
176 <p>Where the meaning of <kbd>cvsa</kbd> is explained in the
177 <a href="../development.html">code development</a> section.
181 <p><li>install the CERN library part
188 <p><li>Install the ALICE specific software
195 <p><li>Copy the file $ALICE_ROOT/.rootrc to your home directory
197 <p><li>For users with c-like shells, update your search path:
204 <p>This usually has to be done only once, after having defined the new PATH.
206 <p><li>Change to your home directory and run the code
213 <output from aliroot>
219 <h2><A HREF="#Content" NAME="Code">Code development and user environment</A></h2>
221 <p>If the ALICE environment is set up correctly, the
222 <var>$ALICE_ROOT/lib/tgt_$ALICE_TARGET</var> directory is in the shared
223 libraries load path, and the <var>$ALICE_ROOT/bin/tgt_$ALICE_TARGET</var>
224 directory is in the PATH variable. This means that the command
225 <kbd>aliroot</kbd> will in fact correspond to the file
226 <var>$ALICE_ROOT/bin/tgt_$ALICE_TARGET/aliroot</var>.
228 <p>This is convenient for the normal user, but as soon as the user wants to
229 modify one or more directories, this arrangement becomes inefficient
230 because if a local copy of one of the shared libraries is remade, the
231 linker will always find the official unmodified one that sits in the above
232 directory before the local one in the load library path. Moreover, and
233 unless the full path is specified, the local version of the <b>aliroot</b>
234 executable will be ignored and the official version executed.
236 <p>Therefore in order to develop one or more packages locally
237 (let's say the TPC) and make modifications, the following steps should be
238 performed. We suppose here that the remote cvs server has been setup correctly
239 as explained in the <a href="../development.html">code development</a> section.
241 <p><table id="wide" cellspacing=10%>
245 <font size=+1>Preparation of the environment</font>
248 <th width=30%>$ mkdir AliRoot
249 <td width=50%>create the working directory
252 <td>set default to it
255 <td>create pro subdirectory
258 <td>set default to it
260 <th>$ ln -s $ALICE_ROOT/* ./
261 <td>link all files here
264 <td>remove link for library, we need a local file here to containing the new
268 <td>remove bin, we need a local copy of the <var>aliroot</var>
272 <td>make a local bin directory
275 <td>remove the link to the CVS directory, we need a local one
279 <td>remove link for TPC subdirectory, we need the real files here
282 <td>remove link to ALIROOT subdirectory, may be this is not really necessary
283 on all systems, but we do it just to be on the safe side
285 <th>$ cvsa co -r Release-3-02 TPC
286 <td>get from the cvs server the release version of the TPC files to be
289 <th>$ cvsa co -r Release-3-02 ALIROOT
290 <td>get from the server the release version of the ALIROOT files to recreate
293 <th>$ mkdir -p lib/tgt_$ALICE_TARGET
294 <td>create library directory
296 <th>$ cd lib/tgt_$ALICE_TARGET
297 <td>set default to the lib directory
299 <th>$ ln -s $ALICE_ROOT/lib/tgt_$ALICE_TARGET/* ./
300 <td>link all libraries here
302 <th>$ rm libTPC.sl (on HP)
303 <br>$ rm libTPC.so (on the other systems)
304 <td>remove link to TPC library, we need a real one
306 <th>$ changeRoot $HOME/AliRoot
307 <td>change the AliRoot root to $HOME/AliRoot via the <em>changeRoot</em> command
310 <td>make sure that the new PATH is taken into account by the shell
314 <font size=+1>Normal development cycle</font>
317 <th>$ cd $ALICE_ROOT/TPC
318 <td>(1) set default to TPC directory
320 <th>$ make macroclean
321 <td>clean up all objects
323 <th>$ emacs AliTPCv1.cxx
324 <td>(2) edit all the files...
327 <td>(3) recreate ../lib/libTPC.sl
330 <td>set default to ALIROOT directory
332 <th>$ make macroclean
333 <td>clean up object files
336 <td>make new executable
338 <th>$ cd <em>directory</em>
339 <td>(4) set default elsewhere
348 <p>Steps 1-5 are the normal development cycle after the first pass through the
353 <script language="JavaScript">
354 document.write("Last modified "+ document.lastModified)
357 by <a href="mailto:Federico.Carminati@cern.ch">Federico Carminati</a>