Configuring and Compiling ISSM

ld: library not found for -lflapack

If you get the following error: ld: library not found for -lflapack (generally happens on macOS), remove the line --with-blas-lapack-dir from your configuration and try compiling again.

ld: file not found: @rpath/<LIBRARY\_NAME>.dylib for architecture <ARCH>

If you get a variation of the above error on macOS (where <LIBRARY_NAME> is a version of libquadmath or libgcc), you need to add the path to the GFortran libraries to your shell configuration file.

If you installed GFortran via FX Coudert’s GitHub repository, you should add,

export LIBRARY_PATH="/usr/local/gfortran/lib:${LIBRARY_PATH}"

If you installed GFortran via Homebrew, you should add,

export LIBRARY_PATH="/usr/local/Cellar/gcc/<VER>/lib/gcc/current:${LIBRARY_PATH}"

Warning: Xcode is installed, but its license has not been accepted. Run Xcode and accept its license agreement.

You may encounter the above error on macOS when configuring ISSM. It is actually triggered by trying to run MATLAB’s mex, indicated by,

Supported compiler not detected. For options, visit https://www.mathworks.com/support/compilers.
done
configure: error: Couldn't use MATLAB's mex... check manual compilation with MATLAB or error message above

If you have installed the Xcode Command Line Tools but not the full Xcode, you can accept the agreement in a Terminal by running,

defaults write com.apple.dt.Xcode IDEXcodeVersionForAgreedToGMLicense <VER>

where <VER> can be found by running,

softwareupdate --history

Note that you will have to do this for each user that is compiling ISSM on the machine.