Skip to content

Commit 9f1b240

Browse files
committed
[legacy] documentation: Add infos macosx
Describe some known problems on macosx and the corresponding solutions.
1 parent 40b1f83 commit 9f1b240

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

legacy/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,41 @@ cmake -S <path-to-source> -B <path-to-build> -C <path-to-source>/FairSoftConfig.
5151

5252
Set the installation prefix and more customization options in the [`FairSoftConfig.cmake`](../FairSoftConfig.cmake) file itself.
5353

54+
#### 3.1 CMake configure step for macOS users
55+
56+
There are some known problems about the compilation of FairSoft on macosx.
57+
58+
The first two problems are related to the version of the **patch** and **make**
59+
commands on macosx.
60+
61+
The **patch** command does not support the needed parameters,
62+
so one needs ot install a version of the **patch** command with brew.
63+
The **make** command doesn't properly support the jobsserver which allows
64+
parallel builds of all the packages contained in FairSoft which slows down
65+
the installation enormously. The version provided by brew fixes the problem.
66+
Both packages are already added in the updated setup script for macosx.
67+
If found the packages from the homebrew installation directory will be used.
68+
69+
The last problem is related to the macosx, compiler and SDK versions, such
70+
that it depends on the personal setup. As described in more detail at
71+
[macOS SDK](advanced.md#macos-sdk)! ROOT is very picky about the compiler
72+
and the connected SDK. Compiling older ROOT versions with newer compilers
73+
may need using an older SDK version. If not specified explicitely the
74+
latest SDK version is used. To use an older SDK version on needs to add the
75+
following parameter when running CMake
76+
77+
```
78+
-DCMAKE_OSX_SYSROOT=<full path to SDK directory>
79+
```
80+
81+
e.g. for Apple Clang 17 on macosx 15 or Apple Clang 16 on macosx 14
82+
83+
```
84+
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
85+
```
86+
87+
More information can be found at
88+
5489
**macOS users**: Notice [macOS SDK](advanced.md#macos-sdk)!
5590

5691
### 4. CMake build/install step

legacy/advanced.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ installed SDK version is the most sensible course of action here. `brew`
5959
contains already some logic to detect and choose the latest SDK. See the
6060
"macOS SDK" section in [FairSoftConfig.cmake](../FairSoftConfig.cmake).
6161

62+
The downside with picking the latest SDK version is that some older ROOT
63+
versions can't be compiled any longer after updating the compiler and the
64+
connected SDK. As described above the problems with compilation errors due
65+
to **wrong** SDKs are because of ROOT and there mainly becuase of rootcling.
66+
To overcome the problem and allow a more flexible compilation also with
67+
non default SDKs we add the possibilty to define an older SDK when running
68+
CMake. There are some additional changes in the build system of ROOT such
69+
that rootcling take the setting properly into account. With this changes it
70+
becomes possible to install FairSoft jan24 (ROOT 6.30.08) with Apple Clang
71+
17 on macosx 15.
72+
6273
**If you have a deeper understanding of this issue and know a better
6374
solution, please let us know!**
6475

0 commit comments

Comments
 (0)