Project

General

Profile

Install » History » Version 203

Franchini, Paolo, 26 July 2019 12:14

1 1 Tunnell, Christopher
h1. Introduction
2 188 Dobbs, Adam
3
{{>toc}}
4 1 Tunnell, Christopher
5 105 Tunnell, Christopher
This page will take you through getting the prerequisites of installing MAUS and ensuring that it's working.  
6 1 Tunnell, Christopher
7 105 Tunnell, Christopher
If you have issue, please file a new support ticket by clicking "new issue" above.  Below are some common known problems:
8
9 144 Rogers, Chris
* Do not have whitespace in your path. Various third_party packages will break.  This is beyond the scope of MAUS.  See issue #306.
10 35 Tunnell, Christopher
11 107 Rogers, Chris
h1. Supported Distributions
12
13 110 Rogers, Chris
We support recent versions of
14 108 Rogers, Chris
* Scientific Linux
15
* CENT OS
16
17
Other Linux distributions are supported on a "best effort" basis.
18 107 Rogers, Chris
19 1 Tunnell, Christopher
h1. Prerequisites
20 21 Tunnell, Christopher
21 105 Tunnell, Christopher
_Most installation problems are a result of people not reading this section_
22 1 Tunnell, Christopher
23 195 Dobbs, Adam
You will need a few GBs of free space on your hard drive for Geant4 and ROOT (which will be installed along with MAUS).
24 105 Tunnell, Christopher
25 145 George, Melissa
You will also need a number of prerequisite tools for the software to build and run correctly, such as X11.  To be sure that your system has the correct setup, follow the instructions that relate to your system in the following sections.
26
27 202 Franchini, Paolo
Old version of Bazaar needs to be updated or patched (e.g. 2.1.1). A working one is 2.7.0, so please check this before running the install script.
28
29 90 Tunnell, Christopher
h2. Scientific Linux/Redhat/Fedora/Centos
30 1 Tunnell, Christopher
31 158 Rogers, Chris
Remove Canopy if you have it installed. It causes conflicts with the default freetype (Ref. #1291).
32
33 23 Tunnell, Christopher
To install the tools required to build software on Scientific Linux, you must run the following commands:
34 1 Tunnell, Christopher
35 23 Tunnell, Christopher
<pre>
36
sudo yum groupinstall "Development Tools"
37
sudo yum groupinstall "Development Libraries"
38 198 Dobbs, Adam
sudo yum install wget libX11-devel libXft-devel libXext-devel libXpm-devel libX11-devel libpng-devel tcl-devel tk-devel sqlite-devel openssl-devel cmake patch bzr bison gcc-c++
39 23 Tunnell, Christopher
</pre>
40 1 Tunnell, Christopher
41
where the *sudo* command means that this is run as the root superuser. If you do not have this access, you must ask your system manager.
42 194 Dobbs, Adam
43
*NB*: If you are using a modern version of Fedora you may need to replace "yum" with "dnf"
44 51 Tunnell, Christopher
45 161 Rajaram, Durga
> *Geant 4.9.6p02 requires cmake*. Please also run:
46
<pre> sudo yum install cmake</pre>
47
48 1 Tunnell, Christopher
> *Scientific Linux 4.8 only*. Please also run:
49 136 Rogers, Chris
> 
50
> <pre>sudo yum install xorg-x11-devel</pre>
51
52 162 Greis, Jan
When generating the documentation via doxygen, Graphviz is required to create graphs. To install, run
53
<pre> sudo yum install graphviz</pre>
54 136 Rogers, Chris
55 88 Tunnell, Christopher
h2. Debian or Ubuntu
56 23 Tunnell, Christopher
57
To install the tools required to build software on Debian-based systems, you must run the following commands:
58
59
<pre>
60 201 Dobbs, Adam
sudo apt-get install build-essential xorg-dev automake autoconf libtool scons zlibc libssl-dev libblas-dev liblapack-dev libpng-dev libsqlite3-dev bison libbison-dev libxpm-dev libxml2-dev libjsoncpp-dev bzr byacc unzip
61 1 Tunnell, Christopher
</pre>
62
63
where the *sudo* command means that this is run as the root superuser.  If you do not have this access, you must ask your system manager.
64 137 Rogers, Chris
65 161 Rajaram, Durga
> *Geant 4.9.6p02 requires cmake*. Please also run:
66 137 Rogers, Chris
> 
67 166 Snopok, Pavel
> <pre>sudo apt-get install cmake</pre>
68 47 Tunnell, Christopher
69 162 Greis, Jan
When generating the documentation via doxygen, Graphviz is required to create graphs. To install, run
70
<pre> sudo apt-get install graphviz</pre>
71
72 167 Rajaram, Durga
On Ubuntu, the ROOT build could fail because ROOT looks for freetype in /usr/include/freetype, whereas the system has them in /usr/include/freetype2
73
("ROOTTalk":http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=17419)
74
To get around this, as superuser, do
75
<pre>
76
ln -s /usr/include/freetype2 /usr/include/freetype
77
</pre>
78
79 88 Tunnell, Christopher
h2. OpenSUSE
80 46 Tunnell, Christopher
81
To install the required tools, you must run the following command:
82 1 Tunnell, Christopher
83 46 Tunnell, Christopher
<pre>
84
sudo zypper install -t pattern devel_C_C++
85
</pre>
86 155 Rajaram, Durga
87
where the *sudo* command means that this is run as the root superuser.  If you do not have this access, you must ask your system manager.
88 1 Tunnell, Christopher
89 162 Greis, Jan
When generating the documentation via doxygen, Graphviz is required to create graphs.
90
91 155 Rajaram, Durga
h2. Other distribution
92 88 Tunnell, Christopher
93 24 Tunnell, Christopher
Please try using "google":http://www.google.com to find out how to do it for your specific architecture.  If you succeed, then please post those instruction here and continue with these instructions.  If you fail, please email the user mailing list (maus-user@jiscmail.ac.uk).
94 25 Tunnell, Christopher
95 24 Tunnell, Christopher
h1. Getting the code
96 87 Tunnell, Christopher
97 178 Dobbs, Adam
There are a number of options for obtaining MAUS:
98 25 Tunnell, Christopher
99 122 Rogers, Chris
h2. Using a packaged tarball
100 25 Tunnell, Christopher
101 172 Dobbs, Adam
Choose a version from the  "release page":http://heplnv152.pp.rl.ac.uk/maus/ and click on the Source Code tarball link (latest version at the top of the page). You may wish to check that the download was okay, for instance by doing
102 25 Tunnell, Christopher
<pre>
103 176 Dobbs, Adam
md5sum -c MAUS-vX.X.X.tar.gz.md5
104 1 Tunnell, Christopher
</pre>
105
106 176 Dobbs, Adam
where @MAUS-vX.X.X.tar.gz.md5@ can be found either by following the _md5_ link from the download page and X.X.X is the MAUS version number. Then extract the code by doing
107 128 Rogers, Chris
<pre>
108 176 Dobbs, Adam
tar xvfz MAUS-vX.X.X.tar.gz
109 128 Rogers, Chris
</pre>
110
You should now have a directory called 'maus'.
111 1 Tunnell, Christopher
112 203 Franchini, Paolo
Releases tarball will also be made available on the Grid: http://gfe02.grid.hep.ph.ic.ac.uk:8301/Construction/Software/MAUS/
113
114 182 Dobbs, Adam
h2. Bazaar and Launchpad (recommended for developers)
115 1 Tunnell, Christopher
116 180 Dobbs, Adam
Bazaar is a distributed version control system (DVCS) maintained by Canonical. It is used for version control and distribution of MAUS for developers. There is a MAUS-specific tutorial for bzr [[Bzr_usage|here]]. The code is hosted on "launchpad":http://launchpad.net (also maintained by Canonical) under the "MAUS project":https://code.launchpad.net/maus.
117 25 Tunnell, Christopher
118 181 Dobbs, Adam
In order to obtain the code, "branch":http://en.wikipedia.org/wiki/Branching_%28software%29 the remote repository from launchpad using the following commands:
119 72 Tunnell, Christopher
120 1 Tunnell, Christopher
<pre>
121 181 Dobbs, Adam
mkdir MAUS
122
bzr init-repo MAUS
123
cd MAUS
124 1 Tunnell, Christopher
bzr branch lp:maus
125
</pre>
126
127 181 Dobbs, Adam
This will branch a copy of the release branch. To get a copy of the development trunk, use the following command:
128 1 Tunnell, Christopher
<pre>
129
bzr branch lp:maus/merge
130
</pre>
131
132
and you should now have a directory called 'maus' (or merge).  If you get a 'command not found', you must [[InstallingBzr|install bazaar]].  If you run into connectivity issues, you can check the bazaar server status "here":http://identi.ca/launchpadstatus.
133
134 185 Dobbs, Adam
*If you want to publish results based on MAUS, please use a release version of the code*.
135
136 182 Dobbs, Adam
h2. Git and GitHub (beta support)
137 181 Dobbs, Adam
138 183 Dobbs, Adam
Git is another, very popular, DCVS. MAUS provides beta level support for git. In particular at the moment code updates for the trunk cannot be accepted from git, only via launchpad and bazaar (if you would rather use git, please email the head of MAUS to show your support). The remote MAUS git repository is hosted on "github":https://github.com/mice-software/maus.
139 181 Dobbs, Adam
140
To obtain the code use the following steps:
141 177 Dobbs, Adam
142
* Optional: set up an account on github and add an ssh key
143
* Clone the MAUS repository using:
144
<pre>
145
git clone git@github.com:mice-software/maus.git
146
</pre>
147
* Move into the @maus@ directory and check the branches present with:
148
<pre>
149
git branch -av
150
</pre>
151
The following branches should be present:
152
** @master@ (the release branch)
153
** @merge@ (the development branch)
154
** @release-candidate@ (used by the release manager)
155 25 Tunnell, Christopher
156 184 Dobbs, Adam
* Checkout the branch you want using e.g. for the release:
157
<pre>
158
git checkout master
159
</pre>
160
161 87 Tunnell, Christopher
*If you want to publish results based on MAUS, please use a release version of the code*.
162 1 Tunnell, Christopher
163 31 Tunnell, Christopher
h1. Dependencies and building MAUS
164
165 1 Tunnell, Christopher
MAUS will try to help you by installing all of its dependencies for you.  
166 31 Tunnell, Christopher
167 146 Rogers, Chris
* Be careful about using symbolic links to move to this directory prior to installation, as this may confuse the build system. Always try to follow an absolute path instead.
168
* If running remotely, you may need to forward X11 connections (use ssh -X or ssh -Y)
169 97 Dobbs, Adam
170 175 Dobbs, Adam
You can now run the following command to build all your dependencies, build MAUS, and run the unit and style tests for you (*this takes about 2 hours for most machines, and 4 hours for VMs!*):
171 31 Tunnell, Christopher
172 1 Tunnell, Christopher
<pre>
173 129 Rogers, Chris
cd maus
174 102 Tunnell, Christopher
./install_build_test.bash
175 31 Tunnell, Christopher
</pre>
176 1 Tunnell, Christopher
177 172 Dobbs, Adam
Various arguments may be appended to modify the build procedure:
178
179 173 Dobbs, Adam
* Build with N threads:
180
<pre> -j N </pre>
181
182
* Use an existing MAUS installation for the third party libraries (drastically cuts the build time):
183
<pre> -t /path/to/other/maus </pre>
184
185
* Make the build verbose:
186
<pre> -v 1 </pre>
187
188
* Use your system gcc compiler (must support C++11, anything at version 4.8 or above should do):
189 174 Dobbs, Adam
<pre> --use-system-gcc true </pre>
190 172 Dobbs, Adam
191 169 Rogers, Chris
The build output is automatically stored in a log file like @./install.log@. Some of the tests check that errors are handled correctly, so we expect some error messages. The tests should end with a line like:
192 34 Tunnell, Christopher
193 91 Rogers, Chris
<pre>
194 34 Tunnell, Christopher
Ran 79 tests in 251.375s
195 1 Tunnell, Christopher
196 112 Rogers, Chris
OK (SKIP=20)
197 111 Rogers, Chris
</pre>
198 91 Rogers, Chris
199 112 Rogers, Chris
Sometimes the test script may skip some tests because a certain library was not available. A test failure looks like
200 91 Rogers, Chris
201
<pre>
202
Ran 79 tests in 251.375s
203
204 34 Tunnell, Christopher
FAILED (errors=1, failures=1)
205 86 Tunnell, Christopher
</pre>
206 34 Tunnell, Christopher
207 114 Dobbs, Adam
If you run into issues, please send the output of:
208
209
<pre>
210
bash run_tests.bash
211
</pre>
212
213 120 Blot, Summer
to us through an issue by clicking 'New Issue' above.
214 114 Dobbs, Adam
215 84 Rogers, Chris
You are now ready to run MAUS!
216
217
h3. Troubleshooting
218
219 151 Rogers, Chris
If you aren't sure, a sample @install.log@ can be found "here":http://micewww.pp.rl.ac.uk/maus/MAUS_latest_version/install.log
220 1 Tunnell, Christopher
221 151 Rogers, Chris
* *I get errors in the test output*: this is normal - if the tests finish with a line like *OK*, then the tests passed. If the tests finish with a line like *FAILED (errors=1, failures=1)* (or worse a segmentation fault), then the tests failed. Some of the tests are actually checking that errors are produced on bad input. Sample output for the installer are available.
222 96 Rogers, Chris
* *MAUS does not import* - are you using a symbolic link?  See #770
223 1 Tunnell, Christopher
* *I get a message like FATAL: Failed to install python module matplotlib* and then some more error messages - you may need to forward X11 connections to install matplotlib. See #1246
224 151 Rogers, Chris
* *I get an error about Python versions when I run ./configure*: this is normal - you need to install third party libraries (including python 2.7) by doing <pre>bash ${MAUS_ROOT_DIR}/third_party/build_all.bash</pre> Better to just follow the install instructions above.
225 156 Rogers, Chris
* *I get a failure in the ROOT build - ROOT fails to find freetype.h* - if you have canopy installed, this makes an incompatible version of freetype. Uninstall canopy.
226 118 Rogers, Chris
227
h1. Other useful libraries/applications
228
229
MAUS doesn't require these libraries to build or run, but they may provide useful functionality for documentation, installation, etc
230
231 148 Rogers, Chris
h2. Rebuilding with Geant4.9.5
232
233
MAUS comes prepacked with a script to build against geant4.9.5.p01. In order to build against geant4.9.5, please use the following script:
234
235
<pre>
236
bash third_party/install_build_test_geant4.9.5.p01.bash
237
source env.sh
238
source env_geant4.9.5.p01.sh
239
</pre>
240
241
Note this is an experimental feature - however it is regularly tested against a scientific linux build "here":http://test.mice.rl.ac.uk/view/Trunk/job/MAUS_geant4.9.5.p01/
242
243 119 Rogers, Chris
h2. Documentation
244
245
To build the documentation, you will need
246
247 124 Rogers, Chris
* *doxygen* automatic code documentation tool "website":www.doxygen.org/
248
* *latex* typesetting tool "website":www.latex-project.org/
249
* *latex2html* for making html documents "website":http://www.latex2html.org/
250 123 Rogers, Chris
* *graphviz* (dot) for making class layouts, etc "website":http://www.graphviz.org/ "documentation":http://www.graphviz.org/Documentation/dotguide.pdf 
251 119 Rogers, Chris
252 149 Rogers, Chris
h2. Visualisation
253
254
We use @vrml@ as our default visualisation format. There are a number of viewers that may or may not work for viewing VRML files.
255
256
* Scientific Linux: If you have a VRML viewer that works in SL, please email the developers.
257
* Ubuntu: Try "paraview":http://www.paraview.org/
258
<pre>
259
sudo apt-get install paraview
260
/usr/bin/paraview g4_00.wrl
261
click on eye icon in left menu bar
262
</pre>
263 163 Rogers, Chris
or blender
264
<pre>
265
sudo apt-get install blender
266
Click on file > import to import a wrl file
267
</pre>
268 1 Tunnell, Christopher
* Windows: Try "Instant Player":http://www.instantreality.org/downloads/ or "FreeWRL":http://freewrl.sourceforge.net/
269 150 Rogers, Chris
* Other: There are a few options listed in #1250
270 149 Rogers, Chris
271 157 Rogers, Chris
h2. Online use (and testing)
272
273
In order to run the online tests, you will need some extra libraries - please see instructions [[MLCR_Deployment|here]]