Skip to content

Commit 3254007

Browse files
authored
Update building instructions to correctly load build environment (#2577)
1 parent 5840659 commit 3254007

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

doc/ModulesDevelopment.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,17 @@ The Data Sampling code is part of the AliceO2 repository.
136136

137137
One can of course build using `aliBuild` (`aliBuild build --defaults o2 QualityControl`). However, that will take quite some time as it checks all dependencies and builds everything.
138138

139-
After the initial use of `aliBuild`, which is necessary, the correct way of building is to load the environment with `alienv` and then go to the build directory and run `make` or `ninja`.
139+
After the initial use of `aliBuild`, which is necessary, the quicker way of building is to load the build environment and run `ninja`:
140140

141141
```
142-
alienv enter QualityControl/latest
143142
cd sw/BUILD/QualityControl-latest/QualityControl
144-
make -j8 install # or ninja -j8 install , also adapt to the number of cores available
143+
144+
# option 1
145+
WORK_DIR=~/alice/sw source ~/alice/sw/ubuntu2204_x86-64/QualityControl/latest/etc/profile.d/init.sh # replace paths as needed
146+
# option 2
147+
direnv allow # needs direnv installed, which will then load the build environment automatically
148+
149+
ninja -j8 install # adapt to the number of cores available
145150
```
146151

147152
### User-defined modules
@@ -203,11 +208,14 @@ We will refer in the following section to the module as `Tst` and the task as `R
203208

204209
Now that there is a module, we can build it and test it. First let's build it :
205210
```
206-
# We are in ~/alice, call alienv if not already done
207-
alienv enter QualityControl/latest
208-
# Go to the build directory of QualityControl.
209211
cd sw/BUILD/QualityControl-latest/QualityControl
210-
make -j8 install # or ninja, replace 8 by the number of cores on your machine
212+
213+
# option 1
214+
WORK_DIR=~/alice/sw source ~/alice/sw/ubuntu2204_x86-64/QualityControl/latest/etc/profile.d/init.sh # replace paths as needed
215+
# option 2
216+
direnv allow # needs direnv installed, which will then load the build environment automatically
217+
218+
ninja -j8 install # adapt to the number of cores available
211219
```
212220

213221
To test whether it works, we are going to run a basic workflow made of a producer and the qc, which corresponds to the one we saw in the [QuickStart](QuickStart.md#basic-workflow).
@@ -244,6 +252,7 @@ and
244252
Now we can run it
245253

246254
```
255+
alienv enter QualityControl/latest # enter runtime environment
247256
o2-qc-run-producer | o2-qc --config json://$HOME/alice/QualityControl/Modules/TST/basic-tst.json
248257
```
249258

0 commit comments

Comments
 (0)