Skip to content

Notes on El Capitan

Alexey Matveichev edited this page Feb 9, 2024 · 1 revision

El Capitan introduces System Integrity Protection and it breaks certain things. In particular it clears LD_LIBRARY_PATH and DYLD_LIBRARY_PATH variables. I.e. if I run the following commands by hand

$ echo $DYLD_LIBRARY_PATH; echo; echo $LD_LIBRARY_PATH

I get usual output

/usr/local/opt/boost/lib:/usr/local/opt/cgal/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib/openmpi-system:/usr/local/Cellar/open-mpi/1.10.1/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib/dummy

/usr/local/opt/boost/lib:/usr/local/opt/cgal/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib/openmpi-system:/usr/local/Cellar/open-mpi/1.10.1/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/darwin64ClangDPInt32Opt/lib/dummy

Yet, if I run these commands from shell script, output is empty.

$ cat test.sh 
#!/bin/sh

echo $DYLD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
$ ./test.sh

Since OpenFOAM(R) libraries are installed in non-standard locations, solvers and utilities can not function properly with the variables being empty. I have discovered the problem while using lib ("myLovelyLibrary.dylib") construction in controlDict, later it was reported by Jarle Kramer (#15) that parallel execution breaks.

As a solution you can...

  1. Disable SIP.
  2. Add source $WM_PROJECT_DIR/etc/bashrc line to your scripts (somewhere before you run OpenFOAM executables).