-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Mix Clang and GNU Fortran on OS-X #568
Copy link
Copy link
Closed
Description
Spack correctly finds compilers on El Capitan
$ ./spack compilers
==> Available compilers
-- gcc ----------------------------------------------------------
[email protected] [email protected]
-- clang --------------------------------------------------------
[email protected]
and the compilers.yaml looks all right
compilers:
darwin-x86_64:
[email protected]:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
f77: null
fc: null
[email protected]:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: null
fc: null
[email protected]:
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:
[email protected]:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
f77: /usr/local/bin/gfortran
fc: /usr/local/bin/gfortran
and then make clang default.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels