Spack correctly finds compilers on El Capitan
$ ./spack compilers
==> Available compilers
-- gcc ----------------------------------------------------------
gcc@5.3.0 gcc@4.2.1
-- clang --------------------------------------------------------
clang@7.0.2-apple
and the compilers.yaml looks all right
compilers:
darwin-x86_64:
clang@7.0.2-apple:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
f77: null
fc: null
gcc@4.2.1:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: null
fc: null
gcc@5.3.0:
cc: null
cxx: null
f77: /usr/local/bin/gfortran
fc: /usr/local/bin/gfortran
To use this on OS-X, one really need a way to specify the usage of
cc: /usr/bin/clang
cxx: /usr/bin/clang++
together with
f77: /usr/local/bin/gfortran
fc: /usr/local/bin/gfortran
when building, say, OpenMPI with fortran support. That also includes changing the installation prefix darwin-x86_64/gcc-5.3.0/ to something like darwin-x86_64/gcc-5.3.0-clang-7.0.2/.
As a current workaround I guess one can edit compilers.yaml manually to something like
compilers:
darwin-x86_64:
clang@7.0.2-apple:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
f77: /usr/local/bin/gfortran
fc: /usr/local/bin/gfortran
and then make clang default.
Spack correctly finds compilers on El Capitan
and the
compilers.yamllooks all rightTo use this on OS-X, one really need a way to specify the usage of
together with
when building, say, OpenMPI with fortran support. That also includes changing the installation prefix
darwin-x86_64/gcc-5.3.0/to something likedarwin-x86_64/gcc-5.3.0-clang-7.0.2/.As a current workaround I guess one can edit
compilers.yamlmanually to something likeand then make
clangdefault.