Small fixes for macOS
Functionality to add/problem to solve
Fixes for small issues during compilation and execution of OpenFOAM v2206 on macOS
Target audience
macOS OpenFOAM users willing to recompile software from sources.
Proposal
Currently there are two main problems:
-
src/meshTools/triSurface/triSurfaceTools/geompack/geompack.C
causes segfault during compilation. - Configuration scripts add unnecessary variable
LD_LIBRARY_PATH
for environment. -
foamCleanPath
script operates onDYLD_LIBRARY_PATH
, which is empty upon invocation of the script.
The patch solves these problems:
-
-ftrapping-math
is switched off using#pragma
. This is enough to compilegeompack.C
without segfault. - Configuration scripts operate on backup
FOAM_DYLD_LIBRARY_PATH
, which is then copied toDYLD_LIBRARY_PATH
.
What does success look like, and how can we measure that?
- Successful compilation of the software on macOS.
- Successful execution of cases with
Allrun
scripts (or any other).
Compilation and execution is tested on
$ sw_vers
ProductName: macOS
ProductVersion: 12.5
BuildVersion: 21G72
with
$ clang++ --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin