Skip to content

Commit 82e07cb

Browse files
committed
Restructure aliBuild installation instructions. Improve text.
1 parent efbd9ea commit 82e07cb

File tree

1 file changed

+60
-76
lines changed

1 file changed

+60
-76
lines changed

docs/gettingstarted/installing.md

Lines changed: 60 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,46 @@ title: Installing O2 and O2Physics
55

66
# Installing O2 and O2Physics
77

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.
1010

11-
## Installing aliBuild
11+
ALICE uses [aliBuild](https://alisw.github.io/alibuild/) to build software.
1212

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
1614

1715
* knows how to build software via per-package recipes,
1816
* manages the dependencies consistently,
17+
* can automatically download precompiled binaries if possible,
1918
* 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.
2320

24-
#### Prerequisites
21+
## Install aliBuild
2522

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+
According to your operating system, please follow the corresponding instructions below.
2724

28-
##### Primary supported platform
25+
Primary supported platforms:
2926

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)
3330

34-
##### Platforms supported on a best-effort basis
31+
Platforms supported on a best-effort basis:
3532

36-
* [macOS Sonoma and Sequoia (14.0, 15.0)](#prereq-for-macos)
37-
* [Ubuntu (20.04 LTS, 22.04 LTS, 24.04 LTS)](#prereq-for-ubuntu)
38-
* [Fedora](#prereq-for-fedora)
33+
* [macOS](#alibuild-for-macos): Sonoma (14), Sequoia (15)
34+
* [Ubuntu](#alibuild-for-ubuntu): 20.04 LTS, 22.04 LTS, 24.04 LTS
35+
* [Fedora](#alibuild-for-fedora)
3936
* Linux Mint
4037
* 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.
4239

4340
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.
4441

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.
4644

47-
<h6 id="prereq-for-centos7"> aliBuild prerequisites for CentOS7 </h6>
45+
### CentOS 7 {#alibuild-for-centos7}
4846

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:
5048

5149
```bash
5250
cat << EOF > /etc/yum.repos.d/alice-system-deps.repo
@@ -62,9 +60,9 @@ yum update -y
6260
yum install -y alibuild
6361
```
6462

65-
<h6 id="prereq-for-centos8"> aliBuild prerequisites for CentOS8 </h6>
63+
### CentOS 8, AlmaLinux 8 {#alibuild-for-centos8}
6664

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:
6866

6967
```bash
7068
yum install -y epel-release
@@ -85,9 +83,9 @@ yum update -y
8583
yum install -y alice-o2-full-deps alibuild
8684
```
8785

88-
<h6 id="prereq-for-alma9"> aliBuild prerequisites for AlmaLinux9 </h6>
86+
### AlmaLinux 9 {#alibuild-for-alma9}
8987

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:
9189

9290
```bash
9391
dnf install -y epel-release dnf-plugins-core
@@ -105,79 +103,64 @@ dnf update -y
105103
dnf install -y alice-o2-full-deps alibuild
106104
```
107105

108-
<h6 id="prereq-for-macos">aliBuild prerequisites for macOS</h6>
106+
### macOS {#alibuild-for-macos}
109107

110-
**Get Xcode**<br>
108+
#### Get Xcode
111109

112110
Xcode bundles the necessary tools to build software in the apple ecosystem including compilers, build systems and version control.
113111

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 (Applicaions>Utilities>Terminal) and install the command line tools using: `sudo xcode-select --install`
115+
* Approve the license conditions by: `sudo xcodebuild -license`
120116

121-
**Get Homebrew**<br>
117+
#### Get Homebrew
122118

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).
124120

125121
* 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`.
127123

128-
**Uninstall ROOT**<br>
124+
#### Uninstall ROOT
129125

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.
131127

132128
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`.
133129

134130
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.
135131

136-
**Install the required packages**<br>
132+
#### Install the required packages
137133

138134
Note that Homebrew does not run as root. Do not prepend sudo to any of the following commands.
139135

140-
* Install the prerequisites and aliBuild via:<br>
141-
```brew install alisw/system-deps/o2-full-deps alisw/system-deps/alibuild```
142-
* Set up Homebrew in your shell by running the following command:<br>
143-
```echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile```
136+
* 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`
144138
* Close Terminal and reopen it to apply changes.
145139

146-
<h6 id="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}
149141

150-
* Ubuntu 20.04 LTS
151-
* Ubuntu 22.04 LTS
152-
* Ubuntu 24.04 LTS
142+
#### Install required system packages
153143

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:
157145

158146
```bash
159147
sudo apt update -y
160-
```
161-
162-
With root permissions, i.e. `sudo`, install the following packages:
163-
164-
```bash
165148
sudo apt install -y curl libcurl4-gnutls-dev build-essential gfortran libmysqlclient-dev xorg-dev libglu1-mesa-dev libfftw3-dev libxml2-dev git unzip autoconf automake autopoint texinfo gettext libtool libtool-bin pkg-config bison flex libperl-dev libbz2-dev swig liblzma-dev libnanomsg-dev rsync lsb-release environment-modules libglfw3-dev libtbb-dev python3-dev python3-venv python3-pip graphviz libncurses-dev software-properties-common gtk-doc-tools
166149
```
167150

168-
**Installing aliBuild**<br>
151+
#### Install aliBuild {#install-alibuild-for-ubuntu}
169152

170-
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:
171154

172155
```bash
173156
sudo add-apt-repository ppa:alisw/ppa
174157
sudo apt update
175158
sudo apt install python3-alibuild
176159
```
177160

178-
<h6 id="prereq-for-fedora">aliBuild prerequisites for Fedora</h6>
161+
### Fedora {#alibuild-for-fedora}
179162

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:
181164

182165
```bash
183166
yum install -y epel-release
@@ -198,9 +181,9 @@ yum update -y
198181
yum install -y alice-o2-full-deps alibuild
199182
```
200183

201-
### Configure aliBuild
184+
## Configure aliBuild
202185

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):
204187

205188
```bash
206189
export ALIBUILD_WORK_DIR="$HOME/alice/sw"
@@ -211,17 +194,17 @@ The first line tells what directory is used as "build cache", the second line in
211194

212195
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.
213196

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.
215198

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.
217200

218201
See also [shell rc utilities](../tools/README.md#shell-rc-utilities).
219202

220203
## Prepare your source code
221204

222205
We assume your work area is `~/alice`.
223206
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):
225208

226209
```bash
227210
mkdir -p ~/alice
@@ -236,20 +219,21 @@ aliBuild init O2Physics@master
236219
```
237220

238221
If you perform `ls` under your work directory, you will see the packages you have downloaded via
239-
`aliBuild init`, plus an `alidist` directory.
222+
`aliBuild init`, plus the `alidist` directory.
223+
224+
The `alidist` directory contains software recipes, telling aliBuild how the software is built.
240225

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+
```warning
227+
Your `alidist` directory and your software source code are Git repositories **managed by you**. You need to keep them up to date manually.
228+
```
244229

245230
## Check your prerequisites
246231

247232
```bash
248233
aliDoctor O2Physics
249234
```
250235

251-
aliDoctor will warn you that some packages have to be built as they could not be found from the
252-
system.
236+
aliDoctor will warn you if some packages have to be built as they could not be found on the system.
253237

254238
## Build and rebuild
255239

@@ -311,8 +295,8 @@ Load the latest O2Physics version you have built.
311295
alienv enter O2Physics/latest
312296
```
313297

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.
298+
The `alienv enter` command drops you to a new shell with the O2Physics environment.
299+
Unload the packages by simply exiting the environment with the `exit` command.
316300

317301
```warning
318302
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.

0 commit comments

Comments
 (0)