Skip to content

Incorrect compiler env variables if different compiler versions are installed #9

@hiker

Description

@hiker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions