Skip to content

Commit d8bda10

Browse files
authored
Merge pull request #282 from vkucera/install
Fix and improve installation instructions
2 parents 58a6223 + 4f12955 commit d8bda10

File tree

1 file changed

+31
-33
lines changed

1 file changed

+31
-33
lines changed

docs/gettingstarted/installing.md

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -56,41 +56,51 @@ See the [Troubleshooting](../troubleshooting/README.md) section for debugging ti
5656

5757
## Use your local software installations
5858

59-
You will not find the packages you have built immediately available on your shell: we provide a tool
60-
called `alienv` that configures your shell according to the packages you want to load. `alienv` is
61-
capable of switching between different versions of the same package without a hassle.
59+
You will not find the packages you have built immediately available on your shell.
60+
We provide a tool called `alienv` that configures your shell according to the packages you want to load.
61+
`alienv` is capable of switching between different versions of the same package without a hassle.
6262

63-
**List your available packages with:**
63+
Load the latest O2Physics version you have built.
6464

6565
```bash
66-
alienv q
66+
alienv enter O2Physics/latest
6767
```
6868

69-
**Load the latest version you have built of a package (O2Physics for instance):**
69+
The `alienv enter` command drops you to a new shell with the O2Physics environment. Unload the packages by simply exiting the environment with
70+
the `exit` command.
7071

71-
```bash
72-
alienv enter O2Physics/latest
72+
```warning
73+
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.
7374
```
7475

75-
_⚠️ Dependencies are loaded automatically. Do not attempt to load O2 or ROOT as well, you will
76-
find them automatically in the environment! `alienv enter` is verbose and will inform you about the
77-
loaded packages if you have doubts._
76+
```tip
77+
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`.
7878
79-
The `alienv enter` command drops you to a new shell. Unload the packages by simply exiting it with
80-
the `exit` command.
79+
You can list all your available packages with `alienv q`.
80+
```
8181

8282
## Building partially for development using ninja
8383

84-
This requires that the O2Physics build succeeded. Enter the environment as explained in the previous step specifying in addition the ninja package:
84+
```note
85+
This requires that you have successfully built Git branch `[branch]` (e.g. `master`) of O2Physics with aliBuild (see Section [Build and rebuild](#build-and-rebuild)).
86+
87+
You also need to have [`direnv`](https://direnv.net/docs/installation.html) installed to load the correct build environment automatically when you enter the build directory (and to unload it when you exit).
88+
```
89+
90+
```warning
91+
This only builds O2Physics. If you have updated O2 or alidist, you first need to do a full build with aliBuild.
92+
```
93+
94+
Go to the build directory.
8595

8696
```bash
87-
alienv enter O2Physics/latest ninja/latest
97+
cd "$ALIBUILD_WORK_DIR/BUILD/O2Physics-latest-[branch]/O2Physics"
8898
```
8999

90-
Go to the build directory
100+
Allow `direnv` to load the build environment. (Needed only once in a given directory.)
91101

92102
```bash
93-
cd ~/alice/sw/BUILD/O2Physics-latest/O2Physics
103+
direnv allow
94104
```
95105

96106
You can now rebuild and install entire O2Physics with
@@ -105,13 +115,9 @@ or just a specific directory with
105115
ninja <directory>/install
106116
```
107117

108-
For example:
118+
For example: `ninja PWGCF/Tasks/install`
109119

110-
```bash
111-
ninja PWGCF/Tasks/install
112-
```
113-
114-
You can redirect the terminal output to the standard aliBuild log file and see whether the build succeeded:
120+
**Tip:** You can redirect the terminal output to the standard aliBuild log file and see whether the build succeeded:
115121

116122
```bash
117123
ninja install > ../log 2>&1 && echo "Good" || echo "Bad"
@@ -123,18 +129,10 @@ A specific executable can be built in the staging directory `stage/bin` with
123129
ninja stage/bin/<target>
124130
```
125131

126-
For example:
127-
128-
```bash
129-
ninja stage/bin/o2-analysis-cf-correlations
130-
```
132+
For example: `ninja stage/bin/o2-analysis-cf-correlations`
131133

132134
The executable can then be executed directly from the staging directory:
133135

134136
```bash
135-
./stage/bin/o2-analysis-cf-correlations
136-
```
137-
138-
```danger
139-
This only builds O2Physics. If you have updated O2 or alidist, you first need to do a full build with aliBuild. Then enter the environment again before using ninja.
137+
stage/bin/<target>
140138
```

0 commit comments

Comments
 (0)