Project

General

Profile

Install » History » Version 187

Dobbs, Adam, 16 May 2017 16:00

1 187 Dobbs, Adam
{{>toc}}
2 4 Tunnell, Christopher
3 10 Tunnell, Christopher
h1. Introduction
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 160 Taylor, Ian
* If you are at RAL (and on the RAL Staff or MICE-Net networks) you will need to setup the RAL proxy. Please run +export http_proxy=wwwcache.rl.ac.uk:8080+ (or equivalent).  This is not required if on MICE-ENet, eduroam or STFC-FacilitiesUsers).
11 35 Tunnell, Christopher
12 107 Rogers, Chris
h1. Supported Distributions
13
14 110 Rogers, Chris
We support recent versions of
15 108 Rogers, Chris
* Scientific Linux
16
* CENT OS
17
18
Other Linux distributions are supported on a "best effort" basis.
19 107 Rogers, Chris
20 1 Tunnell, Christopher
h1. Prerequisites
21 21 Tunnell, Christopher
22 105 Tunnell, Christopher
_Most installation problems are a result of people not reading this section_
23 1 Tunnell, Christopher
24 105 Tunnell, Christopher
You will need a few GBs of free space on your harddrive for Geant4 and ROOT (which will be installed along with MAUS).
25
26 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.
27
28 90 Tunnell, Christopher
h2. Scientific Linux/Redhat/Fedora/Centos
29 1 Tunnell, Christopher
30 158 Rogers, Chris
Remove Canopy if you have it installed. It causes conflicts with the default freetype (Ref. #1291).
31
32 23 Tunnell, Christopher
To install the tools required to build software on Scientific Linux, you must run the following commands:
33 1 Tunnell, Christopher
34 23 Tunnell, Christopher
<pre>
35
sudo yum groupinstall "Development Tools"
36
sudo yum groupinstall "Development Libraries"
37 168 Mohayai, Tanaz Angelina
sudo yum install wget libX11-devel libXft-devel libXext-devel libXpm-devel libX11-devel libpng-devel tcl-devel tk-devel sqlite-devel
38 161 Rajaram, Durga
sudo yum install cmake
39 23 Tunnell, Christopher
</pre>
40 1 Tunnell, Christopher
41 62 Tunnell, Christopher
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 51 Tunnell, Christopher
43 161 Rajaram, Durga
> *Geant 4.9.6p02 requires cmake*. Please also run:
44
<pre> sudo yum install cmake</pre>
45
46 1 Tunnell, Christopher
> *Scientific Linux 4.8 only*. Please also run:
47 136 Rogers, Chris
> 
48
> <pre>sudo yum install xorg-x11-devel</pre>
49
50 162 Greis, Jan
When generating the documentation via doxygen, Graphviz is required to create graphs. To install, run
51
<pre> sudo yum install graphviz</pre>
52 136 Rogers, Chris
53 88 Tunnell, Christopher
h2. Debian or Ubuntu
54 23 Tunnell, Christopher
55
To install the tools required to build software on Debian-based systems, you must run the following commands:
56
57
<pre>
58 187 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 libXpm-devel libXft-dev
59 1 Tunnell, Christopher
</pre>
60
61
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.
62 137 Rogers, Chris
63 161 Rajaram, Durga
> *Geant 4.9.6p02 requires cmake*. Please also run:
64 137 Rogers, Chris
> 
65 166 Snopok, Pavel
> <pre>sudo apt-get install cmake</pre>
66 47 Tunnell, Christopher
67 162 Greis, Jan
When generating the documentation via doxygen, Graphviz is required to create graphs. To install, run
68
<pre> sudo apt-get install graphviz</pre>
69
70 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
71
("ROOTTalk":http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=17419)
72
To get around this, as superuser, do
73
<pre>
74
ln -s /usr/include/freetype2 /usr/include/freetype
75
</pre>
76
77 88 Tunnell, Christopher
h2. OpenSUSE
78 46 Tunnell, Christopher
79
To install the required tools, you must run the following command:
80 1 Tunnell, Christopher
81 46 Tunnell, Christopher
<pre>
82
sudo zypper install -t pattern devel_C_C++
83
</pre>
84 155 Rajaram, Durga
85
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.
86 1 Tunnell, Christopher
87 162 Greis, Jan
When generating the documentation via doxygen, Graphviz is required to create graphs.
88
89 155 Rajaram, Durga
h2. Other distribution
90 88 Tunnell, Christopher
91 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).
92 25 Tunnell, Christopher
93 24 Tunnell, Christopher
h1. Getting the code
94 87 Tunnell, Christopher
95 178 Dobbs, Adam
There are a number of options for obtaining MAUS:
96 25 Tunnell, Christopher
97 122 Rogers, Chris
h2. Using a packaged tarball
98 25 Tunnell, Christopher
99 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
100 25 Tunnell, Christopher
<pre>
101 176 Dobbs, Adam
md5sum -c MAUS-vX.X.X.tar.gz.md5
102 1 Tunnell, Christopher
</pre>
103
104 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
105 128 Rogers, Chris
<pre>
106 176 Dobbs, Adam
tar xvfz MAUS-vX.X.X.tar.gz
107 128 Rogers, Chris
</pre>
108
You should now have a directory called 'maus'.
109 1 Tunnell, Christopher
110 182 Dobbs, Adam
h2. Bazaar and Launchpad (recommended for developers)
111 1 Tunnell, Christopher
112 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.
113 25 Tunnell, Christopher
114 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:
115 72 Tunnell, Christopher
116 1 Tunnell, Christopher
<pre>
117 181 Dobbs, Adam
mkdir MAUS
118
bzr init-repo MAUS
119
cd MAUS
120 1 Tunnell, Christopher
bzr branch lp:maus
121
</pre>
122
123 181 Dobbs, Adam
This will branch a copy of the release branch. To get a copy of the development trunk, use the following command:
124 1 Tunnell, Christopher
<pre>
125
bzr branch lp:maus/merge
126
</pre>
127
128
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.
129
130 185 Dobbs, Adam
*If you want to publish results based on MAUS, please use a release version of the code*.
131
132 182 Dobbs, Adam
h2. Git and GitHub (beta support)
133 181 Dobbs, Adam
134 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.
135 181 Dobbs, Adam
136
To obtain the code use the following steps:
137 177 Dobbs, Adam
138
* Optional: set up an account on github and add an ssh key
139
* Clone the MAUS repository using:
140
<pre>
141
git clone git@github.com:mice-software/maus.git
142
</pre>
143
* Move into the @maus@ directory and check the branches present with:
144
<pre>
145
git branch -av
146
</pre>
147
The following branches should be present:
148
** @master@ (the release branch)
149
** @merge@ (the development branch)
150
** @release-candidate@ (used by the release manager)
151 25 Tunnell, Christopher
152 184 Dobbs, Adam
* Checkout the branch you want using e.g. for the release:
153
<pre>
154
git checkout master
155
</pre>
156
157 87 Tunnell, Christopher
*If you want to publish results based on MAUS, please use a release version of the code*.
158 1 Tunnell, Christopher
159 31 Tunnell, Christopher
h1. Dependencies and building MAUS
160
161 1 Tunnell, Christopher
MAUS will try to help you by installing all of its dependencies for you.  
162 31 Tunnell, Christopher
163 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.
164
* If running remotely, you may need to forward X11 connections (use ssh -X or ssh -Y)
165 97 Dobbs, Adam
166 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!*):
167 31 Tunnell, Christopher
168 1 Tunnell, Christopher
<pre>
169 129 Rogers, Chris
cd maus
170 102 Tunnell, Christopher
./install_build_test.bash
171 31 Tunnell, Christopher
</pre>
172 1 Tunnell, Christopher
173 172 Dobbs, Adam
Various arguments may be appended to modify the build procedure:
174
175 173 Dobbs, Adam
* Build with N threads:
176
<pre> -j N </pre>
177
178
* Use an existing MAUS installation for the third party libraries (drastically cuts the build time):
179
<pre> -t /path/to/other/maus </pre>
180
181
* Make the build verbose:
182
<pre> -v 1 </pre>
183
184
* Use your system gcc compiler (must support C++11, anything at version 4.8 or above should do):
185 174 Dobbs, Adam
<pre> --use-system-gcc true </pre>
186 172 Dobbs, Adam
187 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:
188 34 Tunnell, Christopher
189 91 Rogers, Chris
<pre>
190 34 Tunnell, Christopher
Ran 79 tests in 251.375s
191 1 Tunnell, Christopher
192 112 Rogers, Chris
OK (SKIP=20)
193 111 Rogers, Chris
</pre>
194 91 Rogers, Chris
195 112 Rogers, Chris
Sometimes the test script may skip some tests because a certain library was not available. A test failure looks like
196 91 Rogers, Chris
197
<pre>
198
Ran 79 tests in 251.375s
199
200 34 Tunnell, Christopher
FAILED (errors=1, failures=1)
201 86 Tunnell, Christopher
</pre>
202 34 Tunnell, Christopher
203 114 Dobbs, Adam
If you run into issues, please send the output of:
204
205
<pre>
206
bash run_tests.bash
207
</pre>
208
209 120 Blot, Summer
to us through an issue by clicking 'New Issue' above.
210 114 Dobbs, Adam
211 84 Rogers, Chris
You are now ready to run MAUS!
212
213
h3. Troubleshooting
214
215 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
216 1 Tunnell, Christopher
217 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.
218 96 Rogers, Chris
* *MAUS does not import* - are you using a symbolic link?  See #770
219 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
220 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.
221 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.
222 118 Rogers, Chris
223
h1. Other useful libraries/applications
224
225
MAUS doesn't require these libraries to build or run, but they may provide useful functionality for documentation, installation, etc
226
227 148 Rogers, Chris
h2. Rebuilding with Geant4.9.5
228
229
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:
230
231
<pre>
232
bash third_party/install_build_test_geant4.9.5.p01.bash
233
source env.sh
234
source env_geant4.9.5.p01.sh
235
</pre>
236
237
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/
238
239 119 Rogers, Chris
h2. Documentation
240
241
To build the documentation, you will need
242
243 124 Rogers, Chris
* *doxygen* automatic code documentation tool "website":www.doxygen.org/
244
* *latex* typesetting tool "website":www.latex-project.org/
245
* *latex2html* for making html documents "website":http://www.latex2html.org/
246 123 Rogers, Chris
* *graphviz* (dot) for making class layouts, etc "website":http://www.graphviz.org/ "documentation":http://www.graphviz.org/Documentation/dotguide.pdf 
247 119 Rogers, Chris
248 149 Rogers, Chris
h2. Visualisation
249
250
We use @vrml@ as our default visualisation format. There are a number of viewers that may or may not work for viewing VRML files.
251
252
* Scientific Linux: If you have a VRML viewer that works in SL, please email the developers.
253
* Ubuntu: Try "paraview":http://www.paraview.org/
254
<pre>
255
sudo apt-get install paraview
256
/usr/bin/paraview g4_00.wrl
257
click on eye icon in left menu bar
258
</pre>
259 163 Rogers, Chris
or blender
260
<pre>
261
sudo apt-get install blender
262
Click on file > import to import a wrl file
263
</pre>
264 1 Tunnell, Christopher
* Windows: Try "Instant Player":http://www.instantreality.org/downloads/ or "FreeWRL":http://freewrl.sourceforge.net/
265 150 Rogers, Chris
* Other: There are a few options listed in #1250
266 149 Rogers, Chris
267 157 Rogers, Chris
h2. Online use (and testing)
268
269
In order to run the online tests, you will need some extra libraries - please see instructions [[MLCR_Deployment|here]]
270
271 119 Rogers, Chris
h2. Other Stuff
272
273
* *lcov* C++ code coverage tool (activated by maus_lcov environment variable)
274 134 Rogers, Chris
* *bzr* for accessing the repository. As easy as 
275 133 Rogers, Chris
<pre>source env.sh
276
easy_install bzr</pre>
277 135 Rogers, Chris
In ubuntu you may also need to do 
278
<pre>
279
sudo apt-get install libbz2-dev
280
</pre>
281
which apparently doesn't come by default.