You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -5,48 +5,46 @@ title: Installing O2 and O2Physics
5
5
6
6
# Installing O2 and O2Physics
7
7
8
-
ALICE software has several dependencies: aliBuild takes care of downloading them for you. aliBuild
9
-
can also automatically download precompiled binaries if possible.
8
+
Building software has become an increasingly complicated operation, as our software has many dependencies and we expect it to work both on your laptop and on the Grid.
9
+
In addition, we support many Linux distributions and recent macOS versions.
10
10
11
-
## Installing aliBuild
11
+
ALICE uses [aliBuild](https://alisw.github.io/alibuild/) to build software.
12
12
13
-
Building software has become an increasingly complicated operation, as our software has many dependencies and we expect it to work both on your laptop and on the Grid. In addition, we support many Linux distributions and recent macOS versions.
14
-
15
-
ALICE uses aliBuild to build software. aliBuild:
13
+
aliBuild
16
14
17
15
* knows how to build software via per-package recipes,
18
16
* manages the dependencies consistently,
17
+
* can automatically download precompiled binaries if possible,
19
18
* rebuilds only what's necessary,
20
-
* allows several versions of the same software to be installed at the same time.
21
-
22
-
### Operating systems we support
19
+
* allows several versions of the same software to be installed side by side.
23
20
24
-
#### Prerequisites
21
+
##Install aliBuild
25
22
26
-
According to your operating system, please follow the prerequisites below. You will find a list of packages to install and configurations to perform.
23
+
Please follow the corresponding instructions below, according to your operating system.
27
24
28
-
##### Primary supported platform
25
+
Primary supported platforms:
29
26
30
-
*[CentOS 7](#prereq-for-centos7)
31
-
*[CentOS/AlmaLinux 8](#prereq-for-centos8)
32
-
*[AlmaLinux 9](#prereq-for-alma9)
27
+
*[CentOS 7](#alibuild-for-centos7)
28
+
*[CentOS 8, AlmaLinux 8](#alibuild-for-centos8)
29
+
*[AlmaLinux 9](#alibuild-for-alma9)
33
30
34
-
##### Platforms supported on a best-effort basis
31
+
Platforms supported on a best-effort basis:
35
32
36
-
*[macOS Sonoma and Sequoia (14.0, 15.0)](#prereq-for-macos)
* Follow the instructions for the Ubuntu version your Linux Mint version is based on.
41
-
* Specify the corresponding Ubuntu architecture when running the `aliBuild`command using the `-a` option (e.g. `-a ubuntu2004_x86-64` for Ubuntu 20.04). Use the `-a` option also with the `alienv`command.
38
+
* Specify the corresponding Ubuntu architecture when running `aliBuild`commands using the `-a` option (e.g. `-a ubuntu2404_x86-64` for Ubuntu 24.04). Use the `-a` option also with `alienv`commands.
42
39
43
-
If your operating system is *not*in any list, it does not mean our software won't work on it; it will be just more difficult for you to get support for it.
40
+
If your operating system is *not*listed, it does not mean our software won't work on it; it will be just more difficult for you to get support for it.
44
41
45
-
Only in case you cannot install aliBuild in the way described above, you can install aliBuild manually. This procedure should only be used as a fall-back, in case you cannot follow the instructions for your operating system linked above.
42
+
Only in case you cannot install aliBuild in the way described below, you can install aliBuild manually.
43
+
This procedure should only be used as a fallback, in case you cannot follow the instructions for your operating system linked above.
46
44
47
-
<h6id="prereq-for-centos7"> aliBuild prerequisites for CentOS7 </h6>
45
+
### CentOS 7 {#alibuild-for-centos7}
48
46
49
-
With root permission, i.e. `sudo` or as `root`install the prerequisits using:
47
+
With root permissions, i.e. `sudo` or as `root`, install the prerequisites and aliBuild using:
<h6id="prereq-for-centos8"> aliBuild prerequisites for CentOS8 </h6>
63
+
### CentOS 8, AlmaLinux 8 {#alibuild-for-centos8}
66
64
67
-
With root permission, i.e. `sudo` or as `root` install the prerequisits using:
65
+
With root permissions, i.e. `sudo` or as `root`, install the prerequisites and aliBuild using:
68
66
69
67
```bash
70
68
yum install -y epel-release
@@ -85,9 +83,9 @@ yum update -y
85
83
yum install -y alice-o2-full-deps alibuild
86
84
```
87
85
88
-
<h6id="prereq-for-alma9"> aliBuild prerequisites for AlmaLinux9 </h6>
86
+
### AlmaLinux 9 {#alibuild-for-alma9}
89
87
90
-
With root permission, i.e. `sudo` or as `root`install the prerequisits using:
88
+
With root permissions, i.e. `sudo` or as `root`, install the prerequisites and aliBuild using:
91
89
92
90
```bash
93
91
dnf install -y epel-release dnf-plugins-core
@@ -105,79 +103,64 @@ dnf update -y
105
103
dnf install -y alice-o2-full-deps alibuild
106
104
```
107
105
108
-
<h6id="prereq-for-macos">aliBuild prerequisites for macOS</h6>
106
+
### macOS {#alibuild-for-macos}
109
107
110
-
**Get Xcode**<br>
108
+
#### Get Xcode
111
109
112
110
Xcode bundles the necessary tools to build software in the apple ecosystem including compilers, build systems and version control.
113
111
114
-
* Download it from the [App Store](https://itunes.apple.com/gh/app/xcode/id497799835?mt=12)
115
-
* Open once installed. It will ask to install additional components - approve the action.
116
-
* Open a terminal (Applicaions>Utilities>Terminal) and install the command line tools using: <br>
117
-
*`sudo xcode-select --install`
118
-
* Approve the license conditions by <br>
119
-
`sudo xcodebuild -license`
112
+
* Download it from the [App Store](https://itunes.apple.com/gh/app/xcode/id497799835?mt=12) and install it.
113
+
* Open once installed. It will ask to install additional components. Approve the action.
114
+
* Open a terminal (Applications>Utilities>Terminal) and install the command line tools using: `sudo xcode-select --install`
115
+
* Approve the license conditions by: `sudo xcodebuild -license`
120
116
121
-
**Get Homebrew**<br>
117
+
#### Get Homebrew
122
118
123
-
[Homebrew](https://brew.sh/) is a command-line package manager for macOS used to install software packages similar to `yum` on CentOS or `apt` on Ubuntu.
119
+
[Homebrew](https://brew.sh/) is a command-line package manager for macOS used to install software packages (similar to `yum` on CentOS or `apt` on Ubuntu).
124
120
125
121
* Install Homebrew using the [instructions on their webpage](https://brew.sh/).
126
-
*Once installed detect any problems regarding Homebrew and your system using: `brew doctor`
122
+
*Detect any problems regarding Homebrew and your system using: `brew doctor`.
127
123
128
-
**Uninstall ROOT**<br>
124
+
#### Uninstall ROOT
129
125
130
-
If you have an existing ROOT installation on your system, this will interfere with the aliBuild installation, and will cause difficult-to-debug compilation errors.
126
+
If you have an existing ROOT installation on your system, it will interfere with the aliBuild installation and will cause difficult-to-debug compilation errors.
131
127
132
128
Please uninstall any existing copy of ROOT on your system. The uninstallation method depends on how you installed it. For example, if you originally installed ROOT using Homebrew, you should uninstall it using `brew uninstall root`.
133
129
134
130
After uninstalling ROOT, remove any reference to ROOT from your `.zprofile`, `.zshrc` and any other shell configuration files. Then close and re-open your terminal window.
135
131
136
-
**Install the required packages**<br>
132
+
#### Install the required packages
137
133
138
134
Note that Homebrew does not run as root. Do not prepend sudo to any of the following commands.
* Install the prerequisites and aliBuild via: `brew install alisw/system-deps/o2-full-deps alisw/system-deps/alibuild`
137
+
* Set up Homebrew in your shell by: `echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile`
144
138
* Close Terminal and reopen it to apply changes.
145
139
146
-
<h6id="prereq-for-ubuntu">aliBuild prerequisites for Ubuntu</h6>
147
-
148
-
ALICE software on Ubuntu is supported on a best effort basis. There is no guarantee that software builds or runs correctly. Support requests might have low priority. We were able to successfully build on:
140
+
### Ubuntu {#alibuild-for-ubuntu}
149
141
150
-
* Ubuntu 20.04 LTS
151
-
* Ubuntu 22.04 LTS
152
-
* Ubuntu 24.04 LTS
142
+
#### Install required system packages
153
143
154
-
**Install required system packages**<br>
155
-
156
-
With root permissions, i.e. sudo, update your package sources:
144
+
Update your package sources and install the required system packages:
157
145
158
146
```bash
159
147
sudo apt update -y
160
-
```
161
-
162
-
With root permissions, i.e. `sudo`, install the following packages:
AliBuild, our build tool, is installed as a standard ubuntu package, provided you enable the alisw PPA repository. This is done with:
153
+
Add the [alisw PPA repository](https://launchpad.net/~alisw/+archive/ubuntu/ppa) and install aliBuild as an Ubuntu package:
171
154
172
155
```bash
173
156
sudo add-apt-repository ppa:alisw/ppa
174
157
sudo apt update
175
158
sudo apt install python3-alibuild
176
159
```
177
160
178
-
<h6id="prereq-for-fedora">aliBuild prerequisites for Fedora</h6>
161
+
### Fedora {#alibuild-for-fedora}
179
162
180
-
With root permissions, i.e. `sudo` or as `root` install the prerequisites using:
163
+
With root permissions, i.e. `sudo` or as `root`, install the prerequisites and aliBuild using:
181
164
182
165
```bash
183
166
yum install -y epel-release
@@ -198,9 +181,9 @@ yum update -y
198
181
yum install -y alice-o2-full-deps alibuild
199
182
```
200
183
201
-
###Configure aliBuild
184
+
## Configure aliBuild
202
185
203
-
After you are done installing alibuild you need to configure it by adding the two following lines to your `~/.bashrc`, `~/.bash_profile`, `~/.zshrc` or `~/.zprofile` (depending on your operating system and configuration):
186
+
After installing aliBuild, configure it by adding the following lines to your `~/.bashrc`, `~/.bash_profile`, `~/.zshrc` or `~/.zprofile` (depending on your operating system and configuration):
204
187
205
188
```bash
206
189
export ALIBUILD_WORK_DIR="$HOME/alice/sw"
@@ -211,54 +194,100 @@ The first line tells what directory is used as "build cache", the second line in
211
194
212
195
You need to close and reopen your terminal for the change to be effective. The directory `~/alice/sw` will be created the first time you run aliBuild.
213
196
214
-
Note that this directory tends to grow in size over time, and it is the one you need to remove in case of cleanups.
197
+
Note that this directory tends to grow in size over time and it is the one you need to [clean up](#delete-obsolete-builds) occasionally.
215
198
216
-
When `aliBuild`is installed on your computer and your prerequisits are statisfied, you can move to the next step.
199
+
When `aliBuild`is installed on your computer and your prerequisites are satisfied, you can move to the next step.
217
200
218
201
See also [shell rc utilities](../tools/README.md#shell-rc-utilities).
219
202
220
203
## Prepare your source code
221
204
222
205
We assume your work area is `~/alice`.
223
206
Start with a clean shell where you are not in an `alienv` environment.
224
-
Create the directory and move to it (all the following commands need to be executed in this folder):
207
+
Create the directory and move to it. (All the following commands need to be executed in this directory.):
225
208
226
209
```bash
227
210
mkdir -p ~/alice
228
211
cd~/alice
229
212
```
230
213
231
-
Download O2 and O2Physics:
214
+
Download O2Physics (and optionally O2):
232
215
233
216
```bash
234
-
aliBuild init O2@dev
235
217
aliBuild init O2Physics@master
218
+
aliBuild init O2@dev # optional
236
219
```
237
220
238
-
If you perform `ls` under your work directory, you will see the packages you have downloaded via
239
-
`aliBuild init`, plus an `alidist` directory.
221
+
If you perform `ls` under your work directory, you will see the development packages you have downloaded via
222
+
`aliBuild init`, plus the `alidist` directory.
223
+
224
+
The `alidist` directory contains software recipes, telling aliBuild how the software is built.
240
225
241
-
The `alidist` directory contains software recipes, telling aliBuild how the software is built. Your
242
-
`alidist` directory and your software source code are Git directories **managed by you**: you need
243
-
to keep them up-to-date manually.
226
+
```note
227
+
You only need the O2 source code if you need to modify it. Otherwise, aliBuild will install the O2 version defined in `alidist` as a dependency of O2Physics.
228
+
```
229
+
230
+
```warning
231
+
Your `alidist` directory and your software source code are Git repositories **managed by you**. You need to keep them up to date manually.
232
+
```
244
233
245
234
## Check your prerequisites
246
235
247
236
```bash
248
237
aliDoctor O2Physics
249
238
```
250
239
251
-
aliDoctor will warn you that some packages have to be built as they could not be found from the
252
-
system.
240
+
aliDoctor will warn you if some packages have to be built as they could not be found on the system.
253
241
254
242
## Build and rebuild
255
243
244
+
Build (or rebuild) full O2Physics with:
245
+
256
246
```bash
257
247
aliBuild build O2Physics
258
248
```
259
249
250
+
To set the maximum number of parallel jobs `N`, provide the `-j N` option.
251
+
260
252
See the [Troubleshooting](../troubleshooting/README.md) section for debugging tips if the build fails.
261
253
254
+
### Component-based build
255
+
256
+
To build only parts of O2Physics, provide a space-separated list of requested directories (followed by `/install`) using the `O2PHYSICS_COMPONENTS` variable, e.g.:
On Linux, the components providing the required linked shared libraries also need to be included (e.g. `Tools/ML` for `O2Physics::MLCore`).
264
+
```
265
+
266
+
## Use your local software installations
267
+
268
+
You will not find the packages you have built immediately available on your shell.
269
+
We provide a tool called `alienv` that configures your shell according to the packages you want to load.
270
+
`alienv` is capable of switching between different versions of the same package without a hassle.
271
+
272
+
Load the latest O2Physics version you have built.
273
+
274
+
```bash
275
+
alienv enter O2Physics/latest
276
+
```
277
+
278
+
The `alienv enter` command drops you to a new shell with the O2Physics environment.
279
+
Unload the packages by simply exiting the environment with the `exit` command.
280
+
281
+
```warning
282
+
Dependencies are loaded automatically. Do not attempt to load O2 or ROOT as well! You will find them automatically in the environment. `alienv enter` is verbose and will inform you about the loaded packages.
283
+
```
284
+
285
+
```tip
286
+
If you have built several Git branches of O2Physics, you can enter the environment of a given branch `[branch]` with `alienv enter O2Physics/latest-[branch]-o2`.
287
+
288
+
You can list all your available packages with `alienv q`.
289
+
```
290
+
262
291
## Delete obsolete builds
263
292
264
293
With frequent rebuilding of packages, obsolete builds can pile up and occupy a lot of precious
@@ -278,7 +307,7 @@ dependency packages and downloaded `.tar.gz` archives.
278
307
In general, it's good practice to run `aliBuild clean` always after `aliBuild build`.
279
308
280
309
This might not be enough, as aliBuild will not delete any build directory pointed to by a symlink
281
-
that has "latest" in its name, even when that build is not needed by any other package anymore.
310
+
that has "latest" in its name, even when that build is not needed by any other package any more.
282
311
Manual intervention is therefore sometimes needed.
283
312
284
313
### Deep cleanup
@@ -299,31 +328,6 @@ you can make aliBuild delete the rest with a little trick.
299
328
by running `aliBuild build`for each development package.
300
329
3. Let aliBuild delete all the other builds by running `aliBuild clean`.
301
330
302
-
## Use your local software installations
303
-
304
-
You will not find the packages you have built immediately available on your shell.
305
-
We provide a tool called `alienv` that configures your shell according to the packages you want to load.
306
-
`alienv` is capable of switching between different versions of the same package without a hassle.
307
-
308
-
Load the latest O2Physics version you have built.
309
-
310
-
```bash
311
-
alienv enter O2Physics/latest
312
-
```
313
-
314
-
The `alienv enter`command drops you to a new shell with the O2Physics environment. Unload the packages by simply exiting the environment with
315
-
the `exit` command.
316
-
317
-
```warning
318
-
Dependencies are loaded automatically. Do not attempt to load O2 or ROOT as well! You will find them automatically in the environment. `alienv enter` is verbose and will inform you about the loaded packages.
319
-
```
320
-
321
-
```tip
322
-
If you have built several Git branches of O2Physics, you can enter the environment of a given branch `[branch]` with `alienv enter O2Physics/latest-[branch]-o2`.
323
-
324
-
You can list all your available packages with `alienv q`.
0 commit comments