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
<h6id="prereq-for-macos">aliBuild prerequisites for macOS</h6>
109
109
110
110
**Get Xcode**<br>
111
+
111
112
Xcode bundles the necessary tools to build software in the apple ecosystem including compilers, build systems and version control.
112
113
113
114
* 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
118
119
`sudo xcodebuild -license`
119
120
120
121
**Get Homebrew**<br>
122
+
121
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.
122
124
123
125
* Install Homebrew using the [instructions on their webpage](https://brew.sh/).
124
126
* Once installed detect any problems regarding Homebrew and your system using: `brew doctor`
125
127
126
128
**Uninstall ROOT**<br>
129
+
127
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.
128
131
129
132
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
256
259
257
260
See the [Troubleshooting](../troubleshooting/README.md) section for debugging tips if the build fails.
258
261
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
+
259
302
## Use your local software installations
260
303
261
304
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://
293
336
This only builds O2Physics. If you have updated O2 or alidist, you first need to do a full build with aliBuild.
294
337
```
295
338
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.)
0 commit comments