EGSnrc icon indicating copy to clipboard operation
EGSnrc copied to clipboard

Compilation fails with -mcmodel=medium on macOS

Open ftessier opened this issue 3 years ago • 1 comments

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.

ftessier avatar Jul 19 '22 23:07 ftessier

Finally read this one

I wonder, does -mcmodel=large also fail?

crcrewso avatar Sep 13 '22 15:09 crcrewso