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
* 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.
40
+
* 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.
42
42
43
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.
44
44
@@ -47,6 +47,7 @@ Only in case you cannot install aliBuild in the way described above, you can ins
47
47
<h6id="prereq-for-centos7"> aliBuild prerequisites for CentOS7 </h6>
48
48
49
49
With root permission, i.e. `sudo` or as `root`install the prerequisits using:
<h6id="prereq-for-alma9"> aliBuild prerequisites for AlmaLinux9 </h6>
87
89
88
90
With root permission, i.e. `sudo` or as `root`install the prerequisits using:
91
+
89
92
```bash
90
93
dnf install -y epel-release dnf-plugins-core
91
94
dnf update -y
@@ -120,7 +123,6 @@ Xcode bundles the necessary tools to build software in the apple ecosystem inclu
120
123
* Install Homebrew using the [instructions on their webpage](https://brew.sh/).
121
124
* Once installed detect any problems regarding Homebrew and your system using: `brew doctor`
122
125
123
-
124
126
**Uninstall ROOT**<br>
125
127
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
128
@@ -138,7 +140,6 @@ Note that Homebrew does not run as root. Do not prepend sudo to any of the follo
<h6id="prereq-for-ubuntu">aliBuild prerequisites for Ubuntu</h6>
143
144
144
145
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:
@@ -150,13 +151,17 @@ ALICE software on Ubuntu is supported on a best effort basis. There is no guaran
150
151
**Install required system packages**<br>
151
152
152
153
With root permissions, i.e. sudo, update your package sources:
154
+
153
155
```bash
154
156
sudo apt update -y
155
157
```
158
+
156
159
With root permissions, i.e. `sudo`, install the following packages:
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):
201
+
195
202
```bash
196
203
export ALIBUILD_WORK_DIR="$HOME/alice/sw"
197
204
eval"$(alienv shell-helper)"
198
205
```
206
+
199
207
The first line tells what directory is used as "build cache", the second line installs a "shell helper" that makes easier to run certain aliBuild-related commands.
200
208
201
209
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.
@@ -204,6 +212,8 @@ Note that this directory tends to grow in size over time, and it is the one you
204
212
205
213
When `aliBuild`is installed on your computer and your prerequisits are statisfied, you can move to the next step.
206
214
215
+
See also [shell rc utilities](../tools/README.md#shell-rc-utilities).
216
+
207
217
## Prepare your source code
208
218
209
219
We assume your work area is `~/alice`.
@@ -318,6 +328,8 @@ For example: `ninja PWGCF/Tasks/install`
Tools which are not part of the O2(Physics) analysis framework and can make your work with it much more effective.
9
+
10
+
## Setup diagnostic tool
11
+
12
+
This simple Bash script prints a summary of some basic information about your system and your O2Physics installation setup.
13
+
14
+
It can be useful to provide this summary when [requesting support](../troubleshooting/README.md#reporting-problems) concerning a problem with your analysis framework.
15
+
16
+
Download the [`summarise_o2p_setup.sh`](summarise_o2p_setup.sh) script and run it with `bash` in your `alice` directory.
17
+
18
+
## Dependency finder
19
+
20
+
Tool to explore input/output dependencies between O2Physics workflows and tables.
21
+
22
+
See the dedicated [Dependency finder](dependencyFinder.md) page.
23
+
24
+
## O2 linter
25
+
26
+
Tool to detect O2-specific (and some common C++) issues in the code.
27
+
28
+
See the dedicated [O2 linter](o2linter.md) page.
29
+
30
+
## Pre-commit hooks
31
+
32
+
[Git hooks](https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks) are scripts hooked to certain Git commands.
33
+
Pre-commit hooks run when you execute `git commit` and are used to validate the staged changes that are about to be committed.
34
+
If any hook fails, the commit is not made.
35
+
36
+
In the O2Physics repository, pre-commit hooks are [configured](https://github.com/AliceO2Group/O2Physics/blob/master/.pre-commit-config.yaml) to format C++ code with [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and lint it (check for issues) with [cpplint](https://github.com/cpplint/cpplint).
37
+
This way you can make sure that your changes will pass the C++ formatting check and the cpplint check in [MegaLinter](https://megalinter.io/) when you make your pull request.
`clang-tidy` is a clang-based C++ linter tool for diagnosing and fixing typical programming errors, like style violations or bugs.
54
+
(See the [list of checks](https://clang.llvm.org/extra/clang-tidy/checks/list.html).)
55
+
56
+
### Prerequisites for using clang-tidy
57
+
58
+
- You need to have O2Physics successfully compiled.
59
+
- Verify that there is a valid symbolic link `compile_commands.json` in the O2Physics directory pointing to the `alice/sw/BUILD/.../O2Physics` directory.
60
+
61
+
### Tips
62
+
63
+
#### Cleaning `#include`s
64
+
65
+
The [`misc-include-cleaner`](https://clang.llvm.org/extra/clang-tidy/checks/misc/include-cleaner.html) check can fix missing and unused `#include`s.
66
+
This helps to apply the [Include What You Use](https://github.com/AliceO2Group/O2Physics/issues/8357) principle which allows to maintain header dependencies clean.
67
+
68
+
#### Sorting `#include`s
69
+
70
+
The [`llvm-include-order`](https://clang.llvm.org/extra/clang-tidy/checks/llvm/include-order.html) check sorts `#include`s from most specific to least specific to ensure that the headers does not have any hidden dependencies.
71
+
72
+
Unfortunately, the [LLVM include style](https://llvm.org/docs/CodingStandards.html#include-style) is incompatible with the [Google include style](https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes) applied by `cpplint`.
73
+
74
+
#### Testing (and fixing) many files at once
75
+
76
+
Here is an example of how to run the `misc-include-cleaner` check in parallel on all `.h` and `.cxx` files in the current directory.
The [`parallel`](https://www.gnu.org/software/parallel/) command is used to parallelise the execution of the `clang-tidy` command for all files.
83
+
84
+
For each file, `clang-tidy` will first try to compile it and then run the enabled check(s) and fix found problems (the `--fix` option).
85
+
The messages are redirected into `clang-tidy.log`.
86
+
The file name and the exit code are printed below the output of `clang-tidy` so that you can get the list of files for which `clang-tidy` failed with `grep " 1$" "clang-tidy.log"`.
87
+
88
+
## [Visual Studio Code (VS Code)](https://code.visualstudio.com/)
89
+
90
+
Integrated development environment
91
+
92
+
See [how to run O2 linter from VS Code](o2linter.md#in-visual-studio-code)
93
+
94
+
### Useful extensions
95
+
96
+
-[clangd](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd) - C/C++ completion, navigation, and insights
97
+
-[json](https://marketplace.visualstudio.com/items?itemName=ZainChen.json) - Json for Visual Studio Code
98
+
-[Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one) - All you need to write Markdown (keyboard shortcuts, table of contents, auto preview and more)
99
+
-[Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) - Python language support with extension access points for IntelliSense (Pylance), Debugging (Python Debugger), linting, formatting, refactoring, unit tests, and more.
100
+
-[Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) - A Visual Studio Code extension with support for the Ruff linter and formatter.
101
+
-[ShellCheck](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck) - Integrates ShellCheck into VS Code, a linter for Shell scripts.
102
+
-[YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) - YAML Language Support by Red Hat, with built-in Kubernetes syntax support
103
+
-[Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) - Open any folder on a remote machine using SSH and take advantage of VS Code's full feature set.
104
+
-[PDF Viewer](https://marketplace.visualstudio.com/items?itemName=mathematic.vscode-pdf) - Portable document format (PDF) viewer for Visual Studio Code.
105
+
106
+
## Shell rc utilities
107
+
108
+
You can use the [`bashrc-alice.sh`](bashrc-alice.sh) file to add ALICE-related utilities in your Bash environment.
109
+
110
+
The file provides:
111
+
112
+
- variables needed to [configure aliBuild](../gettingstarted/installing.md#configure-alibuild)
113
+
- utility functions for [recompiling with `ninja`](../gettingstarted/installing.md#building-partially-for-development-using-ninja)
114
+
- utility functions for [debugging compilation and runtime failures](../troubleshooting/README.md#finding-problems)
115
+
116
+
Add the [`bashrc-alice.sh`](bashrc-alice.sh) file in your home directory (`~`) and source it in your Bash environment by adding the following line in the `~/.bashrc` file.
The Run 3 validation framework is a tool for an easy execution, testing and validation of any O2Physics analysis code on large local data samples.
125
+
126
+
It is extensively configurable and provides similar features as AliHyperloop, such as:
127
+
128
+
- Dataset management
129
+
- Support of linked-derived-data input
130
+
- Automatic JSON configuration based on input properties
131
+
- Automatic workflow topology generation based on "wagon" dependencies
132
+
- Job parallelisation
133
+
- Table saving
134
+
- Output merging
135
+
- Diagnostics
136
+
137
+
Among several other utilities, it includes a [maintenance script](https://github.com/AliceO2Group/Run3AnalysisValidation?tab=readme-ov-file#keep-your-repositories-and-installations-up-to-date-and-clean) for automated maintenance of Git repositories and aliBuild packages.
0 commit comments