Skip to content

Commit 31250d0

Browse files
authored
Merge pull request #308 from vkucera/install
Update installation instructions
2 parents adad2ef + b886eb8 commit 31250d0

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

docs/gettingstarted/installing.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ dnf install -y alice-o2-full-deps alibuild
108108
<h6 id="prereq-for-macos">aliBuild prerequisites for macOS</h6>
109109

110110
**Get Xcode**<br>
111+
111112
Xcode bundles the necessary tools to build software in the apple ecosystem including compilers, build systems and version control.
112113

113114
* Download it from the [App Store](https://itunes.apple.com/gh/app/xcode/id497799835?mt=12)
@@ -118,12 +119,14 @@ Xcode bundles the necessary tools to build software in the apple ecosystem inclu
118119
`sudo xcodebuild -license`
119120

120121
**Get Homebrew**<br>
122+
121123
[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.
122124

123125
* Install Homebrew using the [instructions on their webpage](https://brew.sh/).
124126
* Once installed detect any problems regarding Homebrew and your system using: `brew doctor`
125127

126128
**Uninstall ROOT**<br>
129+
127130
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.
128131

129132
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`.
@@ -256,6 +259,46 @@ aliBuild build O2Physics
256259

257260
See the [Troubleshooting](../troubleshooting/README.md) section for debugging tips if the build fails.
258261

262+
## Delete obsolete builds
263+
264+
With frequent rebuilding of packages, obsolete builds can pile up and occupy a lot of precious
265+
disk space.
266+
267+
### Basic cleanup
268+
269+
The simplest way to get rid of obsolete builds is to let aliBuild do its best by running:
270+
271+
```bash
272+
aliBuild clean
273+
```
274+
275+
which can take the optional argument `--aggressive-cleanup` that deletes also source code of built
276+
dependency packages and downloaded `.tar.gz` archives.
277+
278+
In general, it's good practice to run `aliBuild clean` always after `aliBuild build`.
279+
280+
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.
282+
Manual intervention is therefore sometimes needed.
283+
284+
### Deep cleanup
285+
286+
If you want to keep only the latest builds of your development packages (and their dependencies),
287+
you can make aliBuild delete the rest with a little trick.
288+
289+
1. Delete symlinks to all builds:
290+
291+
```bash
292+
find $ALIBUILD_WORK_DIR/$(aliBuild architecture)/ -mindepth 2 -maxdepth 2 -type l -delete
293+
find $ALIBUILD_WORK_DIR/BUILD/ -mindepth 1 -maxdepth 1 -type l -delete
294+
```
295+
296+
In case you specified the architecture manually (using the `-a` option with `aliBuild build`), you should replace `$(aliBuild architecture)` with your manually specified architecture.
297+
298+
2. Recreate symlinks to the latest builds of development packages (and their dependencies)
299+
by running `aliBuild build` for each development package.
300+
3. Let aliBuild delete all the other builds by running `aliBuild clean`.
301+
259302
## Use your local software installations
260303

261304
You will not find the packages you have built immediately available on your shell.
@@ -293,6 +336,10 @@ You also need to have `direnv` installed and hooked (see [instructions](https://
293336
This only builds O2Physics. If you have updated O2 or alidist, you first need to do a full build with aliBuild.
294337
```
295338
339+
```danger
340+
Make sure that you are not inside any environment! (You can check with `alienv list` for aliBuild environments and with `echo $VIRTUAL_ENV` for virtual Python environments.)
341+
```
342+
296343
Go to the build directory.
297344
298345
```bash

0 commit comments

Comments
 (0)