Skip to content

Commit 141551b

Browse files
committed
[legacy] documentation: Add infos macosx
Describe two known problems on macosx and the corresponding solutions.
1 parent 9b121d6 commit 141551b

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

legacy/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,42 @@ 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 two known problems to the compilation of FairSoft on macosx.
57+
58+
The first one is related to the version of the **patch** command on macosx which
59+
does not support the needed parameters, so one needs ot install a version of
60+
the **patch** command with brew. This package is already added in the setup
61+
script for macosx. Unfortunately the binary installed in the bin directory
62+
isn't named any longer **patch** but **gpatch** such that it isn't found any
63+
longer automatically. To allow CMake to find the proper version it is nedded
64+
to modify the PATH environment variable when running cmake
65+
66+
```
67+
PATH=/usr/local/opt/gpatch/libexec/gnubin:$PATH cmake <all your parameters>
68+
```
69+
70+
The second problem is related to the macosx, compiler and SDK versions, such
71+
that it depends on the personal setup. As described in more detail at
72+
[macOS SDK](advanced.md#macos-sdk)! ROOT is very picky about the compiler
73+
and the connected SDK. Compiling older ROOT versions with newer compilers
74+
may need using an older SDK version. If not specified explicitely the
75+
latest SDK version is used. To use an older SDK version on needs to add the
76+
following parameter when running CMake
77+
78+
```
79+
-DCMAKE_OSX_SYSROOT=<full path to SDK directory>
80+
```
81+
82+
e.g. for Apple Clang 17 an macosx 15
83+
84+
```
85+
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
86+
```
87+
88+
More information can be found at
89+
5490
**macOS users**: Notice [macOS SDK](advanced.md#macos-sdk)!
5591

5692
### 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)