EGSnrc
EGSnrc copied to clipboard
Compilation fails with -mcmodel=medium on macOS
In #725 the compiler option -mcmodel=medium was added to the default flags, but this causes compilation failures on macOS (testing on version 11.6.7). On macOS, the clang linker is used, which apparently fails to link with code compiled with -mcmodel=medium. Specifically, out of the box on branch develop with the default options we get the following failures:
Compiling statdose ... Failed
...
Building the IAEA phase space library ... Failed
Building the EGSnrc C++ class library ... Failed
(I have no clue why statdose fails!). Hence, this compilation flag should not be set on macOS. Removing the -mcmodel=medium compiler option solves the problem.
Finally read this one
I wonder, does -mcmodel=large also fail?