My wsl system had gcc-9 (only, no gfortran), and a full gcc-11* installed. The environmet created the following env variables:
CC=$'/usr/bin/gcc-9\n/usr/bin/gcc'
OMPI_CC=$'/usr/bin/gcc-9\n/usr/bin/gcc'
FC=$'None\n/usr/bin/gfortran'
OMPI_FC=$'None\n/usr/bin/gfortran'
Reason is the following output of spack compiler info:
RUN spack compiler info gcc
gcc@9.5.0:
paths:
cc = /usr/bin/gcc-9
cxx = None
f77 = None
fc = None
modules = []
operating system = ubuntu22.04
gcc@11.4.0:
paths:
cc = /usr/bin/gcc
cxx = /usr/bin/g++
f77 = /usr/bin/gfortran
fc = /usr/bin/gfortran
modules = []
operating system = ubuntu22.04
I have a branch that fixes it, once I have confirmed (by rebuilding I'd guess :( ) that it works, I'll do a PR.